Chapter 6. Identity Service Command-line Client

The keystone-manage client is the command-line interface (CLI) for the OpenStack Identity API and its extensions. This chapter documents keystone-manage version 10.0.0.
For help on a specific keystone-manage command, enter:
$ keystone-manage COMMAND --help

6.1. keystone-manage Usage

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush]

6.2. keystone-manage Optional Arguments

-h, --help


        show this help message and exit

--config-dir DIR


        Path to a config directory to pull *.conf files from.
      This file set is sorted, so as to provide a
      predictable parse order if individual options are
      over-ridden. The set is parsed after the file(s)
      specified via previous --config-file, arguments hence
      over-ridden options in the directory take precedence.

--config-file PATH


        Path to a config file to use. Multiple config files
      can be specified, with values in later files taking
      precedence. Defaults to None.

--debug, -d


        If set to true, the logging level will be set to DEBUG
      instead of the default INFO level.

--log-config-append PATH, --log_config PATH


      The name of a logging configuration file. This file is
      appended to any existing logging configuration files.
      For details about logging configuration files, see the
      Python logging module documentation. Note that when
      logging configuration files are used then all logging
      configuration is set in the configuration file and
      other logging configuration options are ignored (for
      example, logging_context_format_string).

--log-date-format DATE_FORMAT


      Defines the format string for %(asctime)s in log
      records. Default: None . This option is ignored if
      log_config_append is set.

--log-dir LOG_DIR, --logdir LOG_DIR


      (Optional) The base directory used for relative
      log_file paths. This option is ignored if
      log_config_append is set.

--log-file PATH, --logfile PATH


      (Optional) Name of log file to send logging output to.
      If no default is set, logging will go to stderr as
      defined by use_stderr. This option is ignored if
      log_config_append is set.

--nodebug


        The inverse of --debug

--nostandard-threads


        The inverse of --standard-threads

--nouse-syslog


        The inverse of --use-syslog

--noverbose


        The inverse of --verbose

--nowatch-log-file


        The inverse of --watch-log-file

--pydev-debug-host PYDEV_DEBUG_HOST


      Host to connect to for remote debugger.

--pydev-debug-port PYDEV_DEBUG_PORT


      Port to connect to for remote debugger.

--standard-threads


        Do not monkey-patch threading system modules.

--syslog-log-facility SYSLOG_LOG_FACILITY


      Syslog facility to receive log lines. This option is
      ignored if log_config_append is set.

--use-syslog


        Use syslog for logging. Existing syslog format is
      DEPRECATED and will be changed later to honor RFC5424.
      This option is ignored if log_config_append is set.

--verbose, -v


        If set to false, the logging level will be set to
      WARNING instead of the default INFO level.

--version


        show program's version number and exit

--watch-log-file


        Uses logging handler designed to watch file system.
      When log file is moved or removed this handler will
      open a new log file with specified path
      instantaneously. It makes sense only if log_file
      option is specified and Linux platform is used. This
      option is ignored if log_config_append is set.

6.3. keystone-manage bootstrap

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush] bootstrap
       [-h] [--bootstrap-username OS_BOOTSTRAP_USERNAME]
       [--bootstrap-password OS_BOOTSTRAP_PASSWORD]
       [--bootstrap-project-name OS_BOOTSTRAP_PROJECT_NAME]
       [--bootstrap-role-name OS_BOOTSTRAP_ROLE_NAME]
       [--bootstrap-service-name OS_BOOTSTRAP_SERVICE_NAME]
       [--bootstrap-admin-url OS_BOOTSTRAP_ADMIN_URL]
       [--bootstrap-public-url OS_BOOTSTRAP_PUBLIC_URL]
       [--bootstrap-internal-url OS_BOOTSTRAP_INTERNAL_URL]
       [--bootstrap-region-id OS_BOOTSTRAP_REGION_ID]

Optional arguments

-h, --help


        show this help message and exit

--bootstrap-username OS_BOOTSTRAP_USERNAME


      The username of the initial keystone user during
      bootstrap process.

--bootstrap-password OS_BOOTSTRAP_PASSWORD


      The bootstrap user password

--bootstrap-project-name OS_BOOTSTRAP_PROJECT_NAME


      The initial project created during the keystone
      bootstrap process.

--bootstrap-role-name OS_BOOTSTRAP_ROLE_NAME


      The initial role-name created during the keystone
      bootstrap process.

--bootstrap-service-name OS_BOOTSTRAP_SERVICE_NAME


      The initial name for the initial identity service
      created during the keystone bootstrap process.

--bootstrap-admin-url OS_BOOTSTRAP_ADMIN_URL


      The initial identity admin url created during the
      keystone bootstrap process. e.g.
      http://127.0.0.1:35357/v2.0

--bootstrap-public-url OS_BOOTSTRAP_PUBLIC_URL


      The initial identity public url created during the
      keystone bootstrap process. e.g.
      http://127.0.0.1:5000/v2.0

--bootstrap-internal-url OS_BOOTSTRAP_INTERNAL_URL


      The initial identity internal url created during the
      keystone bootstrap process. e.g.
      http://127.0.0.1:5000/v2.0

--bootstrap-region-id OS_BOOTSTRAP_REGION_ID


      The initial region_id endpoints will be placed in
      during the keystone bootstrap process.

6.4. keystone-manage credential_migrate

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush] credential_migrate
       [-h] [--keystone-user KEYSTONE_USER] [--keystone-group KEYSTONE_GROUP]

Optional arguments

-h, --help


        show this help message and exit

--keystone-user KEYSTONE_USER

--keystone-group KEYSTONE_GROUP

6.5. keystone-manage credential_rotate

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush] credential_rotate
       [-h] [--keystone-user KEYSTONE_USER] [--keystone-group KEYSTONE_GROUP]

