You can configure SP settings in IDP in 2 ways:
A. By uploading Metadata XML file
B. Manual Configuration
- Click on Service Provider Metadata in SP Configuration section.
- Metadata xml file will be downloaded.
- Use this file to setup IDP.
- 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
To Configure IDP enter the following details and press
and save the settings.
User Profile Configuration
- IDP Entity ID
- Single Sign On URL
- Single Logout URL
- Name ID Format
- X.509 Certificate
- 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 email@example.com
- 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.