Questo contenuto non è disponibile nella lingua selezionata.
3.3. Configure the Identity Service
3.3.1. Configure the Identity Service Database Connection Copia collegamentoCollegamento copiato negli appunti!
/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. Set the Identity Service Administration Token Copia collegamentoCollegamento copiato negli appunti!
root user.
Procedure 3.3. Setting the Identity Service Administration Token
- Generate an initial service token and save it in the
OS_SERVICE_TOKENenvironment variable:export OS_SERVICE_TOKEN=$(openssl rand -hex 10)
# export OS_SERVICE_TOKEN=$(openssl rand -hex 10)Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Store the value of the administration token in a file for future use:
echo $OS_SERVICE_TOKEN > ~/ks_admin_token
# echo $OS_SERVICE_TOKEN > ~/ks_admin_tokenCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Set the value of the
admin_tokenconfiguration key to that of the newly created token:openstack-config --set /etc/keystone/keystone.conf \ DEFAULT admin_token $OS_SERVICE_TOKEN
# openstack-config --set /etc/keystone/keystone.conf \ DEFAULT admin_token $OS_SERVICE_TOKENCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Note
keystone-manage token_flush
# keystone-manage token_flush
3.3.3. Configure the Public Key Infrastructure Copia collegamentoCollegamento copiato negli appunti!
3.3.3.1. Public Key Infrastructure Overview Copia collegamentoCollegamento copiato negli appunti!
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.3.2. Create the Public Key Infrastructure Files Copia collegamentoCollegamento copiato negli appunti!
root user.
Procedure 3.4. 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.3.3. Configure the Identity Service to Use Public Key Infrastructure Files Copia collegamentoCollegamento copiato negli appunti!
/etc/keystone/keystone.conf file:
/etc/keystone/keystone.conf file.
3.3.4. Configure the Firewall to Allow Identity Service Traffic Copia collegamentoCollegamento copiato negli appunti!
root user.
Procedure 3.5. 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.5. Populate the Identity Service Database Copia collegamentoCollegamento copiato negli appunti!
Procedure 3.6. 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.6. Limit the Number of Entities in a Collection Copia collegamentoCollegamento copiato negli appunti!
Procedure 3.7. 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.