Skip to content

Commit

Permalink
* add authz examples
Browse files Browse the repository at this point in the history
  • Loading branch information
JGottschick committed Oct 5, 2024
1 parent 0b3c0e5 commit fcbd40f
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions templates/middleware/authz.rego.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,42 @@ default allowEntrypoint = false

default allowAccess = false

#
# examples how you could set permission for each path in the API endpoint
#

allowEntrypoint {
# user
user
# getMethod
# input.path == "/livez"
}

allowAccess {
# user
user
# getMethod
# input.path == "/livez"
}

#allowEntrypoint {
# staffuser
# postMethod
# input.path == "/admin"
#}

#allowAccess {
# staffuser
# postMethod
# input.path == "/admin"
#}

#allowEntrypoint {
# api
# deleteMethod
# input.path == "/func"
#}

#allowAccess {
# api
# deleteMethod
# input.path == "/func"
#}

0 comments on commit fcbd40f

Please sign in to comment.