Skip to content

Azure AD: Support SSO logout via end-session endpoint redirect #17283

@rak-phillip

Description

@rak-phillip

When using Azure AD as the auth provider, logging out only clears the Rancher session. The user's Azure AD session stays active, so clicking "Sign in with Azure AD" immediately re-authenticates without prompting for credentials.

Every other SSO-capable providers in Rancher (OIDC, Keycloak, SAML) support single logout — they redirect the browser to the IdP's end-session endpoint to terminate the IdP session as well. Azure AD supports relying-party-initiated logout via https:///{tenant}/oauth2/v2.0/logout but it's currently is not exercised.

Proposed solution

Add new fields to the Azure AD Auth Provider form to support SSO logout:

  • Log out of Rancher and not Azure AD (default)
  • Log out of Rancher and Azure AD (included all other applications registered with Azure AD)
  • Allow the user to choose one of the above in an additional log out step
  • End Session Endpoint: Active when SSO is active

Acceptance criteria

  • Azure AD config form exposes ssoLogout, endSessionEndpoint, and logoutAllForced fields with appropriate validation and help text
  • When ssoLogout is enabled and a user logs out, the browser is redirected to the configured end-session endpoint
  • id_token_hint is included when the R_AZUREAD_ID cookie is present; logout completes without it when absent
  • endSessionEndpoint can be configured
  • logoutAllForced prevents non-SSO logout when enabled, consistent with other providers
  • Unit tests cover the new fields and logout redirect logic
  • E2E test covers the happy path (SSO logout redirects correctly)

Additional details

  • SSO has been implemented for multiple other auth providers. The exposed fields and expected behavior should be the same as those

Metadata

Metadata

Assignees

Labels

QA/dev-automationIssues that engineers have written automation around so QA doesn't have look at thisarea/authAuthentication and RBACbot/ready-for-triage
No fields configured for Feature.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions