Skip to content

Instantly share code, notes, and snippets.

@adam-sandor
Created July 8, 2021 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adam-sandor/8c3e2591b2572879124a4b9677f03779 to your computer and use it in GitHub Desktop.
Save adam-sandor/8c3e2591b2572879124a4b9677f03779 to your computer and use it in GitHub Desktop.
Rego rule - Only managers can create employees
allow {
input.attributes.request.http.method == "POST"
input.parsed_path[0] == "employees"
jwt.valid
jwt.payload.Role == "manager"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment