SAML Single Sign On (SSO) into Jenkins using JumpCloud As IDP


Jenkins SAML SSO app gives the ability to enable SAML Single Sign-On (SSO) for Jenkins. Here we will go through a guide to configure Single Sign On (SSO) between Jenkins and JumpCloud. By the end of this guide, JumpCloud users should be able to log in and register to Jenkins.

Step 1: Setup JumpCloud as Identity Provider

  • Log in to your JumpCloud Administrator account.
  • SAML Single Sign-On (SSO) using JumpCloud (IdP),login page
  • Go to SSO tab and click on + icon given on the page for adding a new SSO app.
  • SAML Single Sign-On (SSO) using JumpCloud (IdP), new SSO
  • Click on the Custom SAML App button.
  • SAML Single Sign-On (SSO) using JumpCloud (IdP), Custom App
  • On the New Application page, provide a name and description (optional) for your app and then scroll down.

    Step 1.1: Import Metadata file

  • Download SP metadata from SP Information tab of the plugin.
  • SAML Single Sign-On (SSO) using JumpCloud (IdP), JumpCloud Download MetaData
  • In the JumpCloud New Application page, click on the Upload Metadata button and upload the SP metadata file.
  • SAML Single Sign-On (SSO) using JumpCloud (IdP), SP Info
  • Enter details manually from the SP Information tab.
  • SAML Single Sign-On (SSO) using JumpCloud (IdP), JumpCloud-Manual Configuration
    Fields to be filled in JumpCloud Corresponding details to be copied from the plugin
    SP Entity ID SP Entity ID/ Issuer
    ACS URL ACS URL
    SP Certificate Certificate (Download the file and upload here)
    IdP Entity ID Enter a unique IdP Entity ID of your choice

Step 1.2: Attribute Mapping

  • Go to the Attributes section and click the add attribute button.
  • In the left-side input field provide Attribute Name to be sent in SAML assertion and, select the appropriate attribute value from the dropdown given on the right side. (e.g. Below we have provided userName as attribute and selected username from the dropdown). Similarly add all the attributes you wish to provision to Jira.
  • SAML Single Sign-On (SSO) using JumpCloud (IdP), Attribute Mapping

Step 1.3: Group Mapping

  • In the Group Attributes section enable the checkbox and provide the group attribute name.
  • Go to the User Groups tab. Here you can select which groups will have access to this SSO app. This is an important step to allow users to perform SSO with JumpCloud.
  • SAML Single Sign-On (SSO) using JumpCloud (IdP), Group Mapping
  • Click on the activate button given at the bottom and then click on Continue in the confirmation dialog box.
  • On the SSO tab, select the checkbox given in front of the newly created application and click on the export metadata button. IDP metadata file will be downloaded.
  • SAML Single Sign-On (SSO) using JumpCloud (IdP), Export Metadata

Step 2: Download and install the plugin in Jenkins

    To setup the miniorange Jenkins SAML SP plugin follow the path:

  • Login to your Jenkins Admin Account.
  • SSO SAML Jenkins single sign on manage jenkins, Jenkins SAML SSO
  • Go to Manage Jenkins option from the left pane, and open Manage Plugins tab.
  • SSO SAML Jenkins single sign onmanage plugins, Jenkins SAML SSO
  • Go to the advanced tab and upload the hpi file.
  • SSO SAML Jenkins single sign onupload plugin, Jenkins SAML SSO
  • Follow the instructions shown on screen and restart the Jenkins.
  • SSO SAML Jenkins single sign on install plugins, Jenkins SAML SSO

Step 3: Activate the plugin

  • Open Manage Jenkins and select Configure Global Security.
  • SSO SAML Jenkins single sign on configure security, Jenkins SAML SSO
  • Set the Security Realm as miniorange SAML 2.0.
  • SSO SAML Jenkins single sign on security realm, Jenkins SAML SSO
  • Make sure that Enable Security checkbox is checked.
SP Configurations
You can configure SP settings in IDP in 2 ways:

  • By uploading Metadata XML file
  • Manual Configuration
A. By uploading Metadata XML file

  • Click on Service Provider Metadata in SP Configuration section.
  • Metadata xml file will be downloaded.
  • Use this file to setup IDP.
