keystone.cmd package

Submodules

keystone.cmd.all module

keystone.cmd.all.main()[source]

keystone.cmd.cli module

class keystone.cmd.cli.BaseApp[source]

Bases: object

classmethod add_argument_parser(subparsers)[source]
name = None
class keystone.cmd.cli.BaseCertificateSetup[source]

Bases: keystone.cmd.cli.BasePermissionsSetup

Provides common options for certificate setup.

classmethod add_argument_parser(subparsers)[source]
class keystone.cmd.cli.BasePermissionsSetup[source]

Bases: keystone.cmd.cli.BaseApp

Common user/group setup for file permissions.

classmethod add_argument_parser(subparsers)[source]
static get_user_group()[source]
class keystone.cmd.cli.BootStrap[source]

Bases: keystone.cmd.cli.BaseApp

Perform the basic bootstrap process

classmethod add_argument_parser(subparsers)[source]
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.

load_backends()[source]
classmethod main()[source]
name = 'bootstrap'
class keystone.cmd.cli.DbSync[source]

Bases: keystone.cmd.cli.BaseApp

Sync the database.

classmethod add_argument_parser(subparsers)[source]
static main()[source]
name = 'db_sync'
class keystone.cmd.cli.DbVersion[source]

Bases: keystone.cmd.cli.BaseApp

Print the current migration version of the database.

classmethod add_argument_parser(subparsers)[source]
static main()[source]
name = 'db_version'
class keystone.cmd.cli.DomainConfigUpload[source]

Bases: keystone.cmd.cli.BaseApp

Upload the domain specific configuration files to the database.

classmethod add_argument_parser(subparsers)[source]
static main()[source]
name = 'domain_config_upload'
class keystone.cmd.cli.DomainConfigUploadFiles(domain_config_finder=<function _domain_config_finder at 0x7f77afd16a28>)[source]

Bases: object

load_backends()[source]
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.

run()[source]
upload_config_to_database(file_name, domain_name)[source]

Upload a single config file to the database.

Parameters:
  • file_name – the file containing the config options
  • domain_name – the domain name
Raises:
  • ValueError – the domain does not exist or already has domain specific configurations defined.
  • Exceptions from oslo config – there is an issue with options defined in the config file or its format.

The caller of this method should catch the errors raised and handle appropriately in order that the best UX experience can be provided for both the case of when a user has asked for a specific config file to be uploaded, as well as all config files in a directory.

upload_configs_to_database(file_name, domain_name)[source]

Upload configs from file and load into database.

This method will be called repeatedly for all the config files in the config directory. To provide a better UX, we differentiate the error handling in this case (versus when the user has asked for a single config file to be uploaded).

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.

classmethod main()[source]
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).

classmethod main()[source]
name = 'fernet_setup'
class keystone.cmd.cli.MappingEngineTester[source]

Bases: keystone.cmd.cli.BaseApp

Execute mapping engine locally.

classmethod add_argument_parser(subparsers)[source]
classmethod main()[source]
name = 'mapping_engine'
static normalize_assertion(assertion)[source]
static normalize_rules(rules)[source]
static read_file(path)[source]
static read_rules(path)[source]
class keystone.cmd.cli.MappingPurge[source]

Bases: keystone.cmd.cli.BaseApp

Purge the mapping table.

classmethod add_argument_parser(subparsers)[source]
static main()[source]
name = 'mapping_purge'
class keystone.cmd.cli.PKISetup[source]

Bases: keystone.cmd.cli.BaseCertificateSetup

Set up Key pairs and certificates for token signing and verification.

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.

classmethod main()[source]
name = 'pki_setup'
class keystone.cmd.cli.SSLSetup[source]

Bases: keystone.cmd.cli.BaseCertificateSetup

Create key pairs and certificates for HTTPS connections.

This is NOT intended for production use, see Keystone Configuration documentation for details.

classmethod main()[source]
name = 'ssl_setup'
class keystone.cmd.cli.SamlIdentityProviderMetadata[source]

Bases: keystone.cmd.cli.BaseApp

Generate Identity Provider metadata.

static main()[source]
name = 'saml_idp_metadata'
class keystone.cmd.cli.TokenFlush[source]

Bases: keystone.cmd.cli.BaseApp

Flush expired tokens from the backend.

classmethod main()[source]
name = 'token_flush'
keystone.cmd.cli.add_command_parsers(subparsers)[source]
keystone.cmd.cli.main(argv=None, config_files=None)[source]

keystone.cmd.manage module

keystone.cmd.manage.main()[source]

Module contents

Table Of Contents

Previous topic

keystone.catalog.backends package

Next topic

keystone.common package

Project Source

This Page