Optional arguments

-h, --help


        show this help message and exit

--keystone-user KEYSTONE_USER

--keystone-group KEYSTONE_GROUP

6.6. keystone-manage credential_setup

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush] credential_setup
       [-h] [--keystone-user KEYSTONE_USER] [--keystone-group KEYSTONE_GROUP]

Optional arguments

-h, --help


        show this help message and exit

--keystone-user KEYSTONE_USER

--keystone-group KEYSTONE_GROUP

6.7. keystone-manage db_sync

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush] db_sync
       [-h] [--extension EXTENSION] [--expand | --migrate | --contract]
       [version]

Positional arguments

version


        Migrate the database up to a specified version. If not
      provided, db_sync will migrate the database to the
      latest known version. Schema downgrades are not
      supported.

Optional arguments

-h, --help


        show this help message and exit

--extension EXTENSION


      This is a deprecated option to migrate a specified
      extension. Since extensions are now part of the main
      repository, specifying db_sync without this option
      will cause all extensions to be migrated.

--expand


        Expand the database schema in preparation for data
      migration.

--migrate


        Copy all data that needs to be migrated within the
      database ahead of starting the first keystone node
      upgraded to the new release. This command should be
      run after the --expand command. Once the --migrate
      command has completed, you can upgrade all your
      keystone nodes to the new release and restart them.

--contract


        Remove any database tables and columns that are no
      longer required. This command should be run after all
      keystone nodes are running the new release.

6.8. keystone-manage db_version

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush] db_version
       [-h] [--extension EXTENSION]

Optional arguments

-h, --help


        show this help message and exit

--extension EXTENSION


      This is a deprecated option to print the version of a
      specified extension. Since extensions are now part of
      the main repository, the version of an extension is
      implicit in the version of the main repository.

6.9. keystone-manage doctor

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush] doctor
       [-h]

Optional arguments

-h, --help


        show this help message and exit

6.10. keystone-manage domain_config_upload

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush] domain_config_upload
       [-h] [--all] [--domain-name DOMAIN_NAME]

Optional arguments

-h, --help


        show this help message and exit

--all


        Upload contents of all domain specific configuration
      files. Either use this option or use the --domain-name
      option to choose a specific domain.

--domain-name DOMAIN_NAME


      Upload contents of the specific configuration file for
      the given domain. Either use this option or use the
      --all option to upload contents for all domains.

6.11. keystone-manage fernet_rotate

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush] fernet_rotate
       [-h] [--keystone-user KEYSTONE_USER] [--keystone-group KEYSTONE_GROUP]

Optional arguments

-h, --help


        show this help message and exit

--keystone-user KEYSTONE_USER

--keystone-group KEYSTONE_GROUP

6.12. keystone-manage fernet_setup

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush] fernet_setup
       [-h] [--keystone-user KEYSTONE_USER] [--keystone-group KEYSTONE_GROUP]

Optional arguments

-h, --help


        show this help message and exit

--keystone-user KEYSTONE_USER

--keystone-group KEYSTONE_GROUP

6.13. keystone-manage mapping_engine

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush] mapping_engine
       [-h] --rules RULES --input INPUT [--prefix PREFIX] [--engine-debug]

Optional arguments

-h, --help


        show this help message and exit

--rules RULES


        Path to the file with rules to be executed. Content must be
      a proper JSON structure, with a top-level key 'rules' and
      corresponding value being a list.

--input INPUT


        Path to the file with input attributes. The content
      consists of ':' separated parameter names and their values.
      There is only one key-value pair per line. A ';' in the
      value is a separator and then a value is treated as a list.
      Example: EMAIL: me@example.com LOGIN: me GROUPS:
      group1;group2;group3

--prefix PREFIX A


        prefix used for each environment variable in the
      assertion. For example, all environment variables may have
      the prefix ASDF_.

--engine-debug


        Enable debug messages from the mapping engine.

6.14. keystone-manage mapping_populate

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush] mapping_populate
       [-h] --domain-name DOMAIN_NAME

Optional arguments

-h, --help


        show this help message and exit

--domain-name DOMAIN_NAME


      Name of the domain configured to use domain-specific
      backend

6.15. keystone-manage mapping_purge

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush] mapping_purge
       [-h] [--all] [--domain-name DOMAIN_NAME] [--public-id PUBLIC_ID]
       [--local-id LOCAL_ID] [--type {user,group}]

Optional arguments

-h, --help


        show this help message and exit

--all


        Purge all mappings.

--domain-name DOMAIN_NAME


      Purge any mappings for the domain specified.

--public-id PUBLIC_ID


      Purge the mapping for the Public ID specified.

--local-id LOCAL_ID


        Purge the mappings for the Local ID specified.

--type {user,group}


        Purge any mappings for the type specified.

6.16. keystone-manage pki_setup

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush] pki_setup
       [-h] [--keystone-user KEYSTONE_USER] [--keystone-group KEYSTONE_GROUP]
       [--rebuild]

Optional arguments

-h, --help


        show this help message and exit

--keystone-user KEYSTONE_USER

--keystone-group KEYSTONE_GROUP

--rebuild


        Rebuild certificate files: erase previous files and
      regenerate them.

6.17. keystone-manage saml_idp_metadata

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush] saml_idp_metadata
       [-h]

Optional arguments

-h, --help


        show this help message and exit

6.18. keystone-manage token_flush

usage: keystone-manage [bootstrap|credential_migrate|credential_rotate|credential_setup|db_sync|db_version|doctor|domain_config_upload|fernet_rotate|fernet_setup|mapping_populate|mapping_purge|mapping_engine|pki_setup|saml_idp_metadata|token_flush] token_flush
       [-h]

Optional arguments

-h, --help


        show this help message and exit