Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 15. Enabling SSL/TLS on internal and public endpoints with Identity Management
You can enable SSL/TLS on certain overcloud endpoints. Due to the number of certificates required, director integrates with a Red Hat Identity Management (IdM) server to act as a certificate authority and manage the overcloud certificates.
To check the status of TLS support across the OpenStack components, refer to the TLS Enablement status matrix.
15.1. Identity Management (IdM) server recommendations for OpenStack Link kopierenLink in die Zwischenablage kopiert!
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
15.2. Implementing TLS-e with Ansible Link kopierenLink in die Zwischenablage kopiert!
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.
-
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
15.3. Enrolling nodes in Red Hat Identity Manager (IdM) with novajoin Link kopierenLink in die Zwischenablage kopiert!
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.
15.4. Adding the undercloud node to the certificate authority Link kopierenLink in die Zwischenablage kopiert!
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.
15.5. Adding the undercloud node to Red Hat Identity Manager (IdM) Link kopierenLink in die Zwischenablage kopiert!
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
15.6. Setting Red Hat Identity Manager (IdM) as the DNS server for the overcloud Link kopierenLink in die Zwischenablage kopiert!
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.
15.7. Preparing environment files and deploying the overcloud with novajoin enrollment Link kopierenLink in die Zwischenablage kopiert!
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.