Set Up Single Sign-On for Atlassian Products
This guide provides step-by-step instructions for setting up single sign-on (SSO) on Jira, using miniOrange and Keycloak.
Prerequisites
- Access to Keycloak Master Realm
- Make sure you have an instance of Jira up and running.
- Do not log into the Atlassian app until instructed in the following steps.
Initial Setup in Jira
Log In as Administrator User
- Navigate to Jira and log in as the administrator (admin) user.
- Complete the initial settings as prompted. Select "Start with a blank project", if unsure.
Navigate to Manage Apps
- Click on the Settings gear icon in the top-right corner.
- Select Manage Apps. Note: For Jira, also click Manage Apps on the left side.
Non Air-Gapped Environment
- Click on
Find new apps. - Search for
miniorange. - From the results, click on
Single Sign On (SSO) via OAuth and OpenID for Jira. - Click on
Free trial, install the app.
Air-Gapped Environment
- Scroll to the bottom, and click
Settings. - Uncheck
Connect to the Atlassian Marketplace, and clickApply. - Click
Upload app. - Install the Jira miniOrange app file that was uploaded to an S3 bucket as part of your data transfer. It is available at the following link: https://marketplace.atlassian.com/apps/1217688/single-sign-on-sso-via-oauth-openid-for-jira-dc-and-cloud/version-history
Activate License
- Click on
Manage appsagain. - Select the
miniOrangeapp, paste your valid miniOrange SSO app license key, and clickUpdate.
Keycloak Configuration
SmoothGlue will automatically configure this client out of the box. This serves primarily as reference if opting out of the auto-SSO feature. Skip to Retrieve Client Secret if not manually setting up the Keycloak client.
Navigate to Keycloak and Select Realm
- Log in to Keycloak as an
adminuser. - Make sure to select the appropriate realm (
smoothglue).
Create OpenID Connect Client
- While you are in the
smoothgluerealm, click onClientsunderManagein the left pane. - Click
Create client. - Enter client name
jiraforClient ID. - Click on the
Nextbutton. - Toggle on
Client authentication. - Click on the
Nextbutton. Note: The application's FQDN name may be obtained by runningkubectl get virtualservice -A - Enter
https://{{ application_fqdn }}/plugins/servlet/oauth/callbackforValid Redirect URIs. - Click on the
Savebutton.
Retrieve Client Secret
Retrieve the client_secret from the Keycloak client:
- As a Keycloak Admin and within the
smoothgluerealm, clickClientson the left-hand panel. - Click on the
jiraclient. - Click on the
Credentialstab. - Copy the value from the
Client Secretfield.
Final Configuration in Jira
Configure OAuth in miniOrange Plugin
- Navigate to the miniOrange plugin in Jira.
- Click on Add New App, enter
Keycloak. - Select Keycloak version as
18 or above. - Custom App Name as
keycloak. - Client Id as
jira. - Client Secret from the earlier section.
- Scope as
openid. - Domain URL as
https://{{ keycloak_fqdn }}/auth. - Realm name as
smoothglue. - Logout Endpoint as
https://{{ keycloak_fqdn }}/auth/realms/smoothglue/protocol/openid-connect/logout. - Click on Save.
- You can click on
Test Configurationto verify that you are presented with the Keycloak login screen.
Configure Jira User Server
In SmoothGlue, Jira is intended to be the primary user store for Jira and Confluence. Users are dynamically created when logging in from Keycloak. Please use the following steps to setup the Jira User Server:
- Login to Jira as an administrator.
- Click on the Settings gear icon in the top-right corner.
- Click
User management. - Click
Jira user serverin the left-hand panel. - Click
Add application. - Enter
confluencefor Application name. - Enter a password a sufficiently long password.
- Enter 0.0.0.0/0 for IP Addresses.
- Click Save.
Create Confluence Groups
By default, Confluence has two groups that assign privileges to users:
confluence-usersconfluence-administrators
A System Integrator needs to create these groups from Jira so that users can be assigned one or both of these two groups from Console.
- Login to Jira as an administrator.
- Click on the Settings gear icon in the top-right corner.
- Click
User management. - Click
Groupsin the left-hand panel. - On the right-side enter
confluence-usersand clickAdd group - On the right-side enter
confluence-administratorsand clickAdd group