Chapter 3. Configure RH-SSO
The RH-SSO installation process is outside the scope of this guide. It is assumed you have already installed RH-SSO on a node that is situated independently from the Red Hat OpenStack Platform director deployment.
-
The RH-SSO URL will be identified by the
$FED_RHSSO_URLvariable. -
RH-SSO supports multi-tenancy, and uses realms to allow for separation between tenants. As a result, RH-SSO operations always occur within the context of a realm. This guide uses the site-specific variable
$FED_RHSSO_REALMto identify the RH-SSO realm being used. -
The RH-SSO realm can either be created ahead of time (as would be typical when RH-SSO is administered by an IT group), or the
keycloak-httpd-client-installtool can create it for you if you have administrator privileges on the RH-SSO server.
3.1. Configure the RH-SSO Realm Copy linkLink copied to clipboard!
Once the RH-SSO realm is available, use the RH-SSO web console to configure that realm for user federation against IdM:
-
Select
$FED_RHSSO_REALMfrom the drop-down list in the upper left corner. -
Select
User Federationfrom the left sideConfigurepanel. -
From the
Add provider ...drop down list in the upper right corner of theUser Federationpanel, selectldap. Fill in the following fields with these values, be sure to substitute any
$FED_site-specific variable:Expand Property Value Console Display Name
Red Hat IDM
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://$FED_IPA_HOST
Users DN
cn=users,cn=accounts,$FED_IPA_BASE_DN
Authentication Type
simple
Bind DN
uid=rhsso,cn=sysaccounts,cn=etc,$FED_IPA_BASE_DN
Bind Credential
$FED_IPA_RHSSO_SERVICE_PASSWD
-
Use the
Test connectionandTest authenticationbuttons to check that user federation is working. -
Click
Saveat the bottom of theUser Federationpanel to save the new user federation provider. -
Click on the
Mapperstab at the top of the Red Hat IDM user federation page you just created. - Create a mapper to retrieve the user’s group information; this means that a user’s group memberships will be returned in the SAML assertion. You will be using group membership later to provide authorization in OpenStack.
-
Click on the
Createbutton in the upper right hand corner of the Mappers page. On the
Add user federation mapperpage, selectgroup-ldap-mapperfrom the Mapper Type drop down list, and give it the nameGroup Mapper. Fill in the following fields with these values, and be sure to substitute any$FED_site-specific variable.Expand Property Value LDAP Groups DN
cn=groups,cn=accounts„$FED_IPA_BASE_DN
Group Name LDAP Attribute
cn
Group Object Classes
groupOfNames
Membership LDAP Attribute
member
Membership Attribute Type
DN
Mode
READ_ONLY
User Groups Retrieve Strategy
GET_GROUPS_FROM_USER_MEMBEROF_ATTRIBUTE
-
Click
Save.
3.2. Add User Attributes for SAML Assertion Copy linkLink copied to clipboard!
The SAML assertion can send to keystone the properties that are bound to the user (for example, user metadata); these are called attributes in SAML. You will need to configure RH-SSO to return the required attributes in the assertion. Then, when keystone receives the SAML assertion, it will map those attributes into user metadata in a manner which keystone can then process. The process of mapping IdP attributes into keystone data is called Federated Mapping and will be covered later in this guide (see Section 4.21, “Create the Mapping File and Upload to Keystone”).
RH-SSO calls the process of adding returned attributes Protocol Mapping. Protocol mapping is a property of the RH-SSO client (for example, the service provider (SP) added to the RH-SSO realm). The process for adding a given attribute to SAML follows a similar process.
In the RH-SSO administration web console:
-
Select
$FED_RHSSO_REALMfrom the drop-down list in the upper left corner. -
Select
Clientsfrom the left sideConfigurepanel. -
Select the SP client that was setup by
keycloak-httpd-client-install. It will be identified by its SAMLEntityId. -
Select the
Mapperstab from the horizontal list of tabs appearing at the top of the client panel. -
In the
Mapperspanel in the upper right are two buttons:CreateandAdd Builtin. Use one of these buttons to add a protocol mapper to the client.
You can add any required attributes, but for this exercise you will only need the list of groups the user is a member of (because group membership is how you will authorize the user).
3.3. Add Group Information to the Assertion Copy linkLink copied to clipboard!
-
Click on the
Createbutton in theMapperspanel. -
In the
Create Protocol Mapperpanel selectGroup listfrom theMapper typedrop-down list. -
Enter
Group Listas a name in theNamefield. Enter
groupsas the name of the SAML attribute in theGroup attribute namefield.NoteThis is the name of the attribute as it will appear in the SAML assertion. When the keystone mapper searches for names in the
Remotesection of the mapping declaration, it is the SAML attribute names it is looking for. Whenever you add an attribute in RH-SSO to be passed in the assertion you will need to specify the SAML attribute name; it is the RH-SSO protocol mapper where that name is defined.-
In the
SAML Attribute NameFormatfield selectBasic. -
In the
Single Group Attributetoggle box selectOn. -
Click
Saveat the bottom of the panel.
keycloak-httpd-client-install adds a group mapper when it runs.