# keystone.common.context module

class keystone.common.context.RequestContext(**kwargs)

  Bases: `RequestContext`

  to_policy_values()

    Add keystone-specific policy values to policy representation.

    This method converts generic policy values to a dictionary form using the base implementation from oslo_context.context.RequestContext. Afterwards, it is going to pull keystone-specific values off the context and represent them as items in the policy values dictionary. This is because keystone uses default policies that rely on these values, so we need to guarantee they are present during policy enforcement if they are present on the context object.

    This method is automatically called in oslo_policy.policy.Enforcer.enforce() if oslo.policy knows it’s dealing with a context object.

this page last updated: 2026-04-01 20:09:17

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug