opa
opa copied to clipboard
docs: Annotations doc should provide reference to Rego functions for accessing metadata
While there's even a section named "Accessing Annotations", it does not mention, or link to, the Rego reference docs for instructions on how to do this from inside of a policy.
Suggestion: add new sub-heading under "Acessing Annotations" called "Rego", providing a very simple example, and link to the policy reference for those functions.
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days.
Hey @anderseknert :wave: !
Hoping this URL works for you when you check it, I've not used Netlify much in the past so not sure how long it stays up.
Is this something (more or less) you're looking for? https://6330814e08aa9d269457dfc4--parsifal-opa.netlify.app/docs/edge/annotations/#accessing-annotations
You mentioned a very simple example and the one in the Rego
reference docs seemed actually quite simple :+1: even I understood it :smile: but if you had something else in mind please let me know?
Looking forward to your feedback!
This is great! Thanks @Parsifal-M 😃 I'd probably skip the use of a custom function and just have the values used directly in the rule — abstractions might distract rather than help here. But that's a nit really. Please submit a PR :)
Hey @anderseknert :wave:
Updated version as discussed: https://63314f1b746bfd374108e097--parsifal-opa.netlify.app/docs/edge/annotations/#accessing-annotations
What do you think? :smiley:
Looks great! 👍