keystone.cmd package¶
Subpackages¶
- keystone.cmd.doctor package
- Submodules
- keystone.cmd.doctor.caching module
- keystone.cmd.doctor.credential module
- keystone.cmd.doctor.database module
- keystone.cmd.doctor.debug module
- keystone.cmd.doctor.federation module
- keystone.cmd.doctor.ldap module
- keystone.cmd.doctor.security_compliance module
- keystone.cmd.doctor.tokens module
- keystone.cmd.doctor.tokens_fernet module
- Module contents
Submodules¶
keystone.cmd.cli module¶
-
class
keystone.cmd.cli.
BaseCertificateSetup
[source]¶ Bases:
keystone.cmd.cli.BasePermissionsSetup
Provides common options for certificate setup.
-
class
keystone.cmd.cli.
BasePermissionsSetup
[source]¶ Bases:
keystone.cmd.cli.BaseApp
Common user/group setup for file permissions.
-
class
keystone.cmd.cli.
BootStrap
[source]¶ Bases:
keystone.cmd.cli.BaseApp
Perform the basic bootstrap process.
-
do_bootstrap
()[source]¶ Perform the bootstrap actions.
Create bootstrap user, project, and role so that CMS, humans, or scripts can continue to perform initial setup (domains, projects, services, endpoints, etc) of Keystone when standing up a new deployment.
-
name
= 'bootstrap'¶
-
-
class
keystone.cmd.cli.
CredentialMigrate
[source]¶ Bases:
keystone.cmd.cli.BasePermissionsSetup
Provides the ability to encrypt credentials using a new primary key.
This assumes that there is already a credential key repository in place and that the database backend has been upgraded to at least the Newton schema. If the credential repository doesn’t exist yet, you can use
keystone-manage credential_setup
to create one.-
name
= 'credential_migrate'¶
-
-
class
keystone.cmd.cli.
CredentialRotate
[source]¶ Bases:
keystone.cmd.cli.BasePermissionsSetup
Rotate Fernet encryption keys for credential encryption.
This assumes you have already run keystone-manage credential_setup.
A new primary key is placed into rotation only if all credentials are encrypted with the current primary key. If any credentials are encrypted with a secondary key the rotation will abort. This protects against removing a key that is still required to decrypt credentials. Once a key is removed from the repository, it is impossible to recover the original data without restoring from a backup external to keystone (more on backups below). To make sure all credentials are encrypted with the latest primary key, please see the keystone-manage credential_migrate command. Since the maximum number of keys in the credential repository is 3, once all credentials are encrypted with the latest primary key we can safely introduce a new primary key. All credentials will still be decryptable since they are all encrypted with the only secondary key in the repository.
It is imperitive to understand the importance of backing up keys used to encrypt credentials. In the event keys are overrotated, applying a key repository from backup can help recover otherwise useless credentials. Persisting snapshots of the key repository in secure and encrypted source control, or a dedicated key management system are good examples of encryption key backups.
The keystone-manage credential_rotate and keystone-manage credential_migrate commands are intended to be done in sequence. After performing a rotation, a migration must be done before performing another rotation. This ensures we don’t over-rotate encryption keys.
-
name
= 'credential_rotate'¶
-
-
class
keystone.cmd.cli.
CredentialSetup
[source]¶ Bases:
keystone.cmd.cli.BasePermissionsSetup
Setup a Fernet key repository for credential encryption.
The purpose of this command is very similar to keystone-manage fernet_setup only the keys included in this repository are for encrypting and decrypting credential secrets instead of token payloads. Keys can be rotated using keystone-manage credential_rotate.
-
name
= 'credential_setup'¶
-
-
class
keystone.cmd.cli.
DbSync
[source]¶ Bases:
keystone.cmd.cli.BaseApp
Sync the database.
-
name
= 'db_sync'¶
-
-
class
keystone.cmd.cli.
DbVersion
[source]¶ Bases:
keystone.cmd.cli.BaseApp
Print the current migration version of the database.
-
name
= 'db_version'¶
-
-
class
keystone.cmd.cli.
Doctor
[source]¶ Bases:
keystone.cmd.cli.BaseApp
Diagnose common problems with keystone deployments.
-
name
= 'doctor'¶
-
-
class
keystone.cmd.cli.
DomainConfigUpload
[source]¶ Bases:
keystone.cmd.cli.BaseApp
Upload the domain specific configuration files to the database.
-
name
= 'domain_config_upload'¶
-
-
class
keystone.cmd.cli.
DomainConfigUploadFiles
(domain_config_finder=<function _domain_config_finder>)[source]¶ Bases:
object
-
read_domain_configs_from_files
()[source]¶ Read configs from file(s) and load into database.
The command line parameters have already been parsed and the CONF command option will have been set. It is either set to the name of an explicit domain, or it’s None to indicate that we want all domain config files.
-
valid_options
()[source]¶ Validate the options, returning True if they are indeed valid.
It would be nice to use the argparse automated checking for this validation, but the only way I can see doing that is to make the default (i.e. if no optional parameters are specified) to upload all configuration files - and that sounds too dangerous as a default. So we use it in a slightly unconventional way, where all parameters are optional, but you must specify at least one.
-
-
class
keystone.cmd.cli.
FernetRotate
[source]¶ Bases:
keystone.cmd.cli.BasePermissionsSetup
Rotate Fernet encryption keys.
This assumes you have already run keystone-manage fernet_setup.
A new primary key is placed into rotation, which is used for new tokens. The old primary key is demoted to secondary, which can then still be used for validating tokens. Excess secondary keys (beyond [fernet_tokens] max_active_keys) are revoked. Revoked keys are permanently deleted. A new staged key will be created and used to validate tokens. The next time key rotation takes place, the staged key will be put into rotation as the primary key.
Rotating keys too frequently, or with [fernet_tokens] max_active_keys set too low, will cause tokens to become invalid prior to their expiration.
-
name
= 'fernet_rotate'¶
-
-
class
keystone.cmd.cli.
FernetSetup
[source]¶ Bases:
keystone.cmd.cli.BasePermissionsSetup
Setup a key repository for Fernet tokens.
This also creates a primary key used for both creating and validating Fernet tokens. To improve security, you should rotate your keys (using keystone-manage fernet_rotate, for example).
-
name
= 'fernet_setup'¶
-
-
class
keystone.cmd.cli.
MappingEngineTester
[source]¶ Bases:
keystone.cmd.cli.BaseApp
Execute mapping engine locally.
-
name
= 'mapping_engine'¶
-
-
class
keystone.cmd.cli.
MappingPopulate
[source]¶ Bases:
keystone.cmd.cli.BaseApp
Pre-populate entries from domain-specific backends.
Running this command is not required. It should only be run right after the LDAP was configured, when many new users were added, or when “mapping_purge” is run.
This command will take a while to run. It is perfectly fine for it to run more than several minutes.
-
name
= 'mapping_populate'¶
-
-
class
keystone.cmd.cli.
MappingPurge
[source]¶ Bases:
keystone.cmd.cli.BaseApp
Purge the mapping table.
-
name
= 'mapping_purge'¶
-
-
class
keystone.cmd.cli.
PKISetup
[source]¶ Bases:
keystone.cmd.cli.BaseCertificateSetup
Setup keys and certificates for signing and verifying revocation lists.
This is NOT intended for production use, see Keystone Configuration documentation for details. As of the Mitaka release, this command has been DEPRECATED and may be removed in the ‘O’ release.
-
name
= 'pki_setup'¶
-
-
class
keystone.cmd.cli.
SamlIdentityProviderMetadata
[source]¶ Bases:
keystone.cmd.cli.BaseApp
Generate Identity Provider metadata.
-
name
= 'saml_idp_metadata'¶
-
-
class
keystone.cmd.cli.
TokenFlush
[source]¶ Bases:
keystone.cmd.cli.BaseApp
Flush expired tokens from the backend.
-
name
= 'token_flush'¶
-