3.3. Configuring the business application with Red Hat Single Sign-On
You can use Red Hat Single Sign-On (RH SSO) to enable single sign-on between your services and to have a central place to configure and manage your users and roles.
Prerequisites
-
You have a
<business-application>.zipfile that you created using the business applications website.
Procedure
- Download and install RH SSO. For instructions, see the Red Hat Single Sign-On Getting Started Guide.
Configure RH SSO:
- Either use the default master realm or create a new realm.
-
Create the
springboot-appclient and set theAccessTypeto public. Set a valid redirect URI and web origin according to your local setup, for example:
-
Valid redirect URIs:
http://localhost:8090/* -
Web origin:
http://localhost:8090
-
Valid redirect URIs:
- Create realm roles that are used in the application.
- Create users that are used in the application and assign roles to them.
Add the following dependencies to the service project
pom.xmlfile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Update the
application.propertiesfile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Modify the
DefaultWebSecurityConfig.javafile to ensure that Spring Security works correctly with RH SSO:Copy to Clipboard Copied! Toggle word wrap Toggle overflow