Skip to content
Snippets Groups Projects
Commit ac420591 authored by Yordan Kinkov's avatar Yordan Kinkov
Browse files

Merge branch 'add-example-policy' into 'main'

Add example policy

See merge request !1
parents 6778edd5 424d61ad
No related branches found
No related tags found
1 merge request!1Add example policy
# Policies Repository
The Policies Repository contains REGO policies for **development purposes only**
The Policies Repository contains REGO policies used for evaluation.
### Add Policy
You should follow the following syntax:
You should follow the following naming syntax:
- Policy name must follow the following syntax: `{name}_{version}.rego`
> Example: loginpolicy_1.2.rego
- Policies are grouped in directories representing their organisation: `{group}/{policyName}_{version}.rego`
> Example: gaiax/loginpolicy_1.0.rego
- The policy package must follow the following syntax: `{group}.{policyName}`
> Example: package gaiax.loginpolicy
package example.examplePolicy
default allow = false
allow {
input.method == "GET"
input.path == ["salary", input.subject.user]
}
allow {
is_admin
}
is_admin {
input.subject.groups[_] == "admin"
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment