-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
80bf343
commit bc6d285
Showing
8 changed files
with
193 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[request_definition] | ||
r = sub, res, act | ||
|
||
[policy_definition] | ||
p = sub, res, act, eft | ||
|
||
[role_definition] | ||
g = _, _ | ||
|
||
[policy_effect] | ||
e = some(where (p.eft == allow)) && !some(where (p.eft == deny)) | ||
|
||
[matchers] | ||
m = g(r.sub, p.sub) && keyMatch(r.res, p.res) && keyMatch(r.act, p.act) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
## Roles (prefixed with role:) | ||
# admin - admin | ||
# standard - standard | ||
# unknown - unknown role or no role | ||
|
||
## Resources | ||
# Resources beginning with / are HTTP routes. Generally, this does not matter, but when HTTP routes don't map well | ||
# with the protos this may become important. | ||
|
||
## Actions | ||
# read - read the resource | ||
# write - write to the resource | ||
# delete - delete the resource | ||
# unsafe - unsafe actions | ||
|
||
# Role: Admin | ||
## gRPC and HTTP routes | ||
p, role:admin, *, *, allow | ||
|
||
## Role: Standard | ||
## gRPC routes | ||
p, role:standard, policy.*, read, allow | ||
p, role:standard, kasregistry.*, read, allow | ||
p, role:standard, kas.AccessService/Rewrap, *, allow | ||
p, role:standard, authorization.AuthorizationService/GetDecisions, read, allow | ||
p, role:standard, authorization.AuthorizationService/GetDecisionsByToken, read, allow | ||
|
||
## HTTP routes | ||
p, role:standard, /attributes*, read, allow | ||
p, role:standard, /namespaces*, read, allow | ||
p, role:standard, /subject-mappings*, read, allow | ||
p, role:standard, /resource-mappings*, read, allow | ||
p, role:standard, /key-access-servers*, read, allow | ||
p, role:standard, /kas/v2/rewrap, write, allow | ||
p, role:standard, /v1/authorization, write, allow | ||
p, role:standard, /v1/token/authorization, write, allow | ||
|
||
# Public routes | ||
## gRPC routes | ||
## for ERS, right now we don't care about requester role, just that a valid jwt is provided when the OPA engine calls (enforced in the ERS itself, not casbin) | ||
p, role:unknown, kas.AccessService/Rewrap, *, allow | ||
## HTTP routes | ||
## for ERS, right now we don't care about requester role, just that a valid jwt is provided when the OPA engine calls (enforced in the ERS itself, not casbin) | ||
p, role:unknown, /kas/v2/rewrap, *, allow |
Oops, something went wrong.