Single Sign-On
Single Sign-On is a DefectDojo Pro feature. As of DefectDojo 3.0, the SSO surface — SAML, OIDC, and the bundled OAuth providers — is available only in DefectDojo Pro. Open-source DefectDojo uses local username/password login and the password-reset flow.
If you’re running open-source DefectDojo and want SSO, you’ll need to switch to DefectDojo Pro; the migration is covered in the 3.0 upgrade notes. Existing user accounts and group memberships are preserved on upgrade. For access control on open-source DefectDojo, see the Authorized Users page.
How SSO configuration works
Two things are worth understanding before you set up a provider:
- Where settings live. Almost every provider is configured under Connect > Authorization > Providers in the Pro UI (SAML, OIDC, the OAuth providers, LDAP, SCIM). Those values are saved in DefectDojo and take effect immediately — no restart. Two providers are the exception: Remote User (Header) Authentication is configured with environment variables only, and on-premise installs may also set any provider’s boot-time defaults through environment variables. Where both exist, the value saved in the DefectDojo UI wins at runtime — the environment variable is only the starting default.
- Configured vs enabled. Filling in a provider’s form does not switch it on. Each provider has its own Enable checkbox; the login button (or, for LDAP, the credential check) only appears once the provider is both configured and enabled and the form is saved. Authorization Connectors shows both states on one page.
Seeing what is configured
Authorization Connectors lists every supported provider on one page — which are configured, which are enabled, and what protocol each speaks — and takes you straight to the settings form for any of them. Start there if you want to know the state of this instance rather than set up a specific provider.
Supported SSO providers (DefectDojo Pro)
Each guide walks through the provider-side setup and the corresponding configuration in DefectDojo. The generic standards come first, then the branded OAuth providers, then the directory-backed methods.
Standards
- SAML — SAML 2.0
- OIDC (OpenID Connect) — any OpenID Connect provider
OAuth 2.0 providers
Directory / proxy
- LDAP — sign in against your LDAP or Active Directory
- Remote User (Header) Authentication — trust an authenticating reverse proxy (environment-variable configured)
Each provider’s page states the exact callback / redirect URI to register at your identity provider. You can also read it back from the provider’s own settings form using Validate Config, which echoes the value DefectDojo expects.
Linking a sign-in to an existing account (DefectDojo Pro)
The first time someone signs in through an OAuth or OIDC provider (every provider except SAML, LDAP and Remote User), DefectDojo looks for an account with the same email address and, if it finds one, links the sign-in to it. That trusts the provider’s word that the person owns the address. A provider that lets people set an email address without proving it (self-registration in Auth0, Keycloak or a generic OIDC provider, for example) would otherwise let anyone sign in as the DefectDojo account that uses that address.
So DefectDojo links a sign-in to an existing account by email only when the provider says it verified the email: the email_verified claim is true in its response or ID token. When the claim is missing or false, the sign-in is refused with a message on the login page, the attempt is listed under Connect > Diagnostics, and a warning is logged. This applies only to linking by email:
- A person whose sign-in is already linked to their account keeps signing in, whatever the provider sends.
- A person with no DefectDojo account is created as before (when user creation is on).
Providers that never send email_verified. Azure AD, GitLab and GitHub Enterprise, for example, do not send the claim, so with the default a first sign-in that matches an existing account is refused. If you trust that provider to verify every email address it sends, turn off Require Verified Email to Link Accounts on that provider’s settings page, or set its environment variable to False:
| Provider | Environment variable (default True) |
|---|---|
| OpenID Connect | DD_SOCIAL_AUTH_OIDC_REQUIRE_EMAIL_VERIFIED |
| Auth0 | DD_SOCIAL_AUTH_AUTH0_REQUIRE_EMAIL_VERIFIED |
DD_SOCIAL_AUTH_GOOGLE_OAUTH2_REQUIRE_EMAIL_VERIFIED | |
| Okta | DD_SOCIAL_AUTH_OKTA_OAUTH2_REQUIRE_EMAIL_VERIFIED |
| Azure AD | DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_REQUIRE_EMAIL_VERIFIED |
| GitLab | DD_SOCIAL_AUTH_GITLAB_REQUIRE_EMAIL_VERIFIED |
| KeyCloak | DD_SOCIAL_AUTH_KEYCLOAK_REQUIRE_EMAIL_VERIFIED |
| GitHub Enterprise | DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_REQUIRE_EMAIL_VERIFIED |
The setting applies to that provider only. Turning it off is a risk: anyone who can set an email address at that provider can then sign in as the DefectDojo account that uses it, so only turn it off for a provider whose users cannot choose their own address. Every sign-in it links this way writes a warning to the log.
Email addresses of SSO users. A user who signs in through SSO cannot change their own email address on their profile: it comes from the identity provider. An administrator can still change it, and an email address already used by another account is refused everywhere.
Provisioning users from your directory (DefectDojo Pro)
The providers above decide who may sign in. SCIM Provisioning keeps the account list itself in step with your directory, so users are created when they join, updated when their details change, and deactivated (along with their API tokens) when they leave.
SSO configuration in DefectDojo Pro can only be performed by a Superuser.
DefectDojo Pro users: Add the IP addresses of your SAML or SSO services to the Firewall whitelist before setting up SSO. See Firewall Rules for more information.
The login page itself
How the login page behaves once SSO is in place — disabling username/password login, auto-redirecting to your provider, session length, and just-in-time user creation — is covered on the Login Settings page.
If your SSO integration stops working, you can always return to the standard login form by appending ?force_login_form to your DefectDojo login URL. Keep at least one Superuser account with a username and password as a break-glass fallback.
Configure Auth0 SSO in DefectDojo Pro
See every identity provider on one page: which are configured, which are enabled, and what protocol each one speaks
Configure Azure AD / Microsoft Entra ID SSO and group mapping in DefectDojo Pro
Configure GitHub Enterprise SSO in DefectDojo Pro
Configure GitLab SSO in DefectDojo Pro
Configure Google OAuth in DefectDojo Pro
Configure KeyCloak SSO in DefectDojo Pro
Configure LDAP authentication in DefectDojo Pro
Control the DefectDojo login page: disable password login, auto-redirect to SSO, session length, idle timeout, and JIT user creation
Configure OpenID Connect (OIDC) SSO in DefectDojo Pro
Configure Okta SSO in DefectDojo Pro
Authenticate users from a trusted reverse proxy via request headers in DefectDojo Pro
Configure SAML in DefectDojo Pro
Provision and deprovision DefectDojo Pro users from your identity provider