|
| 1 | +--- |
| 2 | +"@objectstack/plugin-auth": minor |
| 3 | +"@objectstack/platform-objects": minor |
| 4 | +"@objectstack/spec": minor |
| 5 | +"@objectstack/plugin-security": minor |
| 6 | +"@objectstack/cli": minor |
| 7 | +"create-objectstack": minor |
| 8 | +--- |
| 9 | + |
| 10 | +feat(auth): migrate `@better-auth/scim` from `1.7.0-rc.1` to stable `1.7.1` — the whole-model SCIM migration (#3653, epic #11632) |
| 11 | + |
| 12 | +The stable line is the rc.2-lineage rewrite: the rc.1 `scimProvider` model, |
| 13 | +`/scim/generate-token` endpoint and `storeSCIMToken` option no longer exist, |
| 14 | +replaced by seven new models and a three-way connection contract. This lands |
| 15 | +the migration atomically: |
| 16 | + |
| 17 | +- **Seven new platform objects** back the stable models — |
| 18 | + `sys_scim_connection_binding`, `sys_scim_group`, `sys_scim_group_member`, |
| 19 | + `sys_scim_identity_tombstone`, `sys_scim_projection_grant`, |
| 20 | + `sys_scim_subject`, `sys_scim_user` — bridged via `AUTH_MODEL_TO_PROTOCOL`, |
| 21 | + registered in the platform-object-names registry, listed in |
| 22 | + `BETTER_AUTH_MANAGED_OBJECTS`, and column-pinned by the parity gate (whose |
| 23 | + `KNOWN_UNMAPPED_MODELS` shrinks to the empty set: the rc.1-era group |
| 24 | + provisioning gap — IdP `/Groups` pushes hitting tables that did not exist — |
| 25 | + is closed). |
| 26 | +- **SCIM connections stay runtime data.** The stable constructor is satisfied |
| 27 | + with an application-owned `authentication.verifyBearerToken` that resolves |
| 28 | + the connection from a row at request time — not static boot config, and not |
| 29 | + the upstream `managedConnections` catalog (deliberately not adopted). |
| 30 | +- **ObjectStack owns SCIM credentials outright** (stable upstream stores no |
| 31 | + credential at all): `sys_scim_connection_credential` plus |
| 32 | + `scim-connection-service.ts` mint/digest/verify. At rest only an |
| 33 | + HMAC-SHA-256 keyed by the deployment auth secret (base64url, |
| 34 | + domain-separated) is stored — at parity or better than the rc.1 unsalted |
| 35 | + SHA-256 — pinned by `credential-at-rest-posture.test.ts` including live |
| 36 | + 401 paths for forged, revoked and expired bearers. |
| 37 | +- **The ObjectQL better-auth adapter gains native transactions** |
| 38 | + (`engine.transaction`, fail-closed on drivers without `beginTransaction`), |
| 39 | + which stable scim requires by assertion for atomic provisioning writes. |
| 40 | +- **Scaffold suppression retired**: the `@better-auth/scim>better-call` |
| 41 | + `allowedVersions` entry (CLI renderer + blank template) is gone — stable |
| 42 | + 1.7.1 peers `better-call@1.4.0` exactly — and its presence ratchets flipped |
| 43 | + to absence pins. The `better-auth>better-sqlite3` and four |
| 44 | + `@better-auth/utils` entries stay; their retirement conditions are separate |
| 45 | + and unmet. |
| 46 | +- The pin resolves **1.7.1 exactly** (not `^1.7.1`): 1.7.2 peers |
| 47 | + `better-auth`/`@better-auth/core` at `^1.7.2`, which only the workspace |
| 48 | + overrides' silencing would "satisfy" while the family is 1.7.1. Floating is |
| 49 | + its own follow-up. |
| 50 | + |
| 51 | +**Semver: minor, argued.** The rc.1 SCIM surface this replaces (generate-token |
| 52 | +endpoint, rc.1 bearer tokens, `sys_scim_provider` rows) changes incompatibly — |
| 53 | +but that surface is default-off (`OS_SCIM_ENABLED`), was shipped with a |
| 54 | +documented "do not let the IdP push groups" boundary, and the maintainer ruled |
| 55 | +(2026-08-25) that SCIM has no real customers and old data need not carry: the |
| 56 | +one binding constraint is that an existing system upgrades smoothly, which it |
| 57 | +does — every table the installed library can write exists at this version, and |
| 58 | +SCIM-disabled deployments see no behavior change. A major would move the whole |
| 59 | +fixed version group for a feature surface with zero consumers. Deployments |
| 60 | +that had SCIM enabled must mint new connection credentials (digests are not |
| 61 | +portable from rc.1 on any path — IdP token reissue is a migration-day |
| 62 | +operator action regardless of semver level). `sys_scim_provider` itself is |
| 63 | +NOT removed here; its retirement is tracked separately (#11757). |
0 commit comments