ironic_inspector.common.context module¶
- class ironic_inspector.common.context.RequestContext(is_public_api=False, **kwargs)[source]¶
Bases:
RequestContext
Extends security contexts from the oslo.context library.
- classmethod from_dict(values, **kwargs)[source]¶
Construct a context object from a provided dictionary.
- classmethod from_environ(environ, **kwargs)[source]¶
Load a context object from a request environment.
If keyword arguments are provided then they override the values in the request environment.
- Parameters:
environ (dict) – The environment dictionary associated with a request.
- 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.