0
0
Jenkinsdevops~10 mins

Authentication methods (LDAP, SAML) in Jenkins - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to enable LDAP authentication in Jenkins configuration.

Jenkins
securityRealm = new [1]SecurityRealm("ldap://ldap.example.com")
Drag options to blanks, or click blank then click option'
ALdap
BSaml
COAuth
DLocal
Attempts:
3 left
💡 Hint
Common Mistakes
Using SamlSecurityRealm instead of LdapSecurityRealm
Using OAuth or Local which are unrelated here
2fill in blank
medium

Complete the code to set the LDAP server URL in Jenkins.

Jenkins
securityRealm.setServer("[1]")
Drag options to blanks, or click blank then click option'
Aldap://ldap.example.com
Bhttps://ldap.example.com
Chttp://ldap.example.com
Dftp://ldap.example.com
Attempts:
3 left
💡 Hint
Common Mistakes
Using http:// or https:// instead of ldap://
Using ftp:// which is incorrect
3fill in blank
hard

Fix the error in the SAML authentication configuration snippet.

Jenkins
securityRealm = new [1]SecurityRealm()
Drag options to blanks, or click blank then click option'
ALdap
BOAuth
CLocal
DSaml
Attempts:
3 left
💡 Hint
Common Mistakes
Using LdapSecurityRealm or OAuthSecurityRealm instead of SamlSecurityRealm
4fill in blank
hard

Fill both blanks to configure SAML IdP URL and Jenkins root URL.

Jenkins
securityRealm.setIdpMetadata([1])
jenkinsLocationConfiguration.setUrl([2])
Drag options to blanks, or click blank then click option'
A"https://idp.example.com/metadata"
B"http://jenkins.example.com/"
C"https://jenkins.example.com/"
D"http://idp.example.com/metadata"
Attempts:
3 left
💡 Hint
Common Mistakes
Using HTTP instead of HTTPS for IdP metadata
Using HTTP Jenkins URL when HTTPS is available
5fill in blank
hard

Fill all three blanks to create a Jenkins LDAP security realm with root DN and user search base.

Jenkins
securityRealm = new LdapSecurityRealm("[1]", "[2]", "[3]", null, null, false, null, null)
Drag options to blanks, or click blank then click option'
Aldap://ldap.example.com
Bdc=example,dc=com
Cou=users
Dcn=admin,dc=example,dc=com
Attempts:
3 left
💡 Hint
Common Mistakes
Using admin DN instead of root DN
Mixing user search base with root DN