Commit 4533e02
committed
feat(auth,platform-objects,spec): migrate @better-auth/scim to stable 1.7.1 — provision the seven models, app-owned bearer verification (#3653)
Part of #3653 (leg 2' of epic #11632). The pin resolves to 1.7.1 EXACTLY
(not ^1.7.1, which resolves to 1.7.2 whose better-auth/core ^1.7.2 peers
only the workspace overrides' silencing would 'satisfy'; floating is its
own follow-up card).
- pnpm-workspace.yaml + plugin-auth: exact 1.7.1 pin, stale rc-hold
comment blocks rewritten to the landed state.
- packages/platform-objects/src/identity/: the seven stable models
provisioned as platform objects (scimConnectionBinding, scimGroup,
scimGroupMember, scimIdentityTombstone, scimProjectionGrant,
scimSubject, scimUser) plus sys_scim_connection_credential, the
ObjectStack-owned credential store for the app-owned verifyBearerToken
route (stable upstream stores no credential at all). Translation
bundles regenerated with pnpm i18n:extract only.
- packages/spec platform-object-names.ts: eight additive registry names
(the measured-unsplittable spec edit; sys_scim_provider stays — its
retirement is #11757's).
- plugin-security BETTER_AUTH_MANAGED_OBJECTS: the seven library-managed
names, forced additively by the bidirectional drift pin
(default-permission-sets.test.ts) the moment the objects declare
managedBy: 'better-auth'.
- plugin-auth scim-connection-service.ts: mint + digest + verify owned
outright; at rest only HMAC-SHA-256(secret, domain-separated bearer),
base64url — at parity or better than the rc.1 unsalted SHA-256.
- auth-manager.ts: stable constructor shape — connections: [] plus
authentication.verifyBearerToken resolving the connection from a
sys_scim_connection_credential row at request time; auth secret
resolved once (memoized) so digests and better-auth share key material.
- objectql-adapter.ts: seven AUTH_MODEL_TO_PROTOCOL bridge entries, and
NATIVE adapter transactions over engine.transaction({ require: true })
— stable scim refuses the sequential fallback by assertion.
- better-auth-schema-parity.test.ts: KNOWN_UNMAPPED_MODELS shrinks to
the empty set (exact-set assertion kept, both directions).
- credential-at-rest-posture.test.ts: restructured honestly — the
upstream-cleartext control arm is no longer measurable (upstream
stores nothing); its successor pins that vacating fact plus the keyed
digest relationship, negatives for the unkeyed/wrong-key/undomained
shapes, and live 200/401 rejection paths incl. revocation and expiry.
Co-authored-by: Claude <noreply@anthropic.com>1 parent 06b372b commit 4533e02
31 files changed
Lines changed: 4046 additions & 392 deletions
File tree
- packages
- platform-objects
- scripts
- src
- apps/translations
- identity
- plugins
- plugin-auth
- src
- plugin-security/src/objects
- spec/src/system/constants
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
107 | 115 | | |
108 | 116 | | |
109 | 117 | | |
| |||
241 | 249 | | |
242 | 250 | | |
243 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
244 | 262 | | |
245 | 263 | | |
246 | 264 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| |||
0 commit comments