Repository navigation
Fixes a cross-organization account takeover through SCIM, adds
SurrealDB as a storage backend, and adds a kid
header to signed JWTs so JWKS consumers that select keys by kid can verify
them. Upgrading is recommended for every deployment where a user can belong
to more than one organization and SCIM provisioning is enabled. Nothing to do
on upgrade for existing deployments.
Security
- One organization's SCIM token could redirect a shared user's password reset and take over the account in another organization (GHSA-p7g3-2258-8wmp, high; same class as GHSA-93q4-j2hq-5qgg, whose fix covered only the
activeflag). SCIM tokens are issued per organization, butPATCH /scim/v2/Users/{id}wroteuserName/emails/phoneNumbersto the global user row and kept the existing email-verified marker. For a user who is also a member of organization B, organization A could set the email to an address it controls, request a password reset to it, and sign in as that user in B. A PATCH that changes the email or phone of a user with any membership outside the calling organization (deprovisioned ones included) is now refused with400andscimType: "mutability", and nothing in that PatchOp is written. Single-organization users keep full directory sync, and a shared user's unchanged or case-only email still syncs. Affected 2.4.0-rc.5 through 2.4.7. Found by Liam Giannini (@Liam-G).
Added
- SurrealDB storage backend (#906).
--database-type=surrealdbfor SurrealDB 4.0 or later, overhttp(s)orws(s), with--surrealdb-namespace(defaultauthorizer). The schema is created and upgraded by versioned migrations; cascade deletes run as one transaction and are retried as a whole on SurrealDB's write conflicts. The connection signs in again when its token expires, so a long-running server does not start refusing queries after an hour. See Databases. client_idclaim in access tokens (RFC 9068) andazpin ID tokens (OIDC Core) (#913). Access tokens from theauthorization_code,refresh_tokenandclient_credentialsgrants now name the client they were issued to, so a resource server can tell clients apart even when an RFC 8707resourcereplacesaud. ID tokens carryazp, always equal toaud. Additive: no existing claim changes.
Fixed
- JWTs had no
kidheader, so JWKS consumers that pick the key bykidrejected them (#904). For example, SurrealDB'sDEFINE ACCESS ... WITH JWT URLfailed withMissing token header 'kid'. RS/ES-signed tokens now carry akidequal to the key's RFC 7638 thumbprint, which/.well-known/jwks.jsonpublishes under the same value. The kid follows the key, so tokens signed before a primary-to-secondary rotation still name a published key. HMAC-signed tokens get nokid, since their key is never published. Thekidvalues in the JWKS change from the client-ID-based labels to thumbprints; a client that hard-coded the oldkidmust refetch the JWKS. The client-assertion verifier now refetches a trusted issuer's JWKS once (rate-limited to one per issuer per minute) when it meets an unknownkid.
Changed
- Bumped
github.com/openfga/openfgafrom 1.22.1 to 1.23.0 (#915).