feat(scim): store a per-provider SCIM token - #2670
Open
xlgmokha wants to merge 2 commits into
Open
Conversation
xlgmokha
marked this pull request as ready for review
August 3, 2026 20:53
xlgmokha
force-pushed
the
xlgmokha/auth-1368a
branch
from
August 4, 2026 16:18
5c30fe8 to
105842b
Compare
xlgmokha
force-pushed
the
xlgmokha/auth-1368a
branch
from
August 4, 2026 16:43
105842b to
5c30fe8
Compare
xlgmokha
force-pushed
the
xlgmokha/auth-1368a
branch
from
August 4, 2026 16:46
5c30fe8 to
681e3de
Compare
xlgmokha
force-pushed
the
xlgmokha/auth-1368a
branch
from
August 4, 2026 17:19
681e3de to
8d5ab8e
Compare
xlgmokha
force-pushed
the
xlgmokha/auth-1368a
branch
from
August 4, 2026 17:27
8d5ab8e to
aef7060
Compare
xlgmokha
force-pushed
the
xlgmokha/auth-1368a
branch
from
August 4, 2026 19:52
aef7060 to
605a241
Compare
xlgmokha
force-pushed
the
xlgmokha/auth-1368a
branch
from
August 4, 2026 20:05
605a241 to
76e14c9
Compare
xlgmokha
force-pushed
the
xlgmokha/auth-1368a
branch
from
August 6, 2026 15:34
76e14c9 to
e43f8da
Compare
xlgmokha
force-pushed
the
xlgmokha/auth-1368a
branch
from
August 6, 2026 18:07
e43f8da to
d01a1ec
Compare
xlgmokha
force-pushed
the
xlgmokha/auth-1368a
branch
from
August 6, 2026 18:15
d01a1ec to
0c91448
Compare
xlgmokha
force-pushed
the
xlgmokha/auth-1368a
branch
from
August 6, 2026 19:47
0c91448 to
71e3963
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/v2router ships dark behindGOTRUE_EXPERIMENTAL_SCIM_ENABLEDand 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_providershas no SCIM columns.ServiceProviderConfigalready advertisesoauthbearertokenas its primary authentication scheme, with nothing behind it.What is the new behavior?
sso_providersgainsscim_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