B. Manual Configuration

  • To Configure SP Settings at IDP copy below URL and paste in respective fields at IDP end.
    • SP Entity ID: https://your-jenkins-domain
    • Audience URI: https://your-jenkins-domain
    • ACS URL: https://your-jenkins-domain/securityRealm/moSamlAuth
    • sso saml jenkins single sign on SP Configuration Jenkins
IDP Configuration

To Configure IDP enter the following details and press apply and save the settings.

  • IDP Entity ID
  • Single Sign On URL
  • Name ID Format
  • X.509 Certificate
sso saml jenkins single sign on idp metadata

User Profile Configuration

  • Select Username or Email for Login Jenkins account by:
  • Enter the attribute name from IDP which corresponds to Username in Username Attribute textbox.
  • Enter the attribute name from IDP which corresponds to Email in Email Attribute textbox.
  • Select the checkbox Apply regex Pattern to the UserNameif the userID returned from SAML is not same as username of Jenkins.
  • Enter the regular expression in REGEX Pattern textbox. It will be applied on user ID from SAML Response and will convert it into the username same as Jenkins. For example, you can use regular expression ^.*?(?=@) to extract demo from username demo@example.com
  • sso saml jenkins single sign on User Profile Jenkins


Advanced Configurations

  • Select the Do you want to create a new users? to allow user creation through SAML.
  • sso saml jenkins single sign on Advanced Configuration Jenkins


SP Configurations
You can configure SP settings in IDP in 2 ways:

  • By uploading Metadata XML file
  • Manual Configuration
A. By uploading Metadata XML file

  • Click on Service Provider Metadata in SP Configuration section.
  • Metadata xml file will be downloaded.
  • Use this file to setup IDP.
B. Manual Configuration

  • To Configure SP Settings at IDP copy below URL and paste in respective fields at IDP end.
    • SP Entity ID: https://your-jenkins-domain
    • Audience URI: https://your-jenkins-domain
    • ACS URL: https://your-jenkins-domain/securityRealm/moSamlAuth
    • sso saml jenkins single sign on SP Configuration Jenkins
IDP Configuration

To Configure IDP enter the following details and press apply and save the settings.

  • IDP Entity ID
  • Single Sign On URL
  • Single Logout URL
  • Name ID Format
  • X.509 Certificate
  • sso saml jenkins single sign on idp Configuration Jenkins

User Profile Configuration

  • Select Username or Email for Login Jenkins account by:
  • Enter the attribute name from IDP which corresponds to Username in Username Attribute textbox.
  • Enter the attribute name from IDP which corresponds to Email in Email Attribute textbox.
  • Enter the attribute name from IDP which corresponds to full name in Full Name Attribute.
  • Select the checkbox Apply regex Pattern to the UserNameif the userID returned from SAML is not same as username of Jenkins.
  • Enter the regular expression in REGEX Pattern textbox. It will be applied on user ID from SAML Response and will convert it into the username same as Jenkins. For example, you can use regular expression ^.*?(?=@) to extract demo from username demo@example.com
  • sso saml jenkins single sign on User Profile Jenkins


Advanced Configurations

  • Select the Do you want signed requests? to send signed login and logout requests. Requests will be signed using public certificate from option Download SP Certificate in SP Configuration section.
  • Select the Do you want to create a new users? to allow user creation through SAML.
  • Select the Do you want to update Attributes of Existing Users? to update attributes of existing user's each time they sign in Jenkins through SSO.
  • To Add custom AttributeS select Add option.
    • Set Attribute Name as the one set in IDP eg. lname
    • Set display name in user proprties as one you want it appear in jenkins user's config.xml file and in user's configure tab.
  • To assign default group to users created through SSO add group name in Assign group to new Users option. Multiple groups can be added using ,(Comma) separater
  • If Do you want to disable Default login option is enabled, any unauthenticated user trying to access the default Jenkins login page will get redirected to the IDP login page for authentication. After successful authentication, they will be redirected back to the Jenkins base URL.
  • Copy backdoor URL and save it for emergency.
  • sso saml jenkins single sign on Advanced Configuration Jenkins



Hello there!

Need Help? We are right here!

support
Contact miniOrange Support
success

Thanks for your inquiry.

If you dont hear from us within 24 hours, please feel free to send a follow up email to info@xecurify.com