feat: add email_verified mapping to SSO attribute configuration - #236
Merged
stefan-ernst merged 1 commit intoAug 31, 2026
Merged
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
1 similar comment
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
Contributor
|
Thank you, that change makes sense! Will test my own Entra Tenant in a moment |
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.
Add
email_verifiedto the SSO attribute mappingSummary
The SSO attribute mapping (
attribute_mappingonsso_providers) let admins remapemail,name,given_name,family_name, andusername, but the verified-emailsignal was hardcoded to the standard OIDC
email_verifiedclaim. IdPs that exposeverification status under a different claim/attribute name had no way to wire it up,
so those users were unnecessarily pushed through in-app email verification.
This adds
email_verifiedas a configurable key in the mapping, defaulting to"email_verified"so existing behaviour is unchanged.Changes
AttributeMap(internal/sso/provider.go) — newEmailVerifiedfield;included in the built-in default map.
internal/sso/oidc.go) —ExtractClaimsresolves the verified-emailclaim name from the mapping (falling back to
email_verified), marksEmailVerifiedProvidedwhen that claim is present, and parses its value via a newclaimToBoolhelper that accepts JSON booleans and"true"/"false"strings.When the standard claim name is used and absent, it still falls back to the
library-parsed value.
internal/handlers/sso_saml.go) — if the IdP asserts the mappedattribute, its value is honoured (
strconv.ParseBool); otherwise the existingprovider-trust behaviour (
require_verified_email) applies.internal/database/schema/sso.sql,sso_postgres.sql) —attribute_mappingcolumn default now includes"email_verified":"email_verified".Compatibility
attribute_mappingis a free-form JSON blob (validatedonly for size + well-formed JSON). Existing providers with an older mapping simply
fall back to the
email_verifieddefault inGetAttributeMap.Notes / follow-ups
attribute_mappinginSSOSettings.sveltetoday;it's API-only. A UI editor for the mapping could be a separate change.
Testing
go build ./...,go vet, andgofmtpass. The repo currently has no SSOhandler/service tests to extend.