Chapter 2. Integrating OpenStack Identity (keystone) with Red Hat Identity Manager (IdM)
When you integrate OpenStack Identity (keystone) with Red Hat Identity Manager (IdM), OpenStack Identity authenticates certain Red Hat Identity Management (IdM) users but retains authorization settings and critical service accounts in the Identity Service database. As a result, Identity Service has read-only access to IdM for user account authentication, while retaining management over the privileges assigned to authenticated accounts. You can also use tripleo-ipa or novajoin to enroll your nodes with IdM.
The configuration files for this integration are managed by Puppet. Therefore, any custom configuration that you add might be overwritten the next time you run the openstack overcloud deploy command. You can use director to configure LDAP authentication instead of manually editing the configuration files.
Review the following key terms before you plan and configure the IdM integration:
- Authentication - The process of using a password to verify that the user is who they claim to be.
- Authorization - Validating that authenticated users have proper permissions to the systems they’re attempting to access.
- Domain - Refers to the additional back ends configured in Identity Service. For example, Identity Service can be configured to authenticate users from external IdM environments. The resulting collection of users can be thought of as a domain.
The process to integrate OpenStack Identity with IdM includes the following stages:
- Enroll the undercloud and overcloud in IdM with novajoin
- Implement TLS-e on the undercloud and overcloud with Ansible
- Configure IdM server credentials and export the LDAPS certificate
- Install and configure the LDAPS certificate in OpenStack
- Configure director to use one or more LDAP backends
- Configure Controller nodes to access the IdM backend
- Configure IdM user or group access to OpenStack projects
- Verify that the domain and user lists are created correctly
- Optional: Create credential files for non-admin users
2.1. Planning the Red Hat Identity Manager (IdM) integration Copy linkLink copied to clipboard!
When you plan your OpenStack Identity integration with Red Hat Identity Manager (IdM), ensure that both services are configured and operational and review the impact of the integration on user management and firewall settings.
- Prerequisites
- Red Hat Identity Management is configured and operational.
- Red Hat OpenStack Platform is configured and operational.
- DNS name resolution is fully functional and all hosts are registered appropriately.
- Permissions and roles
- This integration allows IdM users to authenticate to OpenStack and access resources. OpenStack service accounts (such as keystone and glance), and authorization management (permissions and roles) will remain in the Identity Service database. Permissions and roles are assigned to the IdM accounts using Identity Service management tools.
- High availability options
- This configuration creates a dependency on the availability of a single IdM server: Project users will be affected if Identity Service is unable to authenticate to the IdM Server. You can configure keystone to query a different IdM server, should one become unavailable, or you can use a load balancer. Do not use a load balancer when you use IdM with SSSD, as this configuration has failover implemented on the client.
- Outage requirements
- The Identity Service will need to be restarted in order to add the IdM back end.
- Users will be unable to access the dashboard until their accounts have been created in IdM. To reduce downtime, consider pre-staging the IdM accounts well in advance of this change.
- Firewall configuration
Communication between IdM and OpenStack consists of the following:
- Authenticating users
- IdM retrieval of the certificate revocation list (CRL) from the controllers every two hours
- Certmonger requests for new certificates upon expiration
A periodic certmonger task will continue to request new certificates if the initial request fails.
If firewalls are filtering traffic between IdM and OpenStack, you will need to allow access through the following port:
| Source | Destination | Type | Port |
|---|---|---|---|
| OpenStack Controller Node | Red Hat Identity Management | LDAPS | TCP 636 |
2.2. Identity Management (IdM) server recommendations for OpenStack Copy linkLink copied to clipboard!
Red Hat provides the following information to help you integrate your IdM server and OpenStack environment.
For information on preparing Red Hat Enterprise Linux for an IdM installation, see Installing Identity Management.
Run the ipa-server-install command to install and configure IdM. You can use command parameters to skip interactive prompts. Use the following recommendations so that your IdM server can integrate with your Red Hat OpenStack Platform environment:
| Option | Recommendation |
|---|---|
|
| Note the value you provide. You will need this password when configuring Red Hat OpenStack Platform to work with IdM. |
|
| Note the value you provide. The undercloud and overcloud nodes require network access to this ip address. |
|
| Use this option to install an integrated DNS service on the IdM server. The undercloud and overcloud nodes use the IdM server for domain name resolution. |
|
|
Use this option to use the addresses in |
|
| Use this option to resolve reverse records and zones for the IdM server IP addresses. If neither reverse records or zones are resolvable, IdM creates the reverse zones. This simplifies the IdM deployment. |
|
| You can use both or either of these options to configure your NTP source. Both the IdM server and your OpenStack environment must have correct and synchronized time. |
You must open the firewall ports required by IdM to enable communication with Red Hat OpenStack Platform nodes. For more information, see Opening the ports required by IdM.
Additional resources
2.3. Implementing TLS-e with Ansible Copy linkLink copied to clipboard!
You can use the new tripleo-ipa method to enable SSL/TLS on overcloud endpoints, called TLS everywhere (TLS-e). Due to the number of certificates required, Red Hat OpenStack Platform integrates with Red Hat Identity management (IdM). When you use tripleo-ipa to configure TLS-e, IdM is the certificate authority.
Prerequisites
Ensure that all configuration steps for the undercloud, such as the creation of the stack user, are complete. For more details, see Director Installation and Usage for more details
Procedure
Use the following procedure to implement TLS-e on a new installation of Red Hat OpenStack Platform, or an existing deployment that you want to configure with TLS-e. You must use this method if you deploy Red Hat OpenStack Platform with TLS-e on pre-provisioned nodes.
If you are implementing TLS-e for an existing environment, you are required to run commands such as openstack undercloud install, and openstack overcloud deploy. These procedures are idempotent and only adjust your existing deployment configuration to match updated templates and configuration files.
Configure the
/etc/resolv.conffile:Set the appropriate search domains and the nameserver on the undercloud in
/etc/resolv.conf. For example, if the deployment domain isexample.com, and the domain of the FreeIPA server isbigcorp.com, then add the following lines to /etc/resolv.conf:search example.com bigcorp.com nameserver $IDM_SERVER_IP_ADDR
search example.com bigcorp.com nameserver $IDM_SERVER_IP_ADDRCopy to Clipboard Copied! Toggle word wrap Toggle overflow Install required software:
sudo dnf install -y python3-ipalib python3-ipaclient krb5-devel
sudo dnf install -y python3-ipalib python3-ipaclient krb5-develCopy to Clipboard Copied! Toggle word wrap Toggle overflow Export environmental variables with values specific to your environment.:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThe IdM user credentials must be an administrative user that can add new hosts and services.
Run the
undercloud-ipa-install.yamlansible playbook on the undercloud:ansible-playbook \ --ssh-extra-args "-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" \ /usr/share/ansible/tripleo-playbooks/undercloud-ipa-install.yaml
ansible-playbook \ --ssh-extra-args "-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" \ /usr/share/ansible/tripleo-playbooks/undercloud-ipa-install.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Add the following parameters to undercloud.conf
undercloud_nameservers = $IDM_SERVER_IP_ADDR overcloud_domain_name = example.com
undercloud_nameservers = $IDM_SERVER_IP_ADDR overcloud_domain_name = example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow Deploy the undercloud:
openstack undercloud install
openstack undercloud installCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that the undercloud was enrolled correctly by completing the following steps:
List the hosts in IdM:
kinit admin ipa host-find
$ kinit admin $ ipa host-findCopy to Clipboard Copied! Toggle word wrap Toggle overflow Confirm that
/etc/novajoin/krb5.keytabexists on the undercloud.ls /etc/novajoin/krb5.keytab
ls /etc/novajoin/krb5.keytabCopy to Clipboard Copied! Toggle word wrap Toggle overflow
The novajoin directory name is for legacy naming purposes only.
Configuring TLS-e on the overcloud
When you deploy the overcloud with TLS everywhere (TLS-e), IP addresses from the Undercloud and Overcloud will automatically be registered with IdM.
Before deploying the overcloud, create a YAML file
tls-parameters.yamlwith contents similar to the following. The values you select will be specific for your environment:Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
The shown value of the
OS::TripleO::Services::IpaClientparameter overrides the default setting in theenable-internal-tls.yamlfile. You must ensure thetls-parameters.yamlfile followsenable-internal-tls.yamlin theopenstack overcloud deploycommand. - For more information about the parameters that you use to implement TLS-e, see Parameters for tripleo-ipa
-
The shown value of the
Deploy the overcloud. You will need to include the tls-parameters.yaml in the deployment command:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Confirm each endpoint is using HTTPS by querying keystone for a list of endpoints:
openstack endpoint list
openstack endpoint listCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.4. Enrolling nodes in Red Hat Identity Manager (IdM) with novajoin Copy linkLink copied to clipboard!
Novajoin is the default tool that you use to enroll your nodes with Red Hat Identity Manager (IdM) as part of the deployment process. Red Hat recommends the new ansible-based tripleo-ipa solution over the default novajoin solution to configure your undercloud and overcloud with TLS-e. For more information see Implementing TLS-e with Ansible.
You must perform the enrollment process before you proceed with the rest of the IdM integration. The enrollment process includes the following steps:
- Adding the undercloud node to the certificate authority (CA)
- Adding the undercloud node to IdM
- Optional: Setting the IdM server as the DNS server for the overcloud
- Preparing the environment files and deploying the overcloud
- Testing the overcloud enrollment in IdM and in RHOSP
- Optional: Adding DNS entries for novajoin in IdM
IdM enrollment with novajoin is currently only available for the undercloud and overcloud nodes. Novajoin integration for overcloud instances is expected to be supported in a later release.
2.4.1. Adding the undercloud node to the certificate authority Copy linkLink copied to clipboard!
Before you deploy the overcloud, add the undercloud to the certificate authority (CA) by installing the python3-novajoin package on the undercloud node and running the novajoin-ipa-setup script.
Procedure
On the undercloud node, install the
python3-novajoinpackage:sudo dnf install python3-novajoin
$ sudo dnf install python3-novajoinCopy to Clipboard Copied! Toggle word wrap Toggle overflow On the undercloud node, run the
novajoin-ipa-setupscript, and adjust the values to suit your deployment:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use the resulting One-Time Password (OTP) to enroll the undercloud.
2.4.2. Adding the undercloud node to Red Hat Identity Manager (IdM) Copy linkLink copied to clipboard!
After you add the undercloud node to the certificate authority (CA), register the undercloud with IdM and configure novajoin. Configure the following settings in the [DEFAULT] section of the undercloud.conf file.
Procedure
Enable the
novajoinservice:[DEFAULT] enable_novajoin = true
[DEFAULT] enable_novajoin = trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow Set a One-Time Password (OTP) so that you can register the undercloud node with IdM:
ipa_otp = <otp>
ipa_otp = <otp>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the overcloud’s domain name to be served by neutron’s DHCP server:
overcloud_domain_name = <domain>
overcloud_domain_name = <domain>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the hostname for the undercloud:
undercloud_hostname = <undercloud FQDN>
undercloud_hostname = <undercloud FQDN>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set IdM as the nameserver for the undercloud:
undercloud_nameservers = <IdM IP>
undercloud_nameservers = <IdM IP>Copy to Clipboard Copied! Toggle word wrap Toggle overflow For larger environments, review the novajoin connection timeout values. In the
undercloud.conffile, add a reference to a new file calledundercloud-timeout.yaml:hieradata_override = /home/stack/undercloud-timeout.yaml
hieradata_override = /home/stack/undercloud-timeout.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Add the following options to
undercloud-timeout.yaml. You can specify the timeout value in seconds, for example,5:nova::api::vendordata_dynamic_connect_timeout: <timeout value> nova::api::vendordata_dynamic_read_timeout: <timeout value>
nova::api::vendordata_dynamic_connect_timeout: <timeout value> nova::api::vendordata_dynamic_read_timeout: <timeout value>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: If you want the local openSSL certificate authority to generate the SSL certificates for the public endpoints in director, set the
generate_service_certificateparameter totrue:generate_service_certificate = true
generate_service_certificate = trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
Save the
undercloud.conffile. Run the undercloud deployment command to apply the changes to your existing undercloud:
openstack undercloud install
$ openstack undercloud installCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that the undercloud was enrolled correctly by completing the following steps:
List the hosts in IdM:
kinit admin ipa host-find
$ kinit admin $ ipa host-findCopy to Clipboard Copied! Toggle word wrap Toggle overflow Confirm that
/etc/novajoin/krb5.keytabexists on the undercloud.ls /etc/novajoin/krb5.keytab
ls /etc/novajoin/krb5.keytabCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.4.3. Setting Red Hat Identity Manager (IdM) as the DNS server for the overcloud Copy linkLink copied to clipboard!
To enable automatic detection of your IdM environment and easier enrollment, set IdM as your DNS server. This procedure is optional but recommended.
Procedure
Connect to your undercloud:
source ~/stackrc
$ source ~/stackrcCopy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the control plane subnet to use IdM as the DNS name server:
openstack subnet set ctlplane-subnet --dns-nameserver <idm_server_address>
$ openstack subnet set ctlplane-subnet --dns-nameserver <idm_server_address>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
DnsServersparameter in an environment file to use your IdM server:parameter_defaults: DnsServers: ["<idm_server_address>"]
parameter_defaults: DnsServers: ["<idm_server_address>"]Copy to Clipboard Copied! Toggle word wrap Toggle overflow This parameter is usually defined in a custom
network-environment.yamlfile.
2.4.4. Preparing environment files and deploying the overcloud with novajoin enrollment Copy linkLink copied to clipboard!
To deploy the overcloud with IdM integration, you create and edit environment files to configure the overcloud to use the custom domain parameters CloudDomain and CloudName based on the domains that you define in the overcloud. You then deploy the overcloud with all the environment files and any additional environment files that you need for the deployment.
Procedure
Create a copy of the
/usr/share/openstack-tripleo-heat-templates/environments/predictable-placement/custom-domain.yamlenvironment file:cp /usr/share/openstack-tripleo-heat-templates/environments/predictable-placement/custom-domain.yaml \ /home/stack/templates/custom-domain.yaml
$ cp /usr/share/openstack-tripleo-heat-templates/environments/predictable-placement/custom-domain.yaml \ /home/stack/templates/custom-domain.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the
/home/stack/templates/custom-domain.yamlenvironment file and set theCloudDomainandCloudName*values to suit your deployment:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Choose the implementation of TLS appropriate for your environment:
Use the
enable-tls.yamlenvironment file to protect external endpoints with your custom certificate:-
Copy
/usr/share/openstack-tripleo-heat-templates/environments/ssl/enable-tls.yamlto/home/stack/templates. -
Modify the
/home/stack/enable-tls.yamlenvironment file to include your custom certificate and key. Include the following environment files in your deployment to protect internal and external endpoints:
- enable-internal-tls.yaml
- tls-every-endpoints-dns.yaml
- custom-domain.yaml
enable-tls.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
-
Copy
Use the
haproxy-public-tls-certmonger.yamlenvironment file to protect external endpoints with an IdM issued certificate. For this implementation, you must create DNS entries for the VIP endpoints used by novajoin:You must create DNS entries for the VIP endpoints used by novajoin. Identify the overcloud networks located in your custom
network-environment.yaml file in `/home/stack/templates:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a list of virtual IP addresses for each overcloud network in a heat template, for example,
/home/stack/public_vip.yaml.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add DNS entries to the IdM for each of the VIPs, and zones as needed:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Include the following environment files in your deployment to protect internal and external endpoints:
- enable-internal-tls.yaml
- tls-everywhere-endpoints-dns.yaml
- haproxy-public-tls-certmonger.yaml
- custom-domain.yaml
public_vip.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
You cannot use novajoin to implement TLS everywhere (TLS-e) on a pre-existing deployment.
2.4.5. Testing overcloud enrollment in Red Hat Identity Manager (IdM) Copy linkLink copied to clipboard!
After you complete the undercloud and overcloud enrollment in IdM with novajoin, you can test that the enrollment is successful by searching for an overcloud node in IdM and checking that the host entry includes Keytab:True. You can also log in to the overcloud node and confirm that the sssd command can query IdM users.
Locate an overcloud node in IdM and confirm that the host entry includes
Keytab:True:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Log in to the overcloud node and confirm that
sssdcan query IdM users. For example, to query an IdM user namedsusan:getent passwd susan
$ getent passwd susan uid=1108400007(susan) gid=1108400007(bob) groups=1108400007(susan)Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.5. Configuring Red Hat Identity Manager (IdM) server credentials Copy linkLink copied to clipboard!
To configure the Red Hat Identity Manager (IdM) to integrate with OpenStack Identity, set up an LDAP account for Identity service to use, create a user group for Red Hat OpenStack users, and set up the password for the lookup account.
Prerequisites
- Red Hat Identity Manager (IdM) is configured and operational.
- Red Hat OpenStack Platform (RHOSP) is configured and operational.
- DNS name resolution is fully functional and all hosts are registered appropriately.
- IdM authentication traffic is encrypted with LDAPS, using port 636.
- Recommended: Implement IdM with a high availability or load balancing solution to avoid a single point of failure.
Procedure
Perform this procedure on the IdM server.
Create the LDAP lookup account to use in OpenStack Identity Service to query the IdM LDAP service:
kinit admin ipa user-add
# kinit admin # ipa user-add First name: OpenStack Last name: LDAP User [radministrator]: svc-ldapCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteReview the password expiration settings of this account, once created.
Create a group for RHOSP users, called
grp-openstack. Only members of this group can have permissions assigned in OpenStack Identity.ipa group-add --desc="OpenStack Users" grp-openstack
# ipa group-add --desc="OpenStack Users" grp-openstackCopy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
svc-ldapaccount password and add it to thegrp-openstackgroup:ipa passwd svc-ldap ipa group-add-member --users=svc-ldap grp-openstack
# ipa passwd svc-ldap # ipa group-add-member --users=svc-ldap grp-openstackCopy to Clipboard Copied! Toggle word wrap Toggle overflow Login as
svc-ldapuser and change the password when prompted:kinit svc-ldap
# kinit svc-ldapCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.6. Installing the Red Hat Identity Manager (IdM) LDAPS certificate Copy linkLink copied to clipboard!
OpenStack Identity (keystone) uses LDAPS queries to validate user accounts. To encrypt this traffic, keystone uses the certificate file defined by keystone.conf. To install the LDAPS certificate, copy the certificate from the Red Hat Identity Manager (IdM) server to a location where keystone will be able to reference it, and convert the certificate from .crt to .pem format.
When using multiple domains for LDAP authentication, you might receive various errors, such as Unable to retrieve authorized projects, or Peer's Certificate issuer is not recognized. This can arise if keystone uses the incorrect certificate for a certain domain. As a workaround, merge all of the LDAPS public keys into a single .crt bundle, and configure all of your keystone domains to use this file.
Prerequisites
- IdM server credentials are configured.
Procedure
In your IdM environment, locate the LDAPS certificate. This file can be located using
/etc/openldap/ldap.conf:TLS_CACERT /etc/ipa/ca.crt
TLS_CACERT /etc/ipa/ca.crtCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy the file to the Controller node that runs the keystone service. For example, the
scpcommand copies theca.crtfile to the nodenode.lab.local:scp /etc/ipa/ca.crt root@node.lab.local:/root/
# scp /etc/ipa/ca.crt root@node.lab.local:/root/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy the
ca.crtfile to the certificate directory. This is the location that the keystone service will use to access the certificate:cp ca.crt /etc/pki/ca-trust/source/anchors
# cp ca.crt /etc/pki/ca-trust/source/anchorsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: If you need to run diagnostic commands, such as
ldapsearch, you also need to add the certificate to the RHEL certificate store:3. On the Controller node, convert the
.crtto.pemformat:openssl x509 -in ca.crt -out ca.pem -outform PEM
# openssl x509 -in ca.crt -out ca.pem -outform PEMCopy to Clipboard Copied! Toggle word wrap Toggle overflow Install the
.pemon the Controller node. For example, in Red Hat Enterprise Linux:cp ca.pem /etc/pki/ca-trust/source/anchors/ update-ca-trust
# cp ca.pem /etc/pki/ca-trust/source/anchors/ # update-ca-trustCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.7. Configuring director to use domain-specific LDAP backends Copy linkLink copied to clipboard!
To configure director to use one or more LDAP backends, set the KeystoneLDAPDomainEnable flag to true in your heat templates, and set up environment files with the information about each LDAP backend. Director then uses a separate LDAP backend for each keystone domain.
The default directory for domain configuration files is set to /etc/keystone/domains/. You can override this by setting the required path with the keystone::domain_config_directory hiera key and adding it as an ExtraConfig parameter within an environment file.
Procedure
-
In the heat template for your deployment, set the
KeystoneLDAPDomainEnableflag totrue. This configures thedomain_specific_drivers_enabledoption in keystone within theidentityconfiguration group. -
Add a specification of the LDAP backend configuration by setting the
KeystoneLDAPBackendConfigsparameter intripleo-heat-templates, where you can then specify your required LDAP options. Create a copy of the
keystone_domain_specific_ldap_backend.yamlenvironment file:cp /usr/share/openstack-tripleo-heat-templates/environments/services/keystone_domain_specific_ldap_backend.yaml /home/stack/templates/
$ cp /usr/share/openstack-tripleo-heat-templates/environments/services/keystone_domain_specific_ldap_backend.yaml /home/stack/templates/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the
/home/stack/templates/keystone_domain_specific_ldap_backend.yamlenvironment file and set the values to suit your deployment. For example, this parameter create a LDAP configuration for a keystone domain namedtestdomain:Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThe
keystone_domain_specific_ldap_backend.yamlenvironment file contains the following deprecated write parameters:-
user_allow_create -
user_allow_update -
user_allow_delete
The values for these parameters have no effect on the deployment, and can be safely removed.
-
Optional: Add more domains to the environment file. For example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This results in two domains named
domain1anddomain2; each will have a different LDAP domain with its own configuration.
2.8. Granting the admin user access to the OpenStack Identity domain Copy linkLink copied to clipboard!
To allow the admin user to access the OpenStack Identity (keystone) domain and see the Domain tab, get the ID of the domain and the admin user, and then assign the admin role to the user in the domain.
This does not grant the OpenStack admin account any permissions on the external service domain. In this case, the term domain refers to OpenStack’s usage of the keystone domain.
Procedure
This procedure uses the LAB domain. Replace the domain name with the actual name of the domain that you are configuring.
Get the ID of the
LABdomain:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get the ID of the
adminuser from thedefaultdomain:openstack user list --domain default | grep admin
$ openstack user list --domain default | grep admin | 3d75388d351846c6a880e53b2508172a | admin |Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get the ID of the
adminrole:openstack role list
$ openstack role listCopy to Clipboard Copied! Toggle word wrap Toggle overflow The output depends on the external service you are integrating with:
Active Directory Domain Service (AD DS):
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Red Hat Identity Manager (IdM):
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Use the domain and admin IDs to construct the command that adds the
adminuser to theadminrole of the keystoneLABdomain:openstack role add --domain 6800b0496429431ab1c4efbb3fe810d4 --user 3d75388d351846c6a880e53b2508172a 785c70b150ee4c778fe4de088070b4cf
# openstack role add --domain 6800b0496429431ab1c4efbb3fe810d4 --user 3d75388d351846c6a880e53b2508172a 785c70b150ee4c778fe4de088070b4cfCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.9. Granting external groups access to Red Hat OpenStack Platform projects Copy linkLink copied to clipboard!
To grant multiple authenticated users access to Red Hat OpenStack Platform (RHOSP) resources, you can authorize certain groups from the external user management service to grant access to RHOSP projects, instead of requiring OpenStack administrators to manually allocate each user to a role in a project. As a result, all members of these groups can access pre-determined projects.
Prerequisites
Ensure that the external service administrator completed the following steps:
-
Creating a group named
grp-openstack-admin. -
Creating a group named
grp-openstack-demo. - Adding your RHOSP users to one of these groups as needed.
-
Adding your users to the
grp-openstackgroup.
-
Creating a group named
-
Create the OpenStack Identity domain. This procedure uses the
LABdomain. -
Create or choose a RHOSP project. This procedure uses a project called
demothat was created with theopenstack project create --domain default --description "Demo Project" democommand.
Procedure
Retrieve a list of user groups from the OpenStack Identity domain:
openstack group list --domain LAB
# openstack group list --domain LABCopy to Clipboard Copied! Toggle word wrap Toggle overflow The command output depends on the external user management service that you are integrating with:
Active Directory Domain Service (AD DS):
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Red Hat Identity Manager (IdM):
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Retrieve a list of roles:
openstack role list
# openstack role listCopy to Clipboard Copied! Toggle word wrap Toggle overflow The command output depends on the external user management service that you are integrating with:
Active Directory Domain Service (AD DS):
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Red Hat Identity Manager (IdM):
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Grant the user groups access to RHOSP projects by adding them to one or more of these roles. For example, if you want users in the
grp-openstack-demogroup to be general users of thedemoproject, you must add the group to thememberor_member_role, depending on the external service that you are integrating with:Active Directory Domain Service (AD DS):
openstack role add --project demo --group d971bb3bd5e64a454cbd0cc7af4c0773e78d61b5f81321809f8323216938cae8 member
# openstack role add --project demo --group d971bb3bd5e64a454cbd0cc7af4c0773e78d61b5f81321809f8323216938cae8 memberCopy to Clipboard Copied! Toggle word wrap Toggle overflow Red Hat Identity Manager (IdM):
openstack role add --project demo --group d971bb3bd5e64a454cbd0cc7af4c0773e78d61b5f81321809f8323216938cae8 _member_
$ openstack role add --project demo --group d971bb3bd5e64a454cbd0cc7af4c0773e78d61b5f81321809f8323216938cae8 _member_Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Result
Members of grp-openstack-demo can log in to the dashboard by entering their username and password and entering LAB in the Domain field:
If users receive the error Error: Unable to retrieve container list., and expect to be able to manage containers, then they must be added to the SwiftOperator role.
2.10. Granting external users access to Red Hat OpenStack Platform projects Copy linkLink copied to clipboard!
To grant specific authenticated users from the grp-openstack group access to OpenStack resources, you can grant these users direct access to Red Hat OpenStack Platform (RHOSP) projects. Use this process in cases where you want to grant access to individual users instead of granting access to groups.
Prerequisites
Ensure that the external service administrator completed the following steps:
-
Adding your RHOSP users to the
grp-openstackgroup. -
Creating the OpenStack Identity domain. This procedure uses the
LABdomain.
-
Adding your RHOSP users to the
-
Create or choose a RHOSP project. This procedure uses a project called
demothat was created with theopenstack project create --domain default --description "Demo Project" democommand.
Procedure
Retrieve a list of users from the OpenStack Identity domain:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Retrieve a list of roles:
openstack role list
# openstack role listCopy to Clipboard Copied! Toggle word wrap Toggle overflow The command output depends on the external user management service that you are integrating with:
Active Directory Domain Service (AD DS):
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Red Hat Identity Manager (IdM):
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Grant users access to RHOSP projects by adding them to one or more of these roles. For example, if you want
user1to be a general user of thedemoproject, you add them to thememberor_member_role, depending on the external service that you are integrating with:Active Directory Domain Service (AD DS):
openstack role add --project demo --user 1f24ec1f11aeb90520079c29f70afa060d22e2ce92b2eba7784c841ac418091e member
# openstack role add --project demo --user 1f24ec1f11aeb90520079c29f70afa060d22e2ce92b2eba7784c841ac418091e memberCopy to Clipboard Copied! Toggle word wrap Toggle overflow Red Hat Identity Manager (IdM):
openstack role add --project demo --user 1f24ec1f11aeb90520079c29f70afa060d22e2ce92b2eba7784c841ac418091e _member_
# openstack role add --project demo --user 1f24ec1f11aeb90520079c29f70afa060d22e2ce92b2eba7784c841ac418091e _member_Copy to Clipboard Copied! Toggle word wrap Toggle overflow
If you want
user1to be an administrative user of thedemoproject, add the user to theadminrole:openstack role add --project demo --user 1f24ec1f11aeb90520079c29f70afa060d22e2ce92b2eba7784c841ac418091e admin
# openstack role add --project demo --user 1f24ec1f11aeb90520079c29f70afa060d22e2ce92b2eba7784c841ac418091e adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Result
The user1 user is able to log in to the dashboard by entering their external username and password and entering LAB in the Domain field:
If users receive the error Error: Unable to retrieve container list., and expect to be able to manage containers, then they must be added to the SwiftOperator role.
2.11. Viewing the list of OpenStack Identity domains and users Copy linkLink copied to clipboard!
Use the openstack domain list command to list the available entries. Configuring multiple domains in Identity Service enables a new Domain field in the dashboard login page. Users are expected to enter the domain that matches their login credentials.
After you complete the integration, you need to decide whether to create new projects in the Default domain or in newly created keystone domains. You must consider your workflow and how you administer user accounts. If possible, use the Default domain as an internal domain to manage service accounts and the admin project, and keep your external users in a separate domain.
In this example, external accounts need to specify the LAB domain. The built-in keystone accounts, such as admin, must specify Default as their domain.
Procedure
Show the list of domains:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Show the list of users in a specific domain. This command example specifies the
--domain LABand returns users in the LAB domain that are members of thegrp-openstackgroup:openstack user list --domain LAB
# openstack user list --domain LABCopy to Clipboard Copied! Toggle word wrap Toggle overflow You can also append
--domain Defaultto show the built-in keystone accounts:openstack user list --domain Default
# openstack user list --domain DefaultCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.12. Creating a credentials file for a non-admin user Copy linkLink copied to clipboard!
After you configure users and domains for OpenStack Identity, you might need to create a credentials file for a non-admin user.
Procedure
Create a credentials (RC) file for a non-admin user. This example uses the
user1user in the file.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.13. Testing OpenStack Identity integration with an external user management service Copy linkLink copied to clipboard!
To test that OpenStack Identity (keystone) successfully integrated with Active Directory Domain Service (AD DS), test user access to dashboard features.
Prerequisites
- Integration with an external user management service, such as Active Directory (AD) or Red Hat Identity Manager (IdM)
Procedure
-
Create a test user in the external user management service, and add the user to the
grp-openstackgroup. -
In Red Hat OpenStack Platform, add the user to the
_member_role of thedemoproject. - Log in to the dashboard with the credentials of the AD test user.
- Click on each of the tabs to confirm that they are presented successfully without error messages.
- Use the dashboard to build a test instance.
If you experience issues with these steps, log in to the dashboard with the admin account and perform the subsequent steps as that user. If the test is successful, it means that OpenStack is still working as expected and that an issue exists somewhere in the integration settings between OpenStack Identity and Active Directory.
2.14. Troubleshooting Red Hat Identity Manager (IdM) integration Copy linkLink copied to clipboard!
If you encounter errors when using the Red Hat Identity Manager (IdM) integration with OpenStack Identity, you might need to test the LDAP connection or test the certificate trust configuration. You might also need to check that the LDAPS port is accessible.
Depending on the error type and location, perform only the relevant steps in this procedure.
Procedure
Test the LDAP connection by using the
ldapsearchcommand to remotely perform test queries against the IdM server. A successful result here indicates that network connectivity is working, and the IdM services are up. In this example, a test query is performed against the serveridm.lab.localon port636:ldapsearch -D "cn=directory manager" -H ldaps://idm.lab.local:636 -b "dc=lab,dc=local" -s sub "(objectclass=*)" -w RedactedComplexPassword
# ldapsearch -D "cn=directory manager" -H ldaps://idm.lab.local:636 -b "dc=lab,dc=local" -s sub "(objectclass=*)" -w RedactedComplexPasswordCopy to Clipboard Copied! Toggle word wrap Toggle overflow Noteldapsearchis a part of theopenldap-clientspackage. You can install this using# dnf install openldap-clients.Use the
nccommand to check that LDAPS port636is remotely accessible. In this example, a probe is performed against the serveridm.lab.local. Pressctrl-cto exit the prompt.nc -v idm.lab.local 636
# nc -v idm.lab.local 636 Ncat: Version 6.40 ( http://nmap.org/ncat ) Ncat: Connected to 192.168.200.10:636. ^CCopy to Clipboard Copied! Toggle word wrap Toggle overflow Failure to establish a connection could indicate a firewall configuration issue.