pomerium/authorize/evaluator
Kenneth Jenkins e8b489eb87
authorize: rework token substitution in headers (#4456)
Currently Pomerium replaces dynamic set_request_headers tokens
sequentially. As a result, if a replacement value itself contained a
supported "$pomerium" token, Pomerium may treat that as another
replacement, resulting in incorrect output.

This is unlikely to be a problem given the current set of dynamic
tokens, but if we continue to add additional tokens, this will likely
become more of a concern.

To forestall any issues, let's perform all replacements in one pass,
using the os.Expand() method. This does require a slight change to the
syntax, as tokens containing a '.' will need to be wrapped in curly
braces, e.g. ${pomerium.id_token}.

A literal dollar sign can be included by using $$ in the input.
2023-08-14 15:28:10 -07:00
..
opa authorize: rework token substitution in headers (#4456) 2023-08-14 15:28:10 -07:00
config.go config: support client certificate SAN match (#4453) 2023-08-11 13:27:12 -07:00
evaluator.go config: add support for max_verify_depth (#4452) 2023-08-10 10:05:48 -07:00
evaluator_test.go config: add new mTLS enforcement setting (#4443) 2023-08-09 07:53:11 -07:00
functions.go config: support client certificate SAN match (#4453) 2023-08-11 13:27:12 -07:00
functions_test.go config: support client certificate SAN match (#4453) 2023-08-11 13:27:12 -07:00
gen-test-certs.go config: support client certificate SAN match (#4453) 2023-08-11 13:27:12 -07:00
google_cloud_serverless.go config: remove source, remove deadcode, fix linting issues (#4118) 2023-04-21 17:25:11 -06:00
google_cloud_serverless_test.go authorize: move headers and jwt signing to rego (#1856) 2021-02-08 10:53:21 -07:00
headers_evaluator.go authorize: rework token substitution in headers (#4456) 2023-08-14 15:28:10 -07:00
headers_evaluator_test.go authorize: rework token substitution in headers (#4456) 2023-08-14 15:28:10 -07:00
policy_evaluator.go config: add new mTLS enforcement setting (#4443) 2023-08-09 07:53:11 -07:00
policy_evaluator_test.go config: add new mTLS enforcement setting (#4443) 2023-08-09 07:53:11 -07:00