mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-19 01:28:51 +02:00
config: add support for max_verify_depth
Add a new max_verify_depth option to the downstream_mtls settings group, with a default value of 1 (to match the behavior of current Pomerium releases). Populate the corresponding setting within Envoy, and also implement a depth check within isValidClientCertificate() in the authorize service.
This commit is contained in:
parent
0fcc3f16de
commit
e8509c50b4
9 changed files with 147 additions and 25 deletions
|
@ -120,11 +120,16 @@ func newPolicyEvaluator(opts *config.Options, store *store.Store) (*evaluator.Ev
|
|||
addDefaultClientCertificateRule :=
|
||||
opts.DownstreamMTLS.GetEnforcement() != config.MTLSEnforcementPolicy
|
||||
|
||||
clientCertConstraints := evaluator.ClientCertConstraints{
|
||||
MaxVerifyDepth: opts.DownstreamMTLS.GetMaxVerifyDepth(),
|
||||
}
|
||||
|
||||
return evaluator.New(ctx, store,
|
||||
evaluator.WithPolicies(opts.GetAllPolicies()),
|
||||
evaluator.WithClientCA(clientCA),
|
||||
evaluator.WithAddDefaultClientCertificateRule(addDefaultClientCertificateRule),
|
||||
evaluator.WithClientCRL(clientCRL),
|
||||
evaluator.WithClientCertConstraints(clientCertConstraints),
|
||||
evaluator.WithSigningKey(signingKey),
|
||||
evaluator.WithAuthenticateURL(authenticateURL.String()),
|
||||
evaluator.WithGoogleCloudServerlessAuthenticationServiceAccount(opts.GetGoogleCloudServerlessAuthenticationServiceAccount()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue