-
Notifications
You must be signed in to change notification settings - Fork 2
porcelain: allow optional headers and low-level SDKOptions #26
Conversation
73ee59e to
8c46e96
Compare
| import rego.v1 | ||
| default allow := false | ||
| allow if input.method == "PUT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Policy PUT calls happening later in the test setup.
| default allow := false | ||
| allow if input.method == "PUT" | ||
| allow if input.path[0] == "health" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Health check, needed for wait strategy
| allow if input.path[2] == "test" | ||
| allow if input.path[2] == "has" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Existing tests' prefixes
| allow if { | ||
| input.path[2] = "token" | ||
| input.identity = "opensesame" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New test: requests for /v1/data/token/* only work with a proper authorization header (bearer token)
| content: authzPolicy, | ||
| target: "/authz.rego", | ||
| }, | ||
| ]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The system authz policy needs to be loaded when the server is started
|
I'll fix those conflicts tomorrow 🤞 |
8c46e96 to
420d88c
Compare
Including a test for each of them. Signed-off-by: Stephan Renatus <stephan@styra.com>
420d88c to
954bfae
Compare
Let's make sure this is somewhat aligned among the different SDKs... 👀