The panko.api.rbac Module

Access Control Lists (ACL’s) control access the API server.

panko.api.rbac.enforce(policy_name, request)

Return the user and project the request should be limited to.

Parameters
  • request – HTTP request

  • policy_name – the policy name to validate authz against.

panko.api.rbac.get_limited_to(headers)

Return the user and project the request should be limited to.

Parameters

headers – HTTP headers dictionary

Returns

A tuple of (user, project), set to None if there’s no limit on one of these.

panko.api.rbac.get_limited_to_project(headers)

Return the project the request should be limited to.

Parameters

headers – HTTP headers dictionary

Returns

A project, or None if there’s no limit on it.

panko.api.rbac.init()
panko.api.rbac.reset()