@canopy-io/nestjs 0.7.2 → 0.7.4

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 CHANGED
@@ -1,5 +1,27 @@
1
1
  # @canopy-io/nestjs
2
2
 
3
+ ## 0.7.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [056f64d]
8
+ - Updated dependencies [4a092d0]
9
+ - @canopy-io/node@0.18.0
10
+
11
+ ## 0.7.3
12
+
13
+ ### Patch Changes
14
+
15
+ - 5de853f: Webhooks reach the `LocalAuthorizer` cache, so a revocation lands on the next local check instead of waiting out `ttlMs`.
16
+
17
+ - `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.
18
+ - `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.
19
+ - `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.
20
+ - `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.
21
+ - Updated dependencies [3b4bc7f]
22
+ - Updated dependencies [5de853f]
23
+ - @canopy-io/node@0.17.0
24
+
3
25
  ## 0.7.2
4
26
 
5
27
  ### Patch Changes
package/README.md CHANGED
@@ -44,7 +44,7 @@ import { CanopyModule } from "@canopy-io/nestjs";
44
44
  export class AppModule {}
45
45
  ```
46
46
 
47
- `verify` names the Environment whose tokens the module accepts (`environmentId`, or `issuer` on a custom auth domain or a self-hosted instance). It is required: the module builds its token verifier at startup.
47
+ `verify` names the Environment whose tokens the module accepts (`environmentId`, or `issuer` on a custom auth domain or a self-hosted instance; a self-hosted instance can instead set `CANOPY_BASE_URL` for the process, which `environmentId` and the client both follow). It is required: the module builds its token verifier at startup.
48
48
 
49
49
  The two resolvers are how the guard learns _who_ is asking and _where_. Where those live is your application's business — a claim on a verified token, a route parameter, a tenant on the session — so you supply them rather than the library guessing. Pass your own request type to `forRoot` and both resolvers are typed against it.
50
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canopy-io/nestjs",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
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.16.0"
65
+ "@canopy-io/node": "^0.18.0"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "@nestjs/common": "^10.0.0 || ^11.0.0",