Skip to content

feat(scim): store a per-provider SCIM token - #2670

Open
xlgmokha wants to merge 2 commits into
xlgmokha/auth-1362efrom
xlgmokha/auth-1368a
Open

feat(scim): store a per-provider SCIM token#2670
xlgmokha wants to merge 2 commits into
xlgmokha/auth-1362efrom
xlgmokha/auth-1368a

Conversation

@xlgmokha

@xlgmokha xlgmokha commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Feature. Adds sso_providers.scim_token_hash, a SHA-256 hex digest of the provider's SCIM token, with a partial unique index over the non-null values.

https://linear.app/supabase/issue/AUTH-1368/scim-users-get-by-id)

What is the current behavior?

The /scim/v2 router ships dark behind GOTRUE_EXPERIMENTAL_SCIM_ENABLED and serves the three discovery endpoints, but it has no authentication at all.

There is no way to associate a SCIM request with an SSO provider: sso_providers has no SCIM columns.

ServiceProviderConfig already advertises oauthbearertoken as its primary authentication scheme, with nothing behind it.

What is the new behavior?

sso_providers gains scim_token_hash, holding the SHA-256 hex digest of the provider's SCIM token, plus a partial unique index over the non-null values.
The plaintext token is never stored. Resolution is a single indexed equality on the digest of a secret, so there is no plaintext comparison and no timing-sensitive path.

Additional context

@xlgmokha xlgmokha self-assigned this Aug 3, 2026
@xlgmokha
xlgmokha marked this pull request as ready for review August 3, 2026 20:53
@xlgmokha
xlgmokha requested a review from a team as a code owner August 3, 2026 20:53
@xlgmokha
xlgmokha force-pushed the xlgmokha/auth-1368a branch from 5c30fe8 to 105842b Compare August 4, 2026 16:18
@xlgmokha
xlgmokha force-pushed the xlgmokha/auth-1368a branch from 105842b to 5c30fe8 Compare August 4, 2026 16:43
@xlgmokha
xlgmokha force-pushed the xlgmokha/auth-1368a branch from 5c30fe8 to 681e3de Compare August 4, 2026 16:46
@xlgmokha
xlgmokha force-pushed the xlgmokha/auth-1368a branch from 681e3de to 8d5ab8e Compare August 4, 2026 17:19
@xlgmokha
xlgmokha force-pushed the xlgmokha/auth-1368a branch from 8d5ab8e to aef7060 Compare August 4, 2026 17:27
@xlgmokha
xlgmokha force-pushed the xlgmokha/auth-1368a branch from aef7060 to 605a241 Compare August 4, 2026 19:52
@xlgmokha
xlgmokha force-pushed the xlgmokha/auth-1368a branch from 605a241 to 76e14c9 Compare August 4, 2026 20:05
@xlgmokha
xlgmokha force-pushed the xlgmokha/auth-1368a branch from 76e14c9 to e43f8da Compare August 6, 2026 15:34
@xlgmokha
xlgmokha force-pushed the xlgmokha/auth-1368a branch from e43f8da to d01a1ec Compare August 6, 2026 18:07
@xlgmokha
xlgmokha force-pushed the xlgmokha/auth-1368a branch from d01a1ec to 0c91448 Compare August 6, 2026 18:15
@xlgmokha
xlgmokha force-pushed the xlgmokha/auth-1368a branch from 0c91448 to 71e3963 Compare August 6, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant