Customize Red Hat Single Sign-On to enhance authentication security in the realm.
Outcomes
Configure authentication options.
Configure password policies for the users.
Configure required actions for log in.
Manage SSO sessions.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
This command ensures that the RH-SSO realm is configured.
[student@workstation ~]$ lab start auth-customauth
Procedure 3.3. Instructions
Log in as the admin user in the RH-SSO Admin Console.
On the workstation machine, use Firefox to navigate to the RH-SSO web UI URL at https://sso.lab.example.com:8080.
Click .
Log in as the admin user with redhat as the password.
By default, the main page shows the menu for the rhtraining realm.
Activate user registration in the rhtraining realm.
From within the → menu, click .
Set the button to ON, and then click .

Log in to finance-webapp and register a new user.
Open a terminal on the workstation machine and change to the ~/DO313/labs/auth-customauth/finance-webapp directory.
[student@workstation ~]$ cd ~/DO313/labs/auth-customauth/finance-webappFrom the terminal, compile and run the finance-webapp application.
[student@workstation finance-webapp]$mvn quarkus:dev[INFO] Scanning for projects... [INFO] [INFO] ---------------------< com.example:finance-webapp >--------------------- [INFO] Building finance-webapp 1.0.0-SNAPSHOT ...output omitted... 2023-01-11 03:24:41,361 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. 2023-01-11 03:24:41,362 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, oidc, oidc-client, oidc-token-propagation, qute, reactive-routes, rest-client, rest-client-jackson, resteasy, resteasy-qute, security, servlet, smallrye-context-propagation, smallrye-jwt, vertx] Tests paused Press [r] to resume testing, [o] Toggle test output, [:] for the terminal, [h] for more options>
Leave the terminal open.
Open a new Firefox window and navigate to the finance web application at http://localhost:8080/finance.
Click .
In the rhtraining realm login page click .
Register the user based on the following criteria.
| Field | Value |
|---|---|
First name
|
Alice
|
Last name
|
Liddle
|
Email
|
alice@example.com
|
Username
|
alice
|
Password
|
alice
|
Confirm Password
|
alice
|
Notice that you are using the same word for the user and the password.
Click .
Leave the Firefox window open.
Add password policies to the rhtraining realm.
In the Firefox window with the RH-SSO Admin Console, click → .
Then, click .
In the dropdown button, select the following list of password policies. You must add the policies one by one.
Not Email
Uppercase Characters
Digits
Minimum Length

Notice that the Digits, the Uppercase Characters, and the Minimum Length password policies have a numeric parameter.
After adding all the password policies, click .
Register a new user from the finance-webapp client.
Open a new Firefox private window and navigate to the finance web application at http://localhost:8080/finance.
Click .
In the rhtraining realm login page click .
Register the user based on the following criteria.
| Field | Value |
|---|---|
First name
|
Robert
|
Last name
|
Liddle
|
Email
|
bob@example.com
|
Username
|
bob
|
Password
|
bob
|
Confirm Password
|
bob
|
Click . The RH-SSO login page does not allow that password in the preceding example.
Bob
BobBobBob
BobBobBob1
Only the BobBobBob1 password is accepted.
Force the alice user to change the password.
The password policies only apply to new users. You can force a user to change the password by configuring a required action just for that user.
In the Firefox window with the RH-SSO Admin Console, click → .
Click , and then, click the ID field of the alice user.
In the field, select the Update Password option.
Then, click
Open a new Chromium Web Browser incognito window and navigate to the finance web application at http://localhost:8080/finance.
Click .
Then, log in as the alice user with alice as the password.
The RH-SSO login page asks for a new password.
Try to change the password with the following list:
Alice
AliceAlice
AliceAlice1
Only the AliceAlice1 password is accepted.
Terminate all users sessions.
In the Firefox window with the RH-SSO Admin Console, click → .
There are two active sessions from the finance-webapp client application.
Click .
Click .
Hover over the button and read the warning message.

Close all private Firefox windows, and the Chromium Web Browser window.
Leave open only the RH-SSO Admin Console.
Open a new Firefox window, and navigate to the finance web application at http://localhost:8080/finance.
Click .
Then, log in as the bob user with BobBobBob1 as the password.
In the Firefox window with the RH-SSO Admin Console, navigate back to → , and click .
In the Firefox window with the finance web application, click again .
The access token has a lifespan of one minute. After one minute, the link asks to log in again.
(Optional) Force users to configure a One Time Password (OTP).
If you have a smart phone that can scan QR codes, then continue with this step.
Your smart phone needs a Google Authenticator, or FreeOTP mobile application.
In the Firefox window with the RH-SSO Admin Console, click → , and click .
Check Configure OTP in the field.

Open a new Firefox private window and navigate to the finance web application at http://localhost:8080/finance.
Click .
In the rhtraining realm login page click .
Register the user based on the following criteria.
| Field | Value |
|---|---|
First name
|
John
|
Last name
|
Doe
|
Email
|
john@example.com
|
Username
|
johndoe
|
Password
|
DoeDoeDoe1
|
Confirm Password
|
DoeDoeDoe1
|
Click .
Scan the QR code by using the FreeOTP or Google Authenticator applications.
Use the FreeOTP or Google Authenticator applications to scan the QR and follow the instructions on the screen to log in with the johndoe user.
![]() |
Close all the applications running in terminals by pressing Ctrl+C.
Close all the browser windows.
In a terminal, change to the /home/student directory.
[student@workstation finance-webapp]$ cd ~
[student@workstation ~]$