pomerium/authorize/evaluator
Kenneth Jenkins 4698e4661a
authorize: omit client cert rule when not needed (#4386)
Currently we always add an invalid_client_certificate deny rule to all
PPL policies. Instead, let's add this rule only when a client CA is
configured. This way, if a user is not using client certificates at all,
they won't see any reason strings related to client certificates in the
authorize logs.

Change the "valid-client-certificate-or-none-required" reason string to
just "valid-client-certificate" accordingly.

Pass the main Evaluator config to NewPolicyEvaluator so that we can
determine whether there is a client CA configured or not. Extract the
existing default deny rule to a separate method. Add unit tests
exercising the new behavior.
2023-07-24 15:27:57 -07:00
..
opa authorize: remove JWT timestamp format workaround (#4321) 2023-06-30 11:54:46 -07:00
config.go options: support multiple signing keys (#3828) 2022-12-22 09:31:09 -07:00
evaluator.go authorize: omit client cert rule when not needed (#4386) 2023-07-24 15:27:57 -07:00
evaluator_test.go authorize: omit client cert rule when not needed (#4386) 2023-07-24 15:27:57 -07:00
functions.go authorize: incorporate mTLS validation from Envoy (#4374) 2023-07-21 12:17:01 -07:00
functions_test.go authorize: incorporate mTLS validation from Envoy (#4374) 2023-07-21 12:17:01 -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 config: add support for $pomerium.id_token and $pomerium.access_token in set_request_headers (#4219) 2023-06-01 16:00:02 -06:00
headers_evaluator_test.go authorize: remove JWT timestamp format workaround (#4321) 2023-06-30 11:54:46 -07:00
policy_evaluator.go authorize: omit client cert rule when not needed (#4386) 2023-07-24 15:27:57 -07:00
policy_evaluator_test.go authorize: omit client cert rule when not needed (#4386) 2023-07-24 15:27:57 -07:00