Configure Red Hat's single sign-on technology and automation controller to use IdM for user authentication, and verify user authorization.
Outcomes
Configure automation controller to use IdM as its authentication engine and store.
Configure Red Hat single sign-on (SSO) to use IdM as its authentication engine.
Save any work you want to keep from earlier exercises, and then reset the controller and utility machines.
As the student user on the workstation machine, use the lab command to prepare your environment for this exercise, and to ensure that all required resources are available:
[student@workstation ~]$ lab start products-review
Instructions
On the idm machine, create the controller LDAP bind account.
Log in to the idm machine as student, and become the root user.
[student@workstation ~]$ssh idm[student@idm ~]$sudo -i[sudo] password for student:student
Authenticate as the admin user with RedHat123^ as the password.
[root@idm ~]#kinit adminPassword for admin@LAB.EXAMPLE.COM:RedHat123^
Create the controller user such that it has access to read the entire IdM LDAP structure.
Authenticate as the Directory Manager user with the password RedHat123^.
[root@idm ~]#ldapmodify -x -D 'cn=Directory Manager' -W <<EOFdn: uid=controller,cn=sysaccounts,cn=etc,dc=lab,dc=example,dc=comchangetype: addobjectclass: accountobjectclass: simplesecurityobjectuid: controlleruserPassword: controller123passwordExpirationTime: 20280101000000ZnsIdleTimeout: 0EOFEnter LDAP Password:RedHat123^adding new entry "uid=controller,cn=sysaccounts,cn=etc,dc=lab,dc=example,dc=com"
Log out of the idm machine:
[root@idm ~]#logout[student@idm ~]$logoutConnection to idm closed.
Configure the controller machine to trust the self-signed CA certificate of IdM.
Log in to the controller machine and change to the root user.
[student@workstation ~]$ssh controller[student@controller ~]$sudo -i[sudo] password for student:student[root@controller ~]#
Copy the IdM CA certificate to the /etc/pki/ca-trust/source/anchors/ directory:
[root@controller ~]#scp student@idm:/etc/ipa/ca.crt \/etc/pki/ca-trust/source/anchors/ipa_ca.crtPassword:studentca.crt 100% 1651 2.2MB/s 00:00
Update the trust list:
[root@controller ~]# update-ca-trustLog out of the controller machine:
[root@controller ~]#logout[student@controller ~]$logoutConnection to controller closed.
Configure automation controller for LDAP authentication using IdM.
Use the web UI at http://controller.lab.example.com.
On the workstation machine, open Firefox and connect to the automation controller web UI at http://controller.lab.example.com.
You might receive a warning because the automation controller is using a self-signed certificate. Click , and then if required.
Log in with the admin account, using redhat as the password.
Navigate to then under click . Click at the bottom of the page.
In , enter ldap://idm.lab.example.com:389.
In , enter controller123.
In the field, select .
In the field, enter uid=controller,cn=sysaccounts,cn=etc,dc=lab,dc=example,dc=com.
Click .
Configure access to the automation controller web UI so that IdM users in the productsgroup04 group are denied.
Configure automation controller for LDAP User Search and LDAP Group Search.
In the field, enter the following details to deny access to users of the productsgroup04 IdM user group:
CN=productsgroup04,CN=groups,CN=accounts,DC=lab,DC=example,DC=com
In the field, enter the following details to indicate the location in the LDAP tree structure where user account information is kept and how user account information should be queried:
[ "CN=users,CN=accounts,DC=lab,DC=example,DC=com", "SCOPE_SUBTREE", "(uid=%(user)s)" ]
In the field, enter the following details to indicate the location in the LDAP tree structure where user account information is kept and how user account information should be queried:
[ "CN=groups,CN=accounts,DC=lab,DC=example,DC=com", "SCOPE_SUBTREE", "(objectClass=ipausergroup)" ]
Map the givenName, sn, and mail IdM user attributes to automation controller's first_name, last_name, and email data elements.
Configure automation controller so that IdM users in the productsgroup02 group are mapped to automation controller's superuser role.
In the field, enter the following details to create the user attributes mapping:
{
"first_name": "givenName",
"last_name": "sn",
"email": "mail"
}In the field, enter the following details:
{
"is_superuser": "CN=productsgroup02,CN=groups,CN=accounts,DC=lab,DC=example,DC=com"
}Click , and then log out of the automation controller web UI.
As the productsuser02, verify that the LDAP authentication to the automation controller web UI and user attribute mapping are working correctly.
Navigate to → to verify the automation controller users.
Log in to the automation controller web UI as the productsuser02 IdM user with the controller123 password.
Navigate to → to see a list of user accounts created in automation controller.
Note the label against productsuser02, indicating that it is an external user account.
Note that the role for productsuser02 is System Administrator, due to the LDAP User Flags By Group configuration.
Click .
On the page, verify that the , , and fields have been populated with information from IdM as configured by the user attribute mapping created earlier.
Log out of the automation controller web UI.
Verify LDAP authentication to the automation controller web UI and user attribute mapping for the productsuser03 IdM user.
Log in to the automation controller web UI as the productsuser03 IdM user with controller123 as the password.
Navigate to → to display a list of user accounts created in automation controller.
Note that the role for productsuser03 is Normal User because it is not a member of productsgroup02.
Log out of the automation controller web UI.
Verify LDAP authentication to the automation controller web UI for the productsuser04 IdM user.
Configure the SSO server on the utility machine as an IdM client.
Log in to the utility machine and become the root user:
[student@workstation ~]$ssh utility[student@utility ~]$sudo -i[sudo] password for student:student
Verify that the utility machine is an IdM client:
[root@utility ~]#ipa-client-installThis program will set up IPA client. Version 4.10.0IPA client is already configured on this system.If you want to reinstall the IPA client, uninstall it first using 'ipa-client-install --uninstall'. The ipa-client-install command failed. See /var/log/ipaclient-install.log for more information
Verify that the SSO server has access to the realm:
[root@utility ~]#kinit adminPassword for admin@LAB.EXAMPLE.COM:RedHat123^[root@utility ~]#ipa host-find...output omitted... Host name: idm.lab.example.com Principal name: host/idm.lab.example.com@LAB.EXAMPLE.COM Principal alias: host/idm.lab.example.com@LAB.EXAMPLE.COM ...output omitted...
Log out of the utility machine:
[root@utility ~]#logout[student@utility ~]$logoutConnection to utility closed.
Navigate to the SSO web console at http://utility.lab.example.com:8080 and configure the idm realm to use the IdM LDAP server.
Use the admin user and RedHat123^ as the password to authenticate.
Navigate to → and verify you are in the idm realm.
Navigate to → .
![]() |
Click , choose ldap from the list, and add the following configuration settings:
| 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 authenticate as the admin user.
Verify that the idmuser04 user exists in IdM.
Verify that SSO uses IdM as the 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-review/ directory and run the get_token.sh script to get an OpenID Connect token from the SSO server for the idmuser04 user in the idm SSO realm.
[student@workstation ~]$cd materials/labs/products-review[student@workstation products-sso]$./get_token.sh idmuser04 RedHat123^ idm{"access_token":"eyJhbGciOiJS... ...output omitted...
Return to the student user home directory:
[student@workstation products-sso]$ cd
[student@workstation ~]$