Files
python-keystoneclient/doc/source/shell.rst
Liem Nguyen abc7c47c18 Support 2-way SSL with Keystone server if it is configured to enforce
2-way SSL.  See also https://review.openstack.org/#/c/7706/ for the
corresponding review for the 2-way SSL addition to Keystone.

Change-Id: If0cb46a43d663687396d93604a7139d85a4e7114
2012-07-03 17:26:34 -04:00

2.3 KiB

The keystone shell utility

keystone

The keystone shell utility interacts with OpenStack Keystone API from the command line. It supports the entirety of the OpenStack Keystone API.

First, you'll need an OpenStack Keystone account. You get this by using the keystone-manage command in OpenStack Keystone.

You'll need to provide keystone with your OpenStack username and password. You can do this with the --os-username, --os-password. You can optionally specify a --os-tenant-id or --os-tenant-name, to scope your token to a specific tenant. If you don't specify a tenant, you will be scoped to your default tenant if you have one. Instead of using options, it is easier to just set them as environment variables:

OS_USERNAME

Your Keystone username.

OS_PASSWORD

Your Keystone password.

OS_TENANT_NAME

Name of Keystone Tenant.

OS_TENANT_ID

ID of Keystone Tenant.

OS_AUTH_URL

The OpenStack API server URL.

OS_IDENTITY_API_VERSION

The OpenStack Identity API version.

OS_CA_CERT

The location for the CA truststore (PEM formatted) for this client.

OS_CERT

The location for the keystore (PEM formatted) containing the public key of this client. This keystore can also optionally contain the private key of this client.

OS_KEY

The location for the keystore (PEM formatted) containing the private key of this client. This value can be empty if the private key is included in the OS_CERT file.

For example, in Bash you'd use:

export OS_USERNAME=yourname
export OS_PASSWORD=yadayadayada
export OS_TENANT_NAME=myproject
export OS_AUTH_URL=http(s)://example.com:5000/v2.0/
export OS_IDENTITY_API_VERSION=2.0
export OS_CA_CERT=/etc/keystone/yourca.pem
export OS_CERT=/etc/keystone/yourpublickey.pem
export OS_KEY=/etc/keystone/yourprivatekey.pem

From there, all shell commands take the form:

keystone <command> [arguments...]

Run keystone help to get a full list of all possible commands, and run keystone help <command> to get detailed help for that command.