Configure single sign-on and test its functionality.
Outcomes
Configure SSO integration with IdM.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise:
[student@workstation ~]$ lab start products-sso
Instructions
Log in to the utility machine and become the root user:
[student@workstation ~]$ssh utility[student@utility ~]$sudo -i[sudo] password for student:student
Log in to the LAB.EXAMPLE.COM Kerberos realm to verify that the utility machine is configured as IdM client.
Verify that the utility machine has access to the realm.
[root@utility ~]#kinit adminPassword for admin@LAB.EXAMPLE.COM:RedHat123^
Log out of the utility machine.
[root@utility ~]#logout[student@utility ~]$logoutConnection to utility closed. [student@workstation ~]$
Navigate to the SSO web console at http://utility.lab.example.com:8080 and configure the ldap realm to use the IdM LDAP server.
Log in as the admin user with RedHat123^ as the password.
Navigate to → and verify that the field is set to ldap, indicating that you are in the ldap realm.
Navigate to → , click , and select ldap from the list.
Use the following values to configure the ldap realm:
| Property | Value |
|---|---|
| Enabled |
ON
|
| Console Display Name |
ldap
|
| Priority | 0 |
| Import Users |
ON
|
| Edit Mode |
READ_ONLY
|
| Sync Registrations |
OFF
|
| Vendor |
Red Hat Directory Server
|
| Username LDAP attribute |
uid
|
| RDN LDAP attribute |
uid
|
| UUID LDAP attribute |
ipaUniqueID
|
| User Object Classes |
inetOrgPerson, organizationalPerson
|
| Connection URL |
ldaps://idm.lab.example.com:636
|
| Users DN |
cn=users,cn=accounts,dc=lab,dc=example,dc=com
|
| Search Scope |
One Level
|
| Bind Type |
simple
|
| Bind DN |
uid=admin,cn=users,cn=accounts,dc=lab,dc=example,dc=com
|
| Bind Credential |
RedHat123^
|
Click and then click .
Log in to the client machine and start a Kerberos session.
Log in to the client machine as the student user:
[student@workstation ~]$ ssh clientStart a Kerberos session as the admin user with the RedHat123^ password
[student@client ~]$kinit adminPassword for admin@LAB.EXAMPLE.COM:RedHat123^
Verify that the idmuser03 exists in IdM:
[student@client ~]$ipa user-find idmuser03-------------- 1 user matched -------------- User login:idmuser03...output omitted...
Verify that SSO uses IdM as identity provider by getting an OpenID Connect token.
Log out of the client machine to return to the workstation machine:
[student@client ~]$ logout
Connection to client closed.
[student@workstation ~]$On the workstation machine, change to the ~/materials/labs/products-sso/ directory and run the get_token.sh script to get an OpenID Connect token from the SSO server for the idmuser03 in the ldap SSO realm.
[student@workstation ~]$cd materials/labs/products-sso[student@workstation products-sso]$./get_token.sh idmuser03 RedHat123^ ldap{"access_token":"eyJhbGciOiJS... ...output omitted...
Return to the student user home directory:
[student@workstation products-sso]$ cd
[student@workstation ~]$