Bases: BaseIdentityPlugin
A plugin that turns an existing AccessInfo object into a usable plugin.
There are cases where reuse of an auth_ref or AccessInfo object is warranted such as from a cache, from auth_token middleware, or another source.
Turn the existing access info object into an identity plugin. This plugin cannot be refreshed as the AccessInfo object does not contain any authorizing information.
auth_ref (keystoneclient.access.AccessInfo) – the existing AccessInfo object.
auth_url – the url where this AccessInfo was retrieved from. Required if using the AUTH_INTERFACE with get_endpoint. (optional)
Obtain a token from an OpenStack Identity Service.
This method is overridden by the various token version plugins.
This method should not be called independently and is expected to be invoked via the do_authenticate() method.
This method will be invoked if the AccessInfo object cached by the plugin is not valid. Thus plugins should always fetch a new AccessInfo when invoked. If you are looking to just retrieve the current auth data then you should use get_access().
session (keystoneclient.session.Session) – A session object that can be used for communication.
keystoneclient.exceptions.InvalidResponse – The response returned wasn’t appropriate.
keystoneclient.exceptions.HttpError – An error from an invalid HTTP response.
Token access information.
Invalidate the current authentication data.
This should result in fetching a new token on next call.
A plugin may be invalidated if an Unauthorized HTTP response is returned to indicate that the token may have been revoked or is otherwise now invalid.
True if there was something that the plugin did to invalidate. This means that it makes sense to try again. If nothing happens returns False to indicate give up.
bool
Bases: BaseAuthPlugin
Fetch or return a current AccessInfo object.
If a valid AccessInfo is present then it is returned otherwise a new one will be fetched.
session (keystoneclient.session.Session) – A session object that can be used for communication.
keystoneclient.exceptions.HttpError – An error from an invalid HTTP response.
Valid AccessInfo
Obtain a token from an OpenStack Identity Service.
This method is overridden by the various token version plugins.
This method should not be called independently and is expected to be invoked via the do_authenticate() method.
This method will be invoked if the AccessInfo object cached by the plugin is not valid. Thus plugins should always fetch a new AccessInfo when invoked. If you are looking to just retrieve the current auth data then you should use get_access().
session (keystoneclient.session.Session) – A session object that can be used for communication.
keystoneclient.exceptions.InvalidResponse – The response returned wasn’t appropriate.
keystoneclient.exceptions.HttpError – An error from an invalid HTTP response.
Token access information.
Return the discovery object for a URL.
Check the session and the plugin cache to see if we have already performed discovery on the URL and if so return it, otherwise create a new discovery object, cache it and return it.
This function is expected to be used by subclasses and should not be needed by users.
session (keystoneclient.session.Session) – A session object to discover with.
url (str) – The url to lookup.
authenticated (bool) – Include a token in the discovery call. (optional) Defaults to None (use a token if a plugin is installed).
keystoneclient.exceptions.DiscoveryFailure – if for some reason the lookup fails.
keystoneclient.exceptions.HttpError – An error from an invalid HTTP response.
A discovery object with the results of looking up that URL.
Return a valid endpoint for a service.
If a valid token is not present then a new one will be fetched using the session and kwargs.
session (keystoneclient.session.Session) – A session object that can be used for communication.
service_type (string) – The type of service to lookup the endpoint for. This plugin will return None (failure) if service_type is not provided.
interface (string) – The exposure of the endpoint. Should be public, internal, admin, or auth. auth is special here to use the auth_url rather than a URL extracted from the service catalog. Defaults to public.
region_name (string) – The region the endpoint should exist in. (optional)
service_name (string) – The name of the service in the catalog. (optional)
version (tuple) – The minimum version number required for this endpoint. (optional)
keystoneclient.exceptions.HttpError – An error from an invalid HTTP response.
A valid endpoint URL or None if not available.
string or None
Return the list of parameters associated with the auth plugin.
This list may be used to generate CLI or config arguments.
A list of Param objects describing available plugin parameters.
List
Return the project id that we are authenticated to.
Wherever possible the project id should be inferred from the token however there are certain URLs and other places that require access to the currently authenticated project id.
session (keystoneclient.session.Session) – A session object so the plugin can make HTTP calls.
A project identifier or None if one is not available.
str
Return a valid auth token.
If a valid token is not present then a new one will be fetched.
session (keystoneclient.session.Session) – A session object that can be used for communication.
keystoneclient.exceptions.HttpError – An error from an invalid HTTP response.
A valid token.
string
Return a unique user identifier of the plugin.
Wherever possible the user id should be inferred from the token however there are certain URLs and other places that require access to the currently authenticated user id.
session (keystoneclient.session.Session) – A session object so the plugin can make HTTP calls.
A user identifier or None if one is not available.
str
Invalidate the current authentication data.
This should result in fetching a new token on next call.
A plugin may be invalidated if an Unauthorized HTTP response is returned to indicate that the token may have been revoked or is otherwise now invalid.
True if there was something that the plugin did to invalidate. This means that it makes sense to try again. If nothing happens returns False to indicate give up.
bool
Deprecated as of the 1.7.0 release.
It may be removed in the 2.0.0 release.
Deprecated as of the 1.7.0 release.
It may be removed in the 2.0.0 release.
Deprecated as of the 1.7.0 release.
It may be removed in the 2.0.0 release.
Deprecated as of the 1.7.0 release.
It may be removed in the 2.0.0 release.
Bases: BaseIdentityPlugin
Identity V2 Authentication Plugin.
auth_url (string) – Identity service endpoint for authorization.
trust_id (string) – Trust ID for trust scoping.
tenant_id (string) – Tenant ID for project scoping.
tenant_name (string) – Tenant name for project scoping.
reauthenticate (bool) – Allow fetching a new token if the current one is going to expire. (optional) default True
Return the authentication section of an auth plugin.
headers (dict) – The headers that will be sent with the auth request if a plugin needs to add to them.
A dict of authentication data for the auth type.
dict
Obtain a token from an OpenStack Identity Service.
This method is overridden by the various token version plugins.
This method should not be called independently and is expected to be invoked via the do_authenticate() method.
This method will be invoked if the AccessInfo object cached by the plugin is not valid. Thus plugins should always fetch a new AccessInfo when invoked. If you are looking to just retrieve the current auth data then you should use get_access().
session (keystoneclient.session.Session) – A session object that can be used for communication.
keystoneclient.exceptions.InvalidResponse – The response returned wasn’t appropriate.
keystoneclient.exceptions.HttpError – An error from an invalid HTTP response.
Token access information.
Return the list of parameters associated with the auth plugin.
This list may be used to generate CLI or config arguments.
A list of Param objects describing available plugin parameters.
List
Deprecated as of the 1.7.0 release.
It may be removed in the 2.0.0 release.
Bases: Auth
A plugin for authenticating with a username and password.
A username or user_id must be provided.
auth_url (string) – Identity service endpoint for authorization.
username (string) – Username for authentication.
password (string) – Password for authentication.
user_id (string) – User ID for authentication.
trust_id (string) – Trust ID for trust scoping.
tenant_id (string) – Tenant ID for tenant scoping.
tenant_name (string) – Tenant name for tenant scoping.
reauthenticate (bool) – Allow fetching a new token if the current one is going to expire. (optional) default True
TypeError – if a user_id or username is not provided.
Return the authentication section of an auth plugin.
headers (dict) – The headers that will be sent with the auth request if a plugin needs to add to them.
A dict of authentication data for the auth type.
dict
Return the list of parameters associated with the auth plugin.
This list may be used to generate CLI or config arguments.
A list of Param objects describing available plugin parameters.
List
Load a specific plugin object from an argparse result.
Convert the results of a parse into the specified plugin.
namespace (argparse.Namespace) – The result from CLI parsing.
An auth plugin, or None if a name is not provided.
Deprecated as of the 1.7.0 release.
It may be removed in the 2.0.0 release.
Deprecated as of the 1.7.0 release.
It may be removed in the 2.0.0 release.
Bases: Auth
A plugin for authenticating with an existing token.
auth_url (string) – Identity service endpoint for authorization.
token (string) – Existing token for authentication.
tenant_id (string) – Tenant ID for tenant scoping.
tenant_name (string) – Tenant name for tenant scoping.
trust_id (string) – Trust ID for trust scoping.
reauthenticate (bool) – Allow fetching a new token if the current one is going to expire. (optional) default True
Return the authentication section of an auth plugin.
headers (dict) – The headers that will be sent with the auth request if a plugin needs to add to them.
A dict of authentication data for the auth type.
dict
Return the list of parameters associated with the auth plugin.
This list may be used to generate CLI or config arguments.
A list of Param objects describing available plugin parameters.
List
Deprecated as of the 1.7.0 release.
It may be removed in the 2.0.0 release.
Bases: BaseAuthPlugin
Fetch or return a current AccessInfo object.
If a valid AccessInfo is present then it is returned otherwise a new one will be fetched.
session (keystoneclient.session.Session) – A session object that can be used for communication.
keystoneclient.exceptions.HttpError – An error from an invalid HTTP response.
Valid AccessInfo
Obtain a token from an OpenStack Identity Service.
This method is overridden by the various token version plugins.
This method should not be called independently and is expected to be invoked via the do_authenticate() method.
This method will be invoked if the AccessInfo object cached by the plugin is not valid. Thus plugins should always fetch a new AccessInfo when invoked. If you are looking to just retrieve the current auth data then you should use get_access().
session (keystoneclient.session.Session) – A session object that can be used for communication.
keystoneclient.exceptions.InvalidResponse – The response returned wasn’t appropriate.
keystoneclient.exceptions.HttpError – An error from an invalid HTTP response.
Token access information.
Return the discovery object for a URL.
Check the session and the plugin cache to see if we have already performed discovery on the URL and if so return it, otherwise create a new discovery object, cache it and return it.
This function is expected to be used by subclasses and should not be needed by users.
session (keystoneclient.session.Session) – A session object to discover with.
url (str) – The url to lookup.
authenticated (bool) – Include a token in the discovery call. (optional) Defaults to None (use a token if a plugin is installed).
keystoneclient.exceptions.DiscoveryFailure – if for some reason the lookup fails.
keystoneclient.exceptions.HttpError – An error from an invalid HTTP response.
A discovery object with the results of looking up that URL.
Return a valid endpoint for a service.
If a valid token is not present then a new one will be fetched using the session and kwargs.
session (keystoneclient.session.Session) – A session object that can be used for communication.
service_type (string) – The type of service to lookup the endpoint for. This plugin will return None (failure) if service_type is not provided.
interface (string) – The exposure of the endpoint. Should be public, internal, admin, or auth. auth is special here to use the auth_url rather than a URL extracted from the service catalog. Defaults to public.
region_name (string) – The region the endpoint should exist in. (optional)
service_name (string) – The name of the service in the catalog. (optional)
version (tuple) – The minimum version number required for this endpoint. (optional)
keystoneclient.exceptions.HttpError – An error from an invalid HTTP response.
A valid endpoint URL or None if not available.
string or None
Return the list of parameters associated with the auth plugin.
This list may be used to generate CLI or config arguments.
A list of Param objects describing available plugin parameters.
List
Return the project id that we are authenticated to.
Wherever possible the project id should be inferred from the token however there are certain URLs and other places that require access to the currently authenticated project id.
session (keystoneclient.session.Session) – A session object so the plugin can make HTTP calls.
A project identifier or None if one is not available.
str
Return a valid auth token.
If a valid token is not present then a new one will be fetched.
session (keystoneclient.session.Session) – A session object that can be used for communication.
keystoneclient.exceptions.HttpError – An error from an invalid HTTP response.
A valid token.
string
Return a unique user identifier of the plugin.
Wherever possible the user id should be inferred from the token however there are certain URLs and other places that require access to the currently authenticated user id.
session (keystoneclient.session.Session) – A session object so the plugin can make HTTP calls.
A user identifier or None if one is not available.
str
Invalidate the current authentication data.
This should result in fetching a new token on next call.
A plugin may be invalidated if an Unauthorized HTTP response is returned to indicate that the token may have been revoked or is otherwise now invalid.
True if there was something that the plugin did to invalidate. This means that it makes sense to try again. If nothing happens returns False to indicate give up.
bool
Deprecated as of the 1.7.0 release.
It may be removed in the 2.0.0 release.
Deprecated as of the 1.7.0 release.
It may be removed in the 2.0.0 release.
Deprecated as of the 1.7.0 release.
It may be removed in the 2.0.0 release.
Deprecated as of the 1.7.0 release.
It may be removed in the 2.0.0 release.
Bases: BaseGenericPlugin
A common user/password authentication plugin.
username (string) – Username for authentication.
user_id (string) – User ID for authentication.
password (string) – Password for authentication.
user_domain_id (string) – User’s domain ID for authentication.
user_domain_name (string) – User’s domain name for authentication.
Create a plugin from the given parameters.
This function will be called multiple times with the version and url of a potential endpoint. If a plugin can be constructed that fits the params then it should return it. If not return None and then another call will be made with other available URLs.
session (keystoneclient.session.Session) – A session object.
version (tuple) – A tuple of the API version at the URL.
url (string) – The base URL for this version.
raw_status (string) – The status that was in the discovery field.
A plugin that can match the parameters or None if nothing.
Return the list of parameters associated with the auth plugin.
This list may be used to generate CLI or config arguments.
A list of Param objects describing available plugin parameters.
List
Load a specific plugin object from an argparse result.
Convert the results of a parse into the specified plugin.
namespace (argparse.Namespace) – The result from CLI parsing.
An auth plugin, or None if a name is not provided.
Bases: BaseGenericPlugin
Generic token auth plugin.
token (string) – Token for authentication.
Create a plugin from the given parameters.
This function will be called multiple times with the version and url of a potential endpoint. If a plugin can be constructed that fits the params then it should return it. If not return None and then another call will be made with other available URLs.
session (keystoneclient.session.Session) – A session object.
version (tuple) – A tuple of the API version at the URL.
url (string) – The base URL for this version.
raw_status (string) – The status that was in the discovery field.
A plugin that can match the parameters or None if nothing.
Return the list of parameters associated with the auth plugin.
This list may be used to generate CLI or config arguments.
A list of Param objects describing available plugin parameters.
List
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.