Gitlab SSO Configuration
Prerequisites
- Ensure the Global SSO Settings have already been configured for this cluster.
- Access to Keycloak Master Realm
Create Keycloak Clients
- While you are in the
smoothglue
realm, click onClients
underManage
in the left pane. - Click
Create client
. - Enter client name
gitlab
forClient ID
. - Click on the
Next
button. - Toggle on
Client authentication
. - Click on the
Next
button. Note: The application's FQDN name may be obtained by runningkubectl get virtualservice -A
- Enter
https://{{ application_fqdn }}/users/auth/openid_connect/callback
forValid Redirect URIs
. - Click on the
Save
button.
Creating Client Scopes
Gitlab
needs to be added in the Client Scopes.
note
The client scope has to be spelled exactly as Gitlab
as this name is what GitLab is configured to request.
- While you are in the
smoothglue
realm, click onClient Scopes
. - Click
Create client scope
. - Enter
Gitlab
forName
, and click on theSave
button. - Go to the
Mappers
tab. - Click on
Add predefined mappers
. - Enable
username
,profile
,full name
, andemail
predefined mappers (some may be on the next page). - Click
Add
. - Go to
Clients
, and go to thegitlab
client. - Go to the
Client Scopes
tab. - Click
Add client scope
. - Enable the
Gitlab
client scope. - Click
Add
->Default
.
SSO Configuration
Retrieve the client_secret
from the Keycloak client:
- As a Keycloak Admin and within the
smoothglue
realm, clickClients
on the left-hand panel. - Click on the
gitlab
client. - Click on the
Credentials
tab. - Copy the value from the
Client Secret
field.
Add the following values to the bigbang-secrets.yaml
to configure SSO:
addons:
gitlab:
sso:
enabled: true
client_id: "gitlab" # should match the client name in keycloak
client_secret: "<Client Secret copied from Keycloak>"
info
See How to Configure Big Bang Values for more information on configuring Big Bang applications.