@canopy-io/nestjs 0.7.1 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @canopy-io/nestjs
|
|
2
2
|
|
|
3
|
+
## 0.7.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5de853f: Webhooks reach the `LocalAuthorizer` cache, so a revocation lands on the next local check instead of waiting out `ttlMs`.
|
|
8
|
+
|
|
9
|
+
- `verifyWebhookSignature({ headers, rawBody, secret })` checks a delivery's `X-Canopy-Signature`: HMAC-SHA256 over `{id}.{timestamp}.{raw body}`, compared in constant time on Web Crypto, so it runs in edge workers as well as Node. It accepts either signature while a rotation's window is open, takes several secrets while you roll one out, and refuses a timestamp more than five minutes from the clock (`toleranceSeconds`). It resolves `false`, never rejects.
|
|
10
|
+
- `authorizer.applyEvent(delivery)` drops what a webhook delivery or change-feed entry makes stale and answers what it dropped: the subjects an assignment, membership, identity-status, single-person deny or machine-client change names; everything for a role, permission, node, schema, organization creation or deletion, role deny or directory group mapping; nothing for a change that moves no one's access. An event this version does not know drops everything.
|
|
11
|
+
- `authorizer.replayChanges({ cursor })` reads `GET /api/v1/changes` to the newest change, applies each, and answers the cursor to resume from: for catching up after a restart, or polled on every instance in place of webhooks.
|
|
12
|
+
- `invalidate` now also discards a read already in flight, so a check that began before a change cannot put the access it revoked back in the cache for a whole window.
|
|
13
|
+
- Updated dependencies [3b4bc7f]
|
|
14
|
+
- Updated dependencies [5de853f]
|
|
15
|
+
- @canopy-io/node@0.17.0
|
|
16
|
+
|
|
17
|
+
## 0.7.2
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- 7d31f2f: `LocalAuthorizer` understands authorization model version 2, which Canopy answers in an Environment that holds a deny. A deny refuses a permission to an identity, a machine client or a role's holders at a node and everything beneath it, whatever the grants allow. The grants read carries the subject's deny roots beside its grant roots, already resolved by Canopy (the roles it holds, the exception roles that spare it), and the authorizer applies them from the same cache and TTL:
|
|
22
|
+
|
|
23
|
+
- `evaluate` refuses with the new reason `denied` when a deny root for the permission is at the node or above it, before any grant is looked at. An `app_wide` check holds while one grant in effect stands clear of every deny, and is `denied` when none does. A check on a permission with a deny reads the tree even for a grant at the node itself.
|
|
24
|
+
- `grantRoots` and `accessibleNodes` leave out a root a deny refuses and name `excludedRoots`, the deny roots beneath a root, each cutting out its subtree. `accessibleNodes` leaves those subtrees out of `nodes`, and `envWide` is false while anything is excluded. A filter by roots must exclude `excludedRoots` too.
|
|
25
|
+
- `holdsAnywhereUnder` answers `{ held, roots, excludedRoots }`; a deny at the subtree's root or above it refuses the whole subtree.
|
|
26
|
+
- `permissionsAt` and `permissionsAtMany` leave out a permission a deny refuses at the node.
|
|
27
|
+
|
|
28
|
+
`LocalDenialReason` gains `denied`, so an exhaustive `switch` over it needs the new case. A version 1 answer, from a Canopy without denies, carries none and is read as before. The conformance bundle gains the `denies` vector, which the authorizer answers, and is published at model version 2.
|
|
29
|
+
|
|
30
|
+
The spec now has 197 operations. Generated types cover the Denies routes (`/api/v1/denies`: list, get, create, preview, reach, remove), unwrapped like the other management routes, `deny_id` on an evaluation refused by a deny, and the reads and previews released beside them.
|
|
31
|
+
- Updated dependencies [7d31f2f]
|
|
32
|
+
- @canopy-io/node@0.16.0
|
|
33
|
+
|
|
3
34
|
## 0.7.1
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canopy-io/nestjs",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "Official NestJS integration for Canopy \u2014 hierarchical identity and access management.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Canopy Identity Inc.",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"test:watch": "vitest"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@canopy-io/node": "^0.
|
|
65
|
+
"@canopy-io/node": "^0.17.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@nestjs/common": "^10.0.0 || ^11.0.0",
|