3 KiB
type | stage | group | info |
---|---|---|---|
reference | Manage | Access | To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments |
Atlassian OmniAuth Provider (FREE SELF)
To enable the Atlassian OmniAuth provider for passwordless authentication you must register an application with Atlassian.
Atlassian application registration
- Go to https://developer.atlassian.com/console/myapps/ and sign-in with the Atlassian account to administer the application.
- Click Create a new app.
- Choose an App Name, such as 'GitLab', and click Create.
- Note the
Client ID
andSecret
for the GitLab configuration steps. - On the left sidebar under APIS AND FEATURES, click OAuth 2.0 (3LO).
- Enter the GitLab callback URL using the format
https://gitlab.example.com/users/auth/atlassian_oauth2/callback
and click Save changes. - Click + Add in the left sidebar under APIS AND FEATURES.
- Click Add for Jira platform REST API and then Configure.
- Click Add next to the following scopes:
- View Jira issue data
- View user profiles
- Create and manage issues
GitLab configuration
-
On your GitLab server, open the configuration file:
For Omnibus GitLab installations:
sudo editor /etc/gitlab/gitlab.rb
For installations from source:
sudo -u git -H editor /home/git/gitlab/config/gitlab.yml
-
See Initial OmniAuth Configuration for initial settings to enable single sign-on and add
atlassian_oauth2
as an OAuth provider. -
Add the provider configuration for Atlassian:
For Omnibus GitLab installations:
gitlab_rails['omniauth_providers'] = [ { name: "atlassian_oauth2", app_id: "YOUR_CLIENT_ID", app_secret: "YOUR_CLIENT_SECRET", args: { scope: 'offline_access read:jira-user read:jira-work', prompt: 'consent' } } ]
For installations from source:
- name: "atlassian_oauth2", app_id: "YOUR_CLIENT_ID", app_secret: "YOUR_CLIENT_SECRET", args: { scope: 'offline_access read:jira-user read:jira-work', prompt: 'consent' }
-
Change
YOUR_CLIENT_ID
andYOUR_CLIENT_SECRET
to the Client credentials you received in application registration steps. -
Save the configuration file.
-
Reconfigure or restart GitLab for the changes to take effect if you installed GitLab via Omnibus or from source respectively.
On the sign-in page there should now be an Atlassian icon below the regular sign in form. Click the icon to begin the authentication process.
If everything goes right, the user is signed in to GitLab using their Atlassian credentials.