Este conteúdo não está disponível no idioma selecionado.
3.3. Configure the Identity Service
3.3.1. Configure the Identity Service Database Connection Copiar o linkLink copiado para a área de transferência!
/etc/keystone/keystone.conf file. It must be updated to point to a valid database server before starting the service.
root user.
Procedure 3.2. Configuring the Identity Service SQL Database Connection
- Set the value of the
connectionconfiguration key:openstack-config --set /etc/keystone/keystone.conf \ sql connection mysql://USER:PASS@IP/DB
# openstack-config --set /etc/keystone/keystone.conf \ sql connection mysql://USER:PASS@IP/DBCopy to Clipboard Copied! Toggle word wrap Toggle overflow Replace the following values:- Replace USER with the Identity service database user name, usually
keystone. - Replace PASS with the password of the database user.
- Replace IP with the IP address or host name of the database server.
- Replace DB with the name of the Identity service database, usually
keystone.
Important
3.3.2. Configure the Public Key Infrastructure Copiar o linkLink copiado para a área de transferência!
3.3.2.1. Public Key Infrastructure Overview Copiar o linkLink copiado para a área de transferência!
keystone-manage pki_setup command. It is, however, possible to manually create and sign the required certificates using a third party certificate authority. If using third party certificates the Identity service configuration must be manually updated to point to the certificates and supporting files.
[signing] section of the /etc/keystone/keystone.conf configuration file. These keys are:
- ca_certs
- Specifies the location of the certificate for the authority that issued the certificate denoted by the
certfileconfiguration key. The default value is/etc/keystone/ssl/certs/ca.pem. - ca_key
- Specifies the key of the certificate authority that issued the certificate denoted by the
certfileconfiguration key. The default value is/etc/keystone/ssl/certs/cakey.pem. - ca_password
- Specifies the password, if applicable, required to open the certificate authority file. The default action if no value is specified is not to use a password.
- certfile
- Specifies the location of the certificate that must be used to verify tokens. The default value of
/etc/keystone/ssl/certs/signing_cert.pemis used if no value is specified. - keyfile
- Specifies the location of the private key that must be used when signing tokens. The default value of
/etc/keystone/ssl/private/signing_key.pemis used if no value is specified. - token_format
- Specifies the algorithm to use when generating tokens. Possible values are
UUIDandPKI. The default value isPKI.
3.3.2.2. Create the Public Key Infrastructure Files Copiar o linkLink copiado para a área de transferência!
root user.
Procedure 3.3. Creating the PKI Files to be Used by the Identity Service
- Run the
keystone-manage pki_setupcommand:keystone-manage pki_setup \ --keystone-user keystone \ --keystone-group keystone
# keystone-manage pki_setup \ --keystone-user keystone \ --keystone-group keystoneCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Ensure that the
keystoneuser owns the/var/log/keystone/and/etc/keystone/ssl/directories:chown -R keystone:keystone /var/log/keystone \ /etc/keystone/ssl/
# chown -R keystone:keystone /var/log/keystone \ /etc/keystone/ssl/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3.2.3. Configure the Identity Service to Use Public Key Infrastructure Files Copiar o linkLink copiado para a área de transferência!
/etc/keystone/keystone.conf file:
/etc/keystone/keystone.conf file.
3.3.3. Configure the Firewall to Allow Identity Service Traffic Copiar o linkLink copiado para a área de transferência!
root user.
Procedure 3.4. Configuring the Firewall to Allow Identity Service Traffic
- Open the
/etc/sysconfig/iptablesfile in a text editor. - Add an INPUT rule allowing TCP traffic on ports
5000and35357to the file. The new rule must appear before any INPUT rules that REJECT traffic:-A INPUT -p tcp -m multiport --dports 5000,35357 -j ACCEPT
-A INPUT -p tcp -m multiport --dports 5000,35357 -j ACCEPTCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Save the changes to the
/etc/sysconfig/iptablesfile. - Restart the
iptablesservice to ensure that the change takes effect:systemctl restart iptables.service
# systemctl restart iptables.serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3.4. Populate the Identity Service Database Copiar o linkLink copiado para a área de transferência!
Procedure 3.5. Populating the Identity Service Database
- Log in to the system hosting the Identity service.
- Switch to the
keystoneuser and initialize and populate the database identified in/etc/keystone/keystone.conf:su keystone -s /bin/sh -c "keystone-manage db_sync"
# su keystone -s /bin/sh -c "keystone-manage db_sync"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3.5. Limit the Number of Entities in a Collection Copiar o linkLink copiado para a área de transferência!
Procedure 3.6. Limiting the Number of Entities in a Collection
- Open the
/etc/keystone/keystone.confin a text editor. - Set a global value using
list_limitin the[DEFAULT]section. - Optionally override the global value with a specific limit in individual sections. For example:
[assignment] list_limit = 100
[assignment] list_limit = 100Copy to Clipboard Copied! Toggle word wrap Toggle overflow
list_{entity} call has been truncated, the response status code will still be 200 (OK), but the truncated attribute in the collection will be set to true.
3.3.6. Configuring the Appache HTTP server Copiar o linkLink copiado para a área de transferência!
keystone service and the wsgi module.
Procedure 3.7. Configuring the Appache HTTP server
- Edit the
/etc/httpd/conf/httpd.conffile in a text editor. Set theServerNameoption to reference the controller node:ServerName controller
ServerName controllerCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a link to the
/etc/httpd/conf/httpd.conffile:ln -s /usr/share/keystone/wsgi-keystone.conf /etc/httpd/conf.d
# ln -s /usr/share/keystone/wsgi-keystone.conf /etc/httpd/conf.dCopy to Clipboard Copied! Toggle word wrap Toggle overflow