Skip to main content

Command Palette

Search for a command to run...

Setting Up SAML Single Sign-On in Jira with Keycloak IDP

Updated
3 min read
Setting Up SAML Single Sign-On in Jira with Keycloak IDP

In the latest Jira products, including Jira Software and Jira Service Management, users can configure their own SAML/OAuth2 Identity Provider (IDP) without needing any plugins or extensions. This guide will help you configure SAML in your Jira application using Keycloak as the SAML IDP.

1. Create Keycloak SAML client as Identity Provider

  • Log in to your Keycloak account, select your realm to create your client for Jira authentication

  • Navigate ClientCreate client

  • Configure the client with the following required values:

KeyValue
Client IDhttps://{jira_host}
Root URLhttps://{jira_host}/
Home URLhttps://{jira_host}/
Valid redirect URIshttps://{jira_host}/*
IDP-Initiated SSO URL namehttps://{keycloak_host}/realms/master/protocol/saml
Master SAML Processing URLhttps://{jira_host}/plugins/servlet/samlconsumer
Name ID formatemail
Force name ID formatOn
Force POST bindingOn
Include AuthnStatementOn
Sign documentsOn
Sign assertionsOn

  • Switch to Key tab, turn off Signing keys config:

  • Switch to Client scopes tab:

  • Next, config Group list and User Property:

    • Configure a new mapper:

      • Add memberOf as Group list to allow Jira to get your member groups:

      • Add firstName , lastName , email as User Property to allow Jira to get users information

  • Switch to Advanced tab, config https://{jira_host}/plugins/servlet/samlconsumer as Assertion Consumer Service POST Binding URL and Logout Service POST Binding URL:

  • Navigate Realms Setting, choose Key tab, see RS256 and copy and remember the Certificate for next step:


2. Config Jira authentication method

The latest Jira products support authentication methods that allow authentication via SAML/OAuth2:

Now, let's configure SAML as Single Sign-On in Jira. I will use Jira Service Management as an example:

  1. Access https://{jira_host}/plugins/servlet/authentication-config (change your DNS) or click the top right gear icon, choose System, navigate Authentication methods in left navbar, choose Add configuration. Fill the Name and choose SAML as Authentication method

  2. Next fill the Name and required options for SAML SSO settings as table below:

KeyValue
Single sign-on issuerhttps://{keycloak_host}/realms/{realms}
Identity provider single sign-on URLhttps://{keycloak_host}/realms/{realms}/protocol/saml
X.509 CertificatePaste certificate which obtain in previous step
Username mapping${NameID}
Name ID PolicyEmail Address
Sign requestsOff/Uncheck
  1. If you want JIT to allow users to be created and updated automatically when they log in through SSO to Atlassian Data Center applications, specify as below:

  1. Config remain options and click Save configuration to finish:

  2. Back to Authentication methods, we have configured SAML:

  3. Click Action, Test sign-in

  4. Login with your SAML account, and then we accessed Jira:


You have successfully configured SAML authentication for Jira Service Management using Keycloak as the Identity Provider. This setup will streamline the login process for your Jira applications, making it easier for users to access them.

More from this blog

N

Nhật Trường | DevOps, SecOps & Platforms

17 posts

Hi, I’m Nhật Trường - a DevOps Engineer who never deploys on Fridays, just write YAML, chat with AI, make things secure, automate what I can, debug what I must ^^ 🚀