Set Up Single Sign-On for Confluence
This guide provides step-by-step instructions for setting up single sign-on (SSO) on Confluence, using miniOrange and Keycloak.
Prerequisites
- Access to Keycloak Master Realm
- Make sure you have an instance of Confluence up and running.
- Do not log into the Atlassian app until instructed in the following steps.
Initial Setup in Confluence
Log In as Administrator User
- Navigate to Confluence 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.
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 Confluence
. - 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 Confluence 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/1218360/mo-confluence-oauth-sso-confluence-openid-connect-oidc-sso/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
confluence
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
confluence
client. - Click on the
Credentials
tab. - Copy the value from the
Client Secret
field.
Final Configuration in Confluence
Configure OAuth in miniOrange Plugin
- Navigate to the miniOrange plugin in Confluence.
- Click on Add New App, enter
Keycloak
. - Select Keycloak version as
18 or above
. - Custom App Name as
keycloak
. - Client Id as
confluence
. - 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 Confluence User Server
Prerequisites:
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 configure Confluence to use the Jira User Server:
- Login to Confluence as administrator.
- Click on the Settings gear icon in the top-right corner.
- Click
General configuration
. - Click
User directories
in the left-hand panel. - Click
Add Directory
and select typeAtlassian Crowd
. - Click
Next
. - Enter
Jira Server
for Name. - Enter
http://jira.jira.svc.cluster.local
for Server URL. - Enter
confluence
for Application Name. - Enter the password that you defined for your Confluence application in the settings on Jira.
- Enter 15 for Synchronization Interval (minutes).
- Click Test Settings. You should see
Connection test successful.
message displayed. - Click Save and Test to finalize the configuration.