Skip to content

Commit 1b8b322

Browse files
committed
docs: add query_parameters_to_set
Signed-off-by: Mikhail Sedov <[email protected]>
1 parent 59a2052 commit 1b8b322

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/content/envoy-primer.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ If you want, you can also control the HTTP status sent to the upstream or downst
107107
* `body` is a string which represents the response body data sent to the downstream client when a request is denied.
108108
* `status_code` is a number which represents the HTTP response status code sent to the downstream client when a request is denied.
109109
* `dynamic_metadata` is an object whose keys are strings and values can be booleans, strings, numbers, arrays, or objects. It will set the `DynamicMetadata` in the `CheckResponse` returned by the `opa-envoy-plugin` and can be consumed elsewhere in the envoy filter chain.
110+
* `query_parameters_to_set` is an object whose keys are strings and values can be strings or arrays of strings. It defines the query parameters to be added or modified in the request before dispatching it to the upstream when a request is allowed. When a value is an array, it represents multiple values for the same parameter key.
110111

111112
```live:obj_example:module:openable
112113
package envoy.authz
@@ -127,6 +128,11 @@ request_headers_to_remove := ["one-auth-header", "another-auth-header"]
127128
128129
response_headers_to_add["x-foo"] := "bar"
129130
131+
query_parameters_to_set = {
132+
"user-role": token.payload.role,
133+
"tags": ["main-flow", "auth-enabled"]
134+
}
135+
130136
status_code := 200 if {
131137
allow
132138
} else := 401 if {

0 commit comments

Comments
 (0)