@canopy-io/nestjs 0.5.0 → 0.6.1

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,25 @@
1
1
  # @canopy-io/nestjs
2
2
 
3
+ ## 0.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [51fd41e]
8
+ - @canopy-io/node@0.13.0
9
+
10
+ ## 0.6.0
11
+
12
+ ### Minor Changes
13
+
14
+ - 10d3583: Organization membership is admission, not a role. Identity tokens carry `org_roles` (the names of the roles held at the organization node, sorted, possibly empty) in place of `org_role`; `orgContext(claims)` returns `{ orgId, orgRoles }`, and refuses a token carrying one claim without the other. An empty `orgRoles` is a member holding no role at the organization node, so authorize by evaluating rather than by the list. The conformance bundle gains the `organization-membership` vector: a grant inside an organization counts only while the membership is active, which the grants `LocalAuthorizer` caches already reflect.
15
+
16
+ `organizations.changeMemberRole()` is gone with its route: a member's role at the organization is an assignment at the organization node, written through `assignments.create()`, `assignments.update()` and `assignments.delete()` with the organization node as `node_id`. `assignments.update()` takes `{ ifMatch }` and sends it as `If-Match`; a stale version answers `409 assignment.version_mismatch`. `organizations.removeMember()` deactivates the membership and revokes every role the member held in the organization. Member rows carry `status`, `source`, `joined_at` and `roles[]` in place of the single `role`.
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [10d3583]
21
+ - @canopy-io/node@0.12.0
22
+
3
23
  ## 0.5.0
4
24
 
5
25
  ### Minor Changes
package/README.md CHANGED
@@ -112,12 +112,13 @@ The default is `node`, which is the strict question: does this identity hold the
112
112
  ```
113
113
 
114
114
  `org` is for Environments with the **organizations** container on, where a
115
- token carries the organization the session is acting in (`org_id`) and the one
116
- role held there (`org_role`). The guard reads `org_id` off the verified claims
117
- `CanopyTokenGuard` attached and evaluates at that node — an organization _is_ a
118
- hierarchy node, and a membership is a role assignment at it, so no `resolveNode`
119
- and no node in the route's path are needed. A caller acting in no organization
120
- is denied: an org-scoped route has no meaning outside one.
115
+ token carries the organization the session is acting in (`org_id`) and the
116
+ roles held at its node (`org_roles`, possibly none). The guard reads `org_id`
117
+ off the verified claims `CanopyTokenGuard` attached and evaluates at that node —
118
+ an organization _is_ a hierarchy node, and a member's roles are assignments at
119
+ it or beneath it, so no `resolveNode` and no node in the route's path are
120
+ needed. A caller acting in no organization is denied: an org-scoped route has
121
+ no meaning outside one.
121
122
 
122
123
  If your own auth layer verifies tokens and parks the claims somewhere other
123
124
  than `attachTokenAs`, configure `resolveOrg` — and feed it only a value read
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canopy-io/nestjs",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
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.11.0"
65
+ "@canopy-io/node": "^0.13.0"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "@nestjs/common": "^10.0.0 || ^11.0.0",