mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-25 08:08:49 +00:00
feat: configurable SSO email and username claims (#12235)
* feat: configurable SSO email and username claims Two instance settings next to sso_groups_claim, read by OIDC and SAML logins: sso_email_claim and sso_username_claim (NameID means the SAML subject). A configured claim absent from a login falls back to the protocol default, so unset settings keep today's behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: bump ee-repo-ref Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: say what a custom SSO email claim must be trusted for Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: update ee-repo-ref to cb6aa42ad515529506531051a3cbfa0e0867c605 This commit updates the EE repository reference after PR #956 was merged in windmill-ee-private. Previous ee-repo-ref: 9f10709a6898df0682ae478955e18b9f201f4776 New ee-repo-ref: cb6aa42ad515529506531051a3cbfa0e0867c605 Automated by sync-ee-ref workflow. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com> Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
This commit is contained in:
co-authored by
Claude Opus 5.5
windmill-internal-app[bot]
Ruben Fiszel
parent
8af80f1b74
commit
087e79e6ed
@@ -1 +1 @@
|
||||
6e7173e9c35569b03251ed31c8798037204fe483
|
||||
cb6aa42ad515529506531051a3cbfa0e0867c605
|
||||
|
||||
@@ -159,6 +159,12 @@ pub const AUTO_LOGIN_PROVIDER_SETTING: &str = "auto_login_provider";
|
||||
/// Name of the SAML attribute or OIDC userinfo claim carrying the user's IdP groups. Unset or
|
||||
/// empty leaves instance-group membership entirely to SCIM.
|
||||
pub const SSO_GROUPS_CLAIM_SETTING: &str = "sso_groups_claim";
|
||||
/// OIDC userinfo claim or SAML attribute holding the user's email. Unset, or absent from a
|
||||
/// login, keeps the protocol's default (OIDC `email`, SAML NameID).
|
||||
pub const SSO_EMAIL_CLAIM_SETTING: &str = "sso_email_claim";
|
||||
/// OIDC userinfo claim or SAML attribute (`NameID` for the subject's NameID) holding the
|
||||
/// username given to an account created at login. Unset, or absent, keeps the default.
|
||||
pub const SSO_USERNAME_CLAIM_SETTING: &str = "sso_username_claim";
|
||||
pub const HUB_BASE_URL_SETTING: &str = "hub_base_url";
|
||||
pub const HUB_ACCESSIBLE_URL_SETTING: &str = "hub_accessible_url";
|
||||
pub const DISABLE_HUB_SETTING: &str = "disable_hub";
|
||||
|
||||
@@ -160,6 +160,16 @@ Symbols, not line numbers, are cited: they drift less.
|
||||
"true"/"false" strings) and is only consulted for the claim above; only GitHub is filtered to
|
||||
`primary && verified`; a missing email is fabricated from `name` as `<name>@windmill.dev` and
|
||||
reaches `login_externally` with `email_asserted = false`.
|
||||
- **SSO claim names** (`sso_email_claim`, `sso_username_claim`, instance-wide, OIDC and SAML
|
||||
alike): a configured claim absent from a login falls back to the protocol default (OIDC
|
||||
`email` and the chain above, SAML NameID; `preferred_username` / the SAML username list),
|
||||
so one setting serves providers that name it differently. A configured email claim counts
|
||||
as asserted and can claim a `pending_oauth` account, so it must name an attribute users
|
||||
cannot edit at the IdP; `email_verified` is only read when the claim is `email` (the MCP
|
||||
external IdP instead refuses any token marked unverified, whatever its email claim: it never
|
||||
creates or claims an account, so the stricter rule costs nothing there). GitHub and Nextcloud
|
||||
keep their own email source. Accounts stay keyed by email: the username claim only names an
|
||||
account at creation, and an email change at the IdP signs in as a different account.
|
||||
- **MCP access tokens from an external issuer** (`mcp_external_idp`, EE, `mcp/external_idp.rs`):
|
||||
taken only for a JWT whose unverified `iss` is the configured issuer, then verified against its
|
||||
discovery JWKS. With no audience configured, only a token typed as an access token (`at+jwt`
|
||||
|
||||
@@ -862,6 +862,30 @@ export const settings: Record<string, Setting[]> = {
|
||||
ee_only: '',
|
||||
actionButton: manageInstanceGroupsButton
|
||||
},
|
||||
{
|
||||
label: 'SSO email claim',
|
||||
description:
|
||||
"The claim or SAML attribute holding a user's email. Windmill accounts are keyed by email.",
|
||||
tooltip:
|
||||
'Leave empty to use the email claim on OIDC and the NameID on SAML. A login whose claim is missing falls back to that default, so one setting can serve providers that name it differently. The claim decides which account a login opens, so map it only to an attribute users cannot edit at the identity provider. GitHub and Nextcloud logins always use their own email source. A changed email signs in as a different user.',
|
||||
key: 'sso_email_claim',
|
||||
fieldType: 'text',
|
||||
placeholder: 'email',
|
||||
storage: 'setting',
|
||||
ee_only: ''
|
||||
},
|
||||
{
|
||||
label: 'SSO username claim',
|
||||
description:
|
||||
'The claim or SAML attribute holding the username given to an account created at its first SSO login. NameID means the SAML NameID.',
|
||||
tooltip:
|
||||
'Leave empty to use preferred_username on OIDC and the usual username attributes on SAML (uid, username, preferred_username, UPN). A login whose claim is missing falls back to that default. Existing accounts keep their username. Has no effect when automatic username creation is off.',
|
||||
key: 'sso_username_claim',
|
||||
fieldType: 'text',
|
||||
placeholder: 'preferred_username',
|
||||
storage: 'setting',
|
||||
ee_only: ''
|
||||
},
|
||||
{
|
||||
label: 'MCP external identity provider',
|
||||
description:
|
||||
|
||||
Reference in New Issue
Block a user