Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
3.3. Configure the Identity Service
3.3.1. Configure the Identity Service Database Connection Link kopierenLink in die Zwischenablage kopiert!
/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
connection
configuration 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/DB
Copy 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 Link kopierenLink in die Zwischenablage kopiert!
root
user.
Procedure 3.3. Setting the Identity Service Administration Token
- Generate an initial service token and save it in the
OS_SERVICE_TOKEN
environment 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_token
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Set the value of the
admin_token
configuration 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_TOKEN
Copy 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 Link kopierenLink in die Zwischenablage kopiert!
3.3.3.1. Public Key Infrastructure Overview Link kopierenLink in die Zwischenablage kopiert!
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
certfile
configuration 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
certfile
configuration 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.pem
is 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.pem
is used if no value is specified. - token_format
- Specifies the algorithm to use when generating tokens. Possible values are
UUID
andPKI
. The default value isPKI
.
3.3.3.2. Create the Public Key Infrastructure Files Link kopierenLink in die Zwischenablage kopiert!
root
user.
Procedure 3.4. Creating the PKI Files to be Used by the Identity Service
- Run the
keystone-manage pki_setup
command:keystone-manage pki_setup \ --keystone-user keystone \ --keystone-group keystone
# keystone-manage pki_setup \ --keystone-user keystone \ --keystone-group keystone
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Ensure that the
keystone
user 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 Link kopierenLink in die Zwischenablage kopiert!
/etc/keystone/keystone.conf
file:
/etc/keystone/keystone.conf
file.
3.3.4. Configure the Firewall to Allow Identity Service Traffic Link kopierenLink in die Zwischenablage kopiert!
root
user.
Procedure 3.5. Configuring the Firewall to Allow Identity Service Traffic
- Open the
/etc/sysconfig/iptables
file in a text editor. - Add an INPUT rule allowing TCP traffic on ports
5000
and35357
to 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 ACCEPT
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Save the changes to the
/etc/sysconfig/iptables
file. - Restart the
iptables
service to ensure that the change takes effect:systemctl restart iptables.service
# systemctl restart iptables.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3.5. Populate the Identity Service Database Link kopierenLink in die Zwischenablage kopiert!
Procedure 3.6. Populating the Identity Service Database
- Log in to the system hosting the Identity service.
- Switch to the
keystone
user 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 Link kopierenLink in die Zwischenablage kopiert!
Procedure 3.7. Limiting the Number of Entities in a Collection
- Open the
/etc/keystone/keystone.conf
in a text editor. - Set a global value using
list_limit
in the[DEFAULT]
section. - Optionally override the global value with a specific limit in individual sections. For example:
[assignment] list_limit = 100
[assignment] list_limit = 100
Copy 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
.