keystoneauth1.access package¶
Submodules¶
- keystoneauth1.access.access module
AccessInfo
AccessInfo.audit_chain_id
AccessInfo.audit_id
AccessInfo.auth_token
AccessInfo.bind
AccessInfo.domain_id
AccessInfo.domain_name
AccessInfo.domain_scoped
AccessInfo.expires
AccessInfo.has_service_catalog()
AccessInfo.initial_audit_id
AccessInfo.is_admin_project
AccessInfo.is_federated
AccessInfo.issued
AccessInfo.oauth_access_token_id
AccessInfo.oauth_consumer_id
AccessInfo.project_domain_id
AccessInfo.project_domain_name
AccessInfo.project_id
AccessInfo.project_is_domain
AccessInfo.project_name
AccessInfo.project_scoped
AccessInfo.role_ids
AccessInfo.role_names
AccessInfo.scoped
AccessInfo.service_catalog
AccessInfo.service_providers
AccessInfo.system_scoped
AccessInfo.tenant_id
AccessInfo.tenant_name
AccessInfo.trust_id
AccessInfo.trust_scoped
AccessInfo.trustee_user_id
AccessInfo.trustor_user_id
AccessInfo.user_domain_id
AccessInfo.user_domain_name
AccessInfo.user_id
AccessInfo.username
AccessInfo.will_expire_soon()
AccessInfoV2
AccessInfoV2.audit_chain_id
AccessInfoV2.audit_id
AccessInfoV2.auth_token
AccessInfoV2.bind
AccessInfoV2.domain_id
AccessInfoV2.domain_name
AccessInfoV2.domain_scoped
AccessInfoV2.expires
AccessInfoV2.has_service_catalog()
AccessInfoV2.is_admin_project
AccessInfoV2.is_federated
AccessInfoV2.issued
AccessInfoV2.oauth_access_token_id
AccessInfoV2.oauth_consumer_id
AccessInfoV2.project_domain_id
AccessInfoV2.project_domain_name
AccessInfoV2.project_id
AccessInfoV2.project_is_domain
AccessInfoV2.project_name
AccessInfoV2.role_ids
AccessInfoV2.role_names
AccessInfoV2.service_providers
AccessInfoV2.system_scoped
AccessInfoV2.trust_id
AccessInfoV2.trust_scoped
AccessInfoV2.trustee_user_id
AccessInfoV2.trustor_user_id
AccessInfoV2.user_domain_id
AccessInfoV2.user_domain_name
AccessInfoV2.user_id
AccessInfoV2.username
AccessInfoV2.version
AccessInfoV3
AccessInfoV3.application_credential
AccessInfoV3.application_credential_access_rules
AccessInfoV3.application_credential_id
AccessInfoV3.audit_chain_id
AccessInfoV3.audit_id
AccessInfoV3.bind
AccessInfoV3.domain_id
AccessInfoV3.domain_name
AccessInfoV3.domain_scoped
AccessInfoV3.expires
AccessInfoV3.has_service_catalog()
AccessInfoV3.is_admin_project
AccessInfoV3.is_federated
AccessInfoV3.issued
AccessInfoV3.oauth2_credential
AccessInfoV3.oauth2_credential_thumbprint
AccessInfoV3.oauth_access_token_id
AccessInfoV3.oauth_consumer_id
AccessInfoV3.project_domain_id
AccessInfoV3.project_domain_name
AccessInfoV3.project_id
AccessInfoV3.project_is_domain
AccessInfoV3.project_name
AccessInfoV3.role_ids
AccessInfoV3.role_names
AccessInfoV3.service_providers
AccessInfoV3.system
AccessInfoV3.system_scoped
AccessInfoV3.trust_id
AccessInfoV3.trust_scoped
AccessInfoV3.trustee_user_id
AccessInfoV3.trustor_user_id
AccessInfoV3.user_domain_id
AccessInfoV3.user_domain_name
AccessInfoV3.user_id
AccessInfoV3.username
AccessInfoV3.version
create()
- keystoneauth1.access.service_catalog module
ServiceCatalog
ServiceCatalog.catalog
ServiceCatalog.endpoint_data_for()
ServiceCatalog.get_endpoint_data_list()
ServiceCatalog.get_endpoints()
ServiceCatalog.get_endpoints_data()
ServiceCatalog.get_urls()
ServiceCatalog.is_interface_match()
ServiceCatalog.normalize_catalog()
ServiceCatalog.normalize_interface()
ServiceCatalog.url_for()
ServiceCatalogV2
ServiceCatalogV3
- keystoneauth1.access.service_providers module
Module contents¶
- class keystoneauth1.access.AccessInfo(body, auth_token=None)¶
Bases:
object
Encapsulates a raw authentication token from keystone.
Provides helper methods for extracting useful values from that token.
- property audit_chain_id¶
Return the audit chain ID if present.
In the event that a token was rescoped then this ID will be the
audit_id
of the initial token. Returns None if no value present.- Returns:
str or None.
- property audit_id¶
Return the audit ID if present.
- Returns:
str or None.
- property auth_token¶
Return the token_id associated with the auth request.
To be used in headers for authenticating OpenStack API requests.
- Returns:
str
- property bind¶
Information about external mechanisms the token is bound to.
If a token is bound to an external authentication mechanism it can only be used in conjunction with that mechanism. For example if bound to a kerberos principal it may only be accepted if there is also kerberos authentication performed on the request.
- Returns:
A dictionary or None. The key will be the bind type the value is a dictionary that is specific to the format of the bind type. Returns None if there is no bind information in the token.
- property domain_id¶
Return the domain id associated with the auth request.
- Returns:
str or None (if no domain associated with the token)
- property domain_name¶
Return the domain name associated with the auth request.
- Returns:
str or None (if no domain associated with the token)
- property domain_scoped¶
Return true if the auth token was scoped to a domain.
- Returns:
bool
- property expires¶
Return the token expiration (as datetime object).
- Returns:
datetime
- has_service_catalog()¶
Return true if the auth token has a service catalog.
- Returns:
boolean
- property initial_audit_id¶
The audit ID of the initially requested token.
This is the
audit_chain_id
if present or theaudit_id
.
- property is_admin_project¶
Return true if the current project scope is the admin project.
For backwards compatibility purposes if there is nothing specified in the token we always assume we are in the admin project, so this will default to True.
:returns boolean
- property is_federated¶
Return true if federation was used to get the token.
- Returns:
boolean
- property issued¶
Return the token issue time (as datetime object).
- Returns:
datetime
- property oauth_access_token_id¶
Return the access token ID if OAuth authentication used.
- Returns:
str or None.
- property oauth_consumer_id¶
Return the consumer ID if OAuth authentication used.
- Returns:
str or None.
- property project_domain_id¶
Return the project’s domain id associated with the auth request.
- Returns:
str
- property project_domain_name¶
Return the project’s domain name associated with the auth request.
- Returns:
str
- property project_id¶
Return the project ID associated with the auth request.
This returns None if the auth token wasn’t scoped to a project.
- Returns:
str or None (if no project associated with the token)
- property project_is_domain¶
Return if a project act as a domain.
- Returns:
bool
- property project_name¶
Return the project name associated with the auth request.
- Returns:
str or None (if no project associated with the token)
- property project_scoped¶
Return true if the auth token was scoped to a tenant (project).
- Returns:
bool
- property role_ids¶
Return a list of user’s role ids associated with the auth request.
- Returns:
a list of strings of role ids
- property role_names¶
Return a list of user’s role names associated with the auth request.
- Returns:
a list of strings of role names
- property scoped¶
Return true if the auth token was scoped.
Returns true if scoped to a tenant(project) or domain, and contains a populated service catalog.
This is deprecated, use project_scoped instead.
- Returns:
bool
- property service_catalog¶
- property service_providers¶
Return an object representing the list of trusted service providers.
Used for Keystone2Keystone federating-out.
- Returns:
keystoneauth1.service_providers.ServiceProviders
or None
- property system_scoped¶
Return true if the auth token was scoped to the system.
- Returns:
bool
- property tenant_id¶
Synonym for project_id.
- property tenant_name¶
Synonym for project_name.
- property trust_id¶
Return the trust id associated with the auth request.
- Returns:
str or None (if no trust associated with the token)
- property trust_scoped¶
Return true if the auth token was scoped from a delegated trust.
The trust delegation is via the OS-TRUST v3 extension.
- Returns:
bool
- property trustee_user_id¶
Return the trustee user id associated with a trust.
- Returns:
str or None (if no trust associated with the token)
- property trustor_user_id¶
Return the trustor user id associated with a trust.
- Returns:
str or None (if no trust associated with the token)
- property user_domain_id¶
Return the user’s domain id associated with the auth request.
- Returns:
str
- property user_domain_name¶
Return the user’s domain name associated with the auth request.
- Returns:
str
- property user_id¶
Return the user id associated with the auth request.
- Returns:
str
- property username¶
Return the username associated with the auth request.
Follows the pattern defined in the V2 API of first looking for ‘name’, returning that if available, and falling back to ‘username’ if name is unavailable.
- Returns:
str
- will_expire_soon(stale_duration=30)¶
Determine if expiration is about to occur.
- Returns:
true if expiration is within the given duration
- Return type:
boolean
- class keystoneauth1.access.AccessInfoV2(body, auth_token=None)¶
Bases:
AccessInfo
An object for encapsulating raw v2 auth token from identity service.
- property audit_chain_id¶
Return the audit chain ID if present.
In the event that a token was rescoped then this ID will be the
audit_id
of the initial token. Returns None if no value present.- Returns:
str or None.
- property audit_id¶
Return the audit ID if present.
- Returns:
str or None.
- property auth_token¶
Return the token_id associated with the auth request.
To be used in headers for authenticating OpenStack API requests.
- Returns:
str
- property bind¶
Information about external mechanisms the token is bound to.
If a token is bound to an external authentication mechanism it can only be used in conjunction with that mechanism. For example if bound to a kerberos principal it may only be accepted if there is also kerberos authentication performed on the request.
- Returns:
A dictionary or None. The key will be the bind type the value is a dictionary that is specific to the format of the bind type. Returns None if there is no bind information in the token.
- property domain_id¶
Return the domain id associated with the auth request.
- Returns:
str or None (if no domain associated with the token)
- property domain_name¶
Return the domain name associated with the auth request.
- Returns:
str or None (if no domain associated with the token)
- property domain_scoped¶
Return true if the auth token was scoped to a domain.
- Returns:
bool
- property expires¶
Return the token expiration (as datetime object).
- Returns:
datetime
- has_service_catalog()¶
Return true if the auth token has a service catalog.
- Returns:
boolean
- property is_admin_project¶
Return true if the current project scope is the admin project.
For backwards compatibility purposes if there is nothing specified in the token we always assume we are in the admin project, so this will default to True.
:returns boolean
- property is_federated¶
Return true if federation was used to get the token.
- Returns:
boolean
- property issued¶
Return the token issue time (as datetime object).
- Returns:
datetime
- property oauth_access_token_id¶
Return the access token ID if OAuth authentication used.
- Returns:
str or None.
- property oauth_consumer_id¶
Return the consumer ID if OAuth authentication used.
- Returns:
str or None.
- property project_domain_id¶
Return the project’s domain id associated with the auth request.
- Returns:
str
- property project_domain_name¶
Return the project’s domain name associated with the auth request.
- Returns:
str
- property project_id¶
Return the project ID associated with the auth request.
This returns None if the auth token wasn’t scoped to a project.
- Returns:
str or None (if no project associated with the token)
- property project_is_domain¶
Return if a project act as a domain.
- Returns:
bool
- property project_name¶
Return the project name associated with the auth request.
- Returns:
str or None (if no project associated with the token)
- property role_ids¶
Return a list of user’s role ids associated with the auth request.
- Returns:
a list of strings of role ids
- property role_names¶
Return a list of user’s role names associated with the auth request.
- Returns:
a list of strings of role names
- property service_providers¶
Return an object representing the list of trusted service providers.
Used for Keystone2Keystone federating-out.
- Returns:
keystoneauth1.service_providers.ServiceProviders
or None
- property system_scoped¶
Return true if the auth token was scoped to the system.
- Returns:
bool
- property trust_id¶
Return the trust id associated with the auth request.
- Returns:
str or None (if no trust associated with the token)
- property trust_scoped¶
Return true if the auth token was scoped from a delegated trust.
The trust delegation is via the OS-TRUST v3 extension.
- Returns:
bool
- property trustee_user_id¶
Return the trustee user id associated with a trust.
- Returns:
str or None (if no trust associated with the token)
- property trustor_user_id¶
Return the trustor user id associated with a trust.
- Returns:
str or None (if no trust associated with the token)
- property user_domain_id¶
Return the user’s domain id associated with the auth request.
- Returns:
str
- property user_domain_name¶
Return the user’s domain name associated with the auth request.
- Returns:
str
- property user_id¶
Return the user id associated with the auth request.
- Returns:
str
- property username¶
Return the username associated with the auth request.
Follows the pattern defined in the V2 API of first looking for ‘name’, returning that if available, and falling back to ‘username’ if name is unavailable.
- Returns:
str
- version = 'v2.0'¶
- class keystoneauth1.access.AccessInfoV3(body, auth_token=None)¶
Bases:
AccessInfo
An object encapsulating raw v3 auth token from identity service.
- property application_credential¶
- property application_credential_access_rules¶
- property application_credential_id¶
- property audit_chain_id¶
Return the audit chain ID if present.
In the event that a token was rescoped then this ID will be the
audit_id
of the initial token. Returns None if no value present.- Returns:
str or None.
- property audit_id¶
Return the audit ID if present.
- Returns:
str or None.
- property bind¶
Information about external mechanisms the token is bound to.
If a token is bound to an external authentication mechanism it can only be used in conjunction with that mechanism. For example if bound to a kerberos principal it may only be accepted if there is also kerberos authentication performed on the request.
- Returns:
A dictionary or None. The key will be the bind type the value is a dictionary that is specific to the format of the bind type. Returns None if there is no bind information in the token.
- property domain_id¶
Return the domain id associated with the auth request.
- Returns:
str or None (if no domain associated with the token)
- property domain_name¶
Return the domain name associated with the auth request.
- Returns:
str or None (if no domain associated with the token)
- property domain_scoped¶
Return true if the auth token was scoped to a domain.
- Returns:
bool
- property expires¶
Return the token expiration (as datetime object).
- Returns:
datetime
- has_service_catalog()¶
Return true if the auth token has a service catalog.
- Returns:
boolean
- property is_admin_project¶
Return true if the current project scope is the admin project.
For backwards compatibility purposes if there is nothing specified in the token we always assume we are in the admin project, so this will default to True.
:returns boolean
- property is_federated¶
Return true if federation was used to get the token.
- Returns:
boolean
- property issued¶
Return the token issue time (as datetime object).
- Returns:
datetime
- property oauth2_credential¶
- property oauth2_credential_thumbprint¶
- property oauth_access_token_id¶
Return the access token ID if OAuth authentication used.
- Returns:
str or None.
- property oauth_consumer_id¶
Return the consumer ID if OAuth authentication used.
- Returns:
str or None.
- property project_domain_id¶
Return the project’s domain id associated with the auth request.
- Returns:
str
- property project_domain_name¶
Return the project’s domain name associated with the auth request.
- Returns:
str
- property project_id¶
Return the project ID associated with the auth request.
This returns None if the auth token wasn’t scoped to a project.
- Returns:
str or None (if no project associated with the token)
- property project_is_domain¶
Return if a project act as a domain.
- Returns:
bool
- property project_name¶
Return the project name associated with the auth request.
- Returns:
str or None (if no project associated with the token)
- property role_ids¶
Return a list of user’s role ids associated with the auth request.
- Returns:
a list of strings of role ids
- property role_names¶
Return a list of user’s role names associated with the auth request.
- Returns:
a list of strings of role names
- property service_providers¶
Return an object representing the list of trusted service providers.
Used for Keystone2Keystone federating-out.
- Returns:
keystoneauth1.service_providers.ServiceProviders
or None
- property system¶
- property system_scoped¶
Return true if the auth token was scoped to the system.
- Returns:
bool
- property trust_id¶
Return the trust id associated with the auth request.
- Returns:
str or None (if no trust associated with the token)
- property trust_scoped¶
Return true if the auth token was scoped from a delegated trust.
The trust delegation is via the OS-TRUST v3 extension.
- Returns:
bool
- property trustee_user_id¶
Return the trustee user id associated with a trust.
- Returns:
str or None (if no trust associated with the token)
- property trustor_user_id¶
Return the trustor user id associated with a trust.
- Returns:
str or None (if no trust associated with the token)
- property user_domain_id¶
Return the user’s domain id associated with the auth request.
- Returns:
str
- property user_domain_name¶
Return the user’s domain name associated with the auth request.
- Returns:
str
- property user_id¶
Return the user id associated with the auth request.
- Returns:
str
- property username¶
Return the username associated with the auth request.
Follows the pattern defined in the V2 API of first looking for ‘name’, returning that if available, and falling back to ‘username’ if name is unavailable.
- Returns:
str
- version = 'v3'¶
- keystoneauth1.access.create(resp=None, body=None, auth_token=None)¶