SAML Single Sign On (SSO) into Jenkins using Ping Federate as IDP


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

Step 1:Setup PingFederate as Identity Provider

All the information required to configure the Ping Federate as SAML IDP i.e. plugin’s metadata is given in the Service Provider Info tab of the miniOrange plugin.


  • Login to your Ping Federate user admin dashboard.
  • Click on the Identity Provider in the left navigation menu.
  • Under SP CONNECTION, click on Create New button.

    SAML Single Sign On (SSO) using PingFederate Identity Provider, Add New SP Connection
  • Select the Browser SSO Profiles connection template on the Connection Type tab and click Next.

    SAML Single Sign On (SSO) using PingFederate Identity Provider, SSO Connection type
  • Select Browser SSO on the Connection Options tab and click Next.

    SAML Single Sign On (SSO) using PingFederate Identity Provider, SSO Connection Options
  • Select File as the method for importing metadata and click Choose file to choose the miniOrange SSO plugin’s metadata on the Import Metadata tab. Click Next.

    SAML Single Sign On (SSO) using PingFederate Identity Provider, Import Metadata
  • Review the information on the Metadata Summary tab and click Next.
  • In the General Info tab ensure that the Service Provider’s Entity ID, Connection Name, and Base URL fields pre-populate based on the metadata. Click Next.
  • Navigate to the Browser SSO tab and click on the Configure Browser SSO. You will be redirected to Browser SSO Setup wizard.

      1) Select the IdP-Initiated SSO and SP-Initiated SSO options on the SAML Profiles tab and click     Next.

      SAML Single Sign On (SSO) using PingFederate Identity Provider, Browser SSO Profile 2) Enter your desired assertion validity time from on the Assertion Lifetime tab and click Next.     By default, it is configured 5 minutes for both.

      3) Navigate to the Assertion Creation and click on the Configure Assertion Creation. You will be redirected to the assertion creation setup wizard.

        I. In the Identity Mapping tab select STANDARD and click Next.

        II. Select a Subject Name Format for the SAML_SUBJECT on the Attribute Contract tab and click Next.

        III. Click Map New Adapter Instance on the Authentication Source Mapping.

        SAML Single Sign On (SSO) using PingFederate Identity Provider, Assertion Creation IV. Select an Adapter Instance and click Next. The adapter must include the user’s email     address.

        SAML Single Sign On (SSO) using PingFederate Identity Provider, Select Adapter Instance V. Select the Use only the adapter contract values in the SAML assertion option on the     Mapping Method tab and click Next.

        VI. Select your adapter instance as the Source and the email as the Value on the Attribute     Contract Fulfilment tab and click Next.

        SAML Single Sign On (SSO) using PingFederate Identity Provider, Attribute Contract Settings VII. (Optional) Select any authorization conditions you would like on the Issuance Criteria        tab and click Next.

        VIII. Click Done on the Summary.

        IX. Click Next on the Authentication Source Mapping tab.

        X. Click Done on the Summary tab.

        XI. Click Next on the Assertion Creation

    1. Navigate to the Protocol Settings tab of the Browser SSO wizard and click on the Configure Protocol settings.

        1) Select POST for Binding and specify the single sign-on endpoint URL in the Endpoint     URL field on the Assertion Consumer Service URL. Click Next.

        SAML Single Sign On (SSO) using PingFederate Identity Provider, SSO Protocol Settings 2) Select POST on the Allowable SAML Bindings tab and click Next.

        3) Select your desired signature policies for assertions on the Signature Policy tab and     click Next.

        SAML Single Sign On (SSO) using PingFederate Identity Provider, Signature Policy for Assertion 4) Select your desired encryption policy for assertions on the Encryption Policy tab and     click Next.

        5) Click Done on the Protocol Settings Summary tab.

        6) Click Done on the Browser SSO Summary.

  • Navigate to the Credentials and click on the Configure Credentials. You will be redirected to the Credentials setup wizard.
      1) Select the Signing Certificate to use with the Single Sign-On service and select Include the certificate in the signature element in the Digital Signature Settings tab. Click Done.

      SAML Single Sign On (SSO) using PingFederate Identity Provider, Digital Signature Settings 2) Click Done on the Summary.

      3) Click Next on the Credentials.

  • Select Active for the Connection Status on the Activation & Summary tab and click Save.
  • Now, navigate to the Ping Federate User Admin dashboard Identity Provider.
  • Click Manage All under SP Connections.
  • Click Export Metadata for the desired service provider connection.
  • Click Export on the Export & Summary tab and click Done.

Step 2: Download and install the plugin in Jenkins.

    To Setup the miniorange saml SP plugin follow the path:

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

Step 3: Activate the plugin

  • Open Manage Jenkins and select Configure Global Security.
  • sso saml jenkins single sign on configure security-5
  • Set the Security Realm as miniorange SAML 2.0.
  • sso saml jenkins single sign on security realm-6
  • 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 -6

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