Supported clients

There are two supported clients, python-keystoneclient project provides python bindings and python-openstackclient provides a command line interface.

Authenticating with a Password via CLI

To authenticate with keystone using a password and python-openstackclient, set the following flags, note that the following user referenced below should be granted the admin role.

  • --os-username OS_USERNAME: Name of your user

  • --os-user-domain-name OS_USER_DOMAIN_NAME: Name of the user’s domain

  • --os-password OS_PASSWORD: Password for your user

  • --os-project-name OS_PROJECT_NAME: Name of your project

  • --os-project-domain-name OS_PROJECT_DOMAIN_NAME: Name of the project’s domain

  • --os-auth-url OS_AUTH_URL: URL of the keystone authentication server

  • --os-identity-api-version OS_IDENTITY_API_VERSION: This should always be set to 3

You can also set these variables in your environment so that they do not need to be passed as arguments each time:

$exportOS_USERNAME=my_username
$exportOS_USER_DOMAIN_NAME=my_user_domain
$exportOS_PASSWORD=my_password
$exportOS_PROJECT_NAME=my_project
$exportOS_PROJECT_DOMAIN_NAME=my_project_domain
$exportOS_AUTH_URL=http://localhost:5000/v3
$exportOS_IDENTITY_API_VERSION=3

For example, the commands user list, token issue and project create can be invoked as follows:

# Using password authentication, with environment variables
$exportOS_USERNAME=admin
$exportOS_USER_DOMAIN_NAME=Default
$exportOS_PASSWORD=secret
$exportOS_PROJECT_NAME=admin
$exportOS_PROJECT_DOMAIN_NAME=Default
$exportOS_AUTH_URL=http://localhost:5000/v3
$exportOS_IDENTITY_API_VERSION=3
$openstackuserlist
$openstackprojectcreatedemo
$openstacktokenissue
# Using password authentication, with flags
$openstack--os-username=admin--os-user-domain-name=Default\
--os-password=secret\
--os-project-name=admin--os-project-domain-name=Default\
--os-auth-url=http://localhost:5000/v3--os-identity-api-version=3\
userlist
$openstack--os-username=admin--os-user-domain-name=Default\
--os-password=secret\
--os-project-name=admin--os-project-domain-name=Default\
--os-auth-url=http://localhost:5000/v3--os-identity-api-version=3\
projectcreatedemo