SSO Login into Confluence using Drupal as OAuth / OpenID Connect Provider
Overview
The Drupal OAuth/OIDC Server module enables Single Sign-On i.e. SSO between the Drupal site and any Client application that supports the OAuth or OpenID Connect protocol. Here, we go through the steps to connect the module with the Confluence. In this Integration of Drupal and Confluence, Drupal acts as an Identity Provider i.e. users will be logging into Confluence using their Drupal credentials.
Configuration Steps
Set up Confluence as an OAuth Client:
- Log into the Confluence server.
- In the top right corner, click on the Settings icon -> Manage apps.
- Click on the Find new apps link.
- Search for mO Confluence OAuth under the search bar and install it.
- Once the mO Confluence OAuth SSO app is installed, click on the Configure button
- Click on the Add New Provider button.
- Select Custom OAuth from under the Select your Provider section.
- Copy the Callback URL and keep it handy.
- Enter the Application Name in the App Name text field.
Create SSO Application in Drupal:
- Navigate to the Drupal site and go to the Configuration -> miniOrange OAuth server configuration -> OAuth Client tab.
- Click on the Add Client button to add a new application.
- Enter the name of your application under the Application Name text field.
- Paste the copied Callback URL into the Callback/Redirect URL text field. You can add multiple Callback URLs by clicking on the Add More button next to the Callback/Redirect URL text field.
- Click on the Save button.
Integrating Confluence with Drupal:
- Navigate to the OAuth Client tab of the Drupal OAuth Server module, go to the Configure Applications section and copy the Client ID.
- Navigate to the Confluence dashboard and paste the copied Client ID into the Client ID text field.
- Navigate back to the Drupal site and copy the Client Secret.
- Paste the copied Client Secret into the Client Secret text field of your app in the Confluence dashboard.
- Add the Scope and Endpoints as specified in the table below (You can also get the same from the Scope & Endpoints section of the Drupal site → Configuration → miniOrange OAuth server configuration → OAuth Client):
Scope | profile openid email |
---|---|
Authorization Endpoint | {base_url_of_the_drupal_site}/mo/oauth2/authorize |
Token Endpoint | {base_url_of_the_drupal_site}/mo/oauth2/token |
Get User Information Endpoint | {base_url_of_the_drupal_site}/mo/oauth2/userinfo |
- Click on the Save button.
Test Connection between Confluence and Drupal:
- Now, click on the Test Configuration button to test the connection between Confluence and Drupal site.
You have successfully configured Confluence as an OAuth Client and Drupal as an OAuth Server.
Let’s see how this works:
- Open a new window/private browser and navigate to the login page of the Confluence website.
- Click on the Use OAuth Login button.
- Enter the Drupal credentials and click on the Log in button.
- You will be logged into Confluence using Drupal credentials.
You have successfully performed the SSO between Confluence and Drupal.
Need Assistance?
If you face any issues during the configuration or if you want some additional features, please contact us at drupalsupport@xecurify.com.