@canopy-io/nestjs 0.5.0 → 0.6.0
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 +13 -0
- package/README.md +7 -6
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @canopy-io/nestjs
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 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.
|
|
8
|
+
|
|
9
|
+
`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`.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [10d3583]
|
|
14
|
+
- @canopy-io/node@0.12.0
|
|
15
|
+
|
|
3
16
|
## 0.5.0
|
|
4
17
|
|
|
5
18
|
### 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
|
|
116
|
-
|
|
117
|
-
`CanopyTokenGuard` attached and evaluates at that node —
|
|
118
|
-
hierarchy node, and a
|
|
119
|
-
and no node in the route's path are
|
|
120
|
-
is denied: an org-scoped route has
|
|
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.
|
|
3
|
+
"version": "0.6.0",
|
|
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.12.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@nestjs/common": "^10.0.0 || ^11.0.0",
|