heat.common.context module

class heat.common.context.ContextMiddleware(app, conf, **local_conf)[source]

Bases: heat.common.wsgi.Middleware

process_request(req)[source]

Constructs an appropriate context from extracted auth information.

Extract any authentication information in the request and construct an appropriate context from it.

heat.common.context.ContextMiddleware_filter_factory(global_conf, **local_conf)[source]

Factory method for paste.deploy.

class heat.common.context.RequestContext(username=None, password=None, aws_creds=None, auth_url=None, roles=None, is_admin=None, read_only=False, show_deleted=False, overwrite=True, trust_id=None, trustor_user_id=None, request_id=None, auth_token_info=None, region_name=None, auth_plugin=None, trusts_auth_plugin=None, user_domain_id=None, project_domain_id=None, project_name=None, **kwargs)[source]

Bases: oslo_context.context.RequestContext

Stores information about the security context.

Under the security context the user accesses the system, as well as additional request information.

property auth_plugin
cache(cache_cls)[source]
property clients
classmethod from_dict(values)[source]

Construct a context object from a provided dictionary.

property keystone_session
property keystone_v3_endpoint
reload_auth_plugin()[source]
property session
property tenant_id
to_dict()[source]

Return a dictionary of context attributes.

to_policy_values()[source]

A dictionary of context attributes to enforce policy with.

oslo.policy enforcement requires a dictionary of attributes representing the current logged in user on which it applies policy enforcement. This dictionary defines a standard list of attributes that should be available for enforcement across services.

It is expected that services will often have to override this method with either deprecated values or additional attributes used by that service specific policy.

property trusts_auth_plugin
class heat.common.context.StoredContext(username=None, password=None, aws_creds=None, auth_url=None, roles=None, is_admin=None, read_only=False, show_deleted=False, overwrite=True, trust_id=None, trustor_user_id=None, request_id=None, auth_token_info=None, region_name=None, auth_plugin=None, trusts_auth_plugin=None, user_domain_id=None, project_domain_id=None, project_name=None, **kwargs)[source]

Bases: heat.common.context.RequestContext

property project_domain
property roles
property user_domain
heat.common.context.get_admin_context(show_deleted=False)[source]
heat.common.context.list_opts()[source]
heat.common.context.request_context(func)[source]