Skip to content

Commit

Permalink
kbs: add sample policy
Browse files Browse the repository at this point in the history
Created the sample_policies directory to hold exampe of policy files. An
allow_all.rego file is added.

Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
  • Loading branch information
wainersm committed Feb 12, 2024
1 parent 446b63c commit 51aee2c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kbs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ To test the KBS with sample evidence, you'll need to update the resource policy
to something more permissive.
This can be done with a command such as
```shell
./kbs-client --url http://127.0.0.1:8080 config --auth-private-key config/private.key set-resource-policy --policy-file allow_all.rego
kbs-client --url http://127.0.0.1:8080 config --auth-private-key config/private.key set-resource-policy --policy-file sample_policies/allow_all.rego
```

## Passport Mode
Expand Down
6 changes: 6 additions & 0 deletions kbs/sample_policies/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This directory contain sample policy files to configure the policy engine
of the KBS. You can use those files to write your own policies.

| File | Description |
| --- | --- |
|[allow_all.rego](./allow_all.rego)|Equivalent to turning off the policy engine. Release resources unconditionally|
4 changes: 4 additions & 0 deletions kbs/sample_policies/allow_all.rego
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

package policy

default allow = true

0 comments on commit 51aee2c

Please sign in to comment.