You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 95349ed
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .changeset/30959-scim-group-permission-set-mapping.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ feat(plugin-auth): a SCIM group push grants the ordinary permission set its grou
11
11
Clause-②: yes (widening)
12
12
Metadata-protocol: none
13
13
14
-
An identity provider that pushes a group over SCIM now changes what its members may do. A platform administrator saves a mapping from one SCIM connection's group to one permission set with `POST /api/v1/auth/admin/scim/set-group-mapping` (`connectionId`, `groupExternalId` or `groupDisplayName`, `permissionSet`), and deletes one with `POST /api/v1/auth/admin/scim/delete-group-mapping` (`mappingId`). Both run the platform-admin gate the SCIM credential door runs. A connection whose credential names no organization, or whose credentials name two, is refused `400 VALIDATION_FAILED` on `connectionId`, so every mapping, and every grant it makes, belongs to exactly one organization. Only live credentials (active and unexpired, as the bearer verifier reads them) decide that organization: a credential revoked in one organization does not block a mapping once a new one is minted in another. The rows live in the new platform object `sys_idp_group_mapping`, which the data API only lists.
14
+
An identity provider that pushes a group over SCIM now changes what its members may do. A platform administrator saves a mapping from one SCIM connection's group to one permission set with `POST /api/v1/auth/admin/scim/set-group-mapping` (`connectionId`, `groupExternalId` or `groupDisplayName`, `permissionSet`), and deletes one with `POST /api/v1/auth/admin/scim/delete-group-mapping` (`mappingId`). Both run the platform-admin gate the SCIM credential door runs. A connection whose credential names no organization, or whose credentials name two, is refused `400 VALIDATION_FAILED` on `connectionId`, so every mapping, and every grant it makes, belongs to exactly one organization. Only live credentials (active and unexpired, as the bearer verifier reads them) decide that organization: a credential revoked in one organization does not block a mapping once a new one is minted in another. Saving the same group and set again is idempotent; if that mapping was saved while another organization owned the connection, the save is refused `409 RESOURCE_CONFLICT` naming the old mapping, which must be deleted first. The rows live in the new platform object `sys_idp_group_mapping`, which the data API only lists.
15
15
16
16
When a group's membership changes, `@better-auth/scim`'s projection grants each member the mapped set in the organization that owns the connection, inside the SCIM transaction, written by the connection (`svc:scim:CONNECTION_ID` in the audit trail). Removing a member removes that grant. A group nobody mapped grants nothing. The projection asks the boundary again before every grant it writes, so a set that becomes an administrator set after its mapping was saved grants nothing. A grant the projection did not make, such as one an administrator made by hand, is never removed. Saving or deleting a mapping applies it to the group's current members at once.
{route: 'POST /api/v1/auth/admin/scim/mint-credential',family: 'objectstack-mount',source: 'objectstack',disposition: 'server-only',requires: 'scim',note: 'no SDK method builds this URL — an operator script or the identity-provider setup posts it; mints the bearer a SCIM connection authenticates with (scim-connection-service.ts) and answers the plaintext once, Cache-Control: no-store — only its keyed one-way digest is stored, and nothing logs it; refused 503 SERVICE_UNAVAILABLE while SCIM is off; one sys_audit_log row per mint naming the admin and the connection, never the credential; platform-admin gated (ADR-0068), ADR-0134'},
256
256
{route: 'POST /api/v1/auth/admin/scim/revoke-credential',family: 'objectstack-mount',source: 'objectstack',disposition: 'server-only',note: 'no SDK method builds this URL — an operator script posts it with the credentialId the mint answered; switches that credential row inactive, so the SCIM verifier refuses its bearer from the next request on (rotation is a second mint for the same connection, then this); 404 for an unknown credential, 409 when already revoked; one sys_audit_log row per revoke naming the admin and the connection; served whether or not SCIM is on; platform-admin gated (ADR-0068), ADR-0134'},
257
-
{route: 'POST /api/v1/auth/admin/scim/set-group-mapping',family: 'objectstack-mount',source: 'objectstack',disposition: 'server-only',requires: 'scim',note: 'no SDK method builds this URL — an operator script posts it; saves one sys_idp_group_mapping row (a SCIM connection group, by externalId or displayName, to one permission set in the connection organization) and re-projects the connection so current members gain it; refused 400 VALIDATION_FAILED on permissionSet for any set outside the organization boundary (administrator sets, agent ceilings, superuser wildcards, adminScope, non-organization capabilities), judged by the security service; 503 while SCIM or the security service is absent; one sys_audit_log row per save; platform-admin gated (ADR-0068), ADR-0134 D4'},
257
+
{route: 'POST /api/v1/auth/admin/scim/set-group-mapping',family: 'objectstack-mount',source: 'objectstack',disposition: 'server-only',requires: 'scim',note: 'no SDK method builds this URL — an operator script posts it; saves one sys_idp_group_mapping row (a SCIM connection group, by externalId or displayName, to one permission set in the connection organization) and re-projects the connection so current members gain it; refused 400 VALIDATION_FAILED on permissionSet for any set outside the organization boundary (administrator sets, agent ceilings, superuser wildcards, adminScope, non-organization capabilities), judged by the security service; a re-save of the same group and set is idempotent in the connection organization, and refused 409 RESOURCE_CONFLICT naming the old mapping when that row lives in another organization (delete it first); 503 while SCIM or the security service is absent; one sys_audit_log row per save; platform-admin gated (ADR-0068), ADR-0134 D4'},
258
258
{route: 'POST /api/v1/auth/admin/scim/delete-group-mapping',family: 'objectstack-mount',source: 'objectstack',disposition: 'server-only',note: 'no SDK method builds this URL — an operator script posts it with the mappingId the save answered; deletes that sys_idp_group_mapping row and re-projects the connection so the grants it made go (with SCIM off nothing is re-projected and those grants stay until removed by hand; the answer says reprojected: false); 404 for an unknown mapping; one sys_audit_log row per delete; platform-admin gated (ADR-0068), ADR-0134 D4'},
259
259
{route: 'POST /api/v1/auth/admin/sso/register',family: 'objectstack-mount',source: 'objectstack',disposition: 'server-only',requires: 'sso',note: 'no SDK method builds this URL — the sys_sso_provider register action posts flat form fields; ObjectStack bridge re-dispatching into @better-auth/sso /sso/register, platform-admin gated ahead of the delegation (ADR-0068 D4), so registering an identity provider never rests on the vendor\'s own check alone. Distinct path from the vendor\'s own /sso/register, which the catch-all serves'},
260
260
{route: 'POST /api/v1/auth/admin/sso/register-saml',family: 'objectstack-mount',source: 'objectstack',disposition: 'server-only',requires: 'sso',note: 'no SDK method builds this URL — the sys_sso_provider register_saml_provider action posts flat fields the bridge reshapes into better-auth\'s nested samlConfig; platform-admin gated ahead of the delegation (ADR-0068 D4), ADR-0069 P3'},
0 commit comments