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 apps
again. - Select the
miniOrange
app, paste your valid miniOrange SSO app license key, and clickUpdate
.
Keycloak Configuration
Navigate to Keycloak and Select Realm
- Log in to Keycloak as an
admin
user. - Make sure to select the appropriate realm (
smoothglue
).
Create OpenID Connect Client
- While you are in the
smoothglue
realm, click onClients
underManage
in the left pane. - Click
Create client
. - Enter client name
jira
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 }}/plugins/servlet/oauth/callback
forValid Redirect URIs
. - Click on the
Save
button.
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
jira
client. - Click on the
Credentials
tab. - Copy the value from the
Client Secret
field.
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 Enpoint as
https://{{ keycloak_fqdn }}/auth/realms/smoothglue/protocol/openid-connect/logout
. - Click on Save.
- You can click on
Test Configuration
to 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 server
in the left-hand panel. - Click
Add application
. - Enter
confluence
for 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-users
confluence-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
Groups
in the left-hand panel. - On the right-side enter
confluence-users
and clickAdd group
- On the right-side enter
confluence-administrators
and clickAdd group