SSO
Let users log in through GitLab, GitHub or any OpenID Connect provider, and give them roles from their groups.
An SSO integration adds a button to the login page that signs users in through GitLab, GitHub or any OpenID Connect provider, such as Keycloak, Okta or Microsoft Entra ID. Users who log in for the first time are created automatically.
SSO needs a paid license. See License.
Add an integration
-
In your provider, create an OAuth application. Use the Callback URL shown on the SSO Integrations page in Portal as its redirect URL, and grant these scopes:
Provider Scopes GitLab openid,profile,email,read_apiGitHub openid,profile,emailOther (OpenID Connect) openid,profile,email -
In Portal, open SSO Integrations in the settings and click Create SSO Integration.
-
Choose the Application type: GitLab, GitHub or Generic.
-
Fill in:
- Title: the text of the button on the login page.
- Domain: the provider’s host, for example
gitlab.example.com. For a generic provider whose discovery document isn’t athttps://<domain>/.well-known/openid-configuration, enter the Server metadata URL too. - Client ID and Client Secret of the application.
- Scopes.
- Use self signed certificate for a provider with a self-signed certificate.
-
Choose the Roles that every user who logs in this way gets. See Users and roles.
Who can log in
- Allowed email domains: only users whose email is in one of these domains can log in. Leave it empty to allow everyone the provider lets through.
- The username is the part of the email before
@. If a user with that username already exists, or a user with that email logs in with a password, the SSO login is refused. To move a user to SSO, set their Authorization method to SSO first.
Roles from groups
To give users roles from their groups in the provider, fill in External Group Mapping:
- JSON key in JWT token with list of external groups: the claim that holds the groups, for
example
groups. - One row per group: the External Group Name and the Roles to Assign.
When the token has at least one mapped group, the user’s roles are replaced at each login by the roles of their groups.
Access to repositories
For GitLab and GitHub, Create role from repository projects gives each user access to the products of the repositories they can see. When the user logs in, Portal imports their repositories as assets and adds them to the user’s role. The first import can take a few minutes.
On GitHub, the OAuth application needs access to your organizations: in the GitHub application settings, approve it for each organization, or ask an owner to approve it.