open-policy-agent / contrib

Integrations, examples, and proof-of-concepts that are not part of OPA proper.
http://www.openpolicyagent.org/
Apache License 2.0
324 stars 152 forks source link

API permissions Best Practice #246

Open ben-shory opened 2 months ago

ben-shory commented 2 months ago

In the examples the context that is used in the policy contains the HTTP method and URL split. I expected to see something around the resource, action and maybe some other parameters so the policy is reusable between different modules regardless of the specific invocation method. Is this just a technical example? Is this considered a best practice? If not, are there resources about P&P?