TLS Certvalidator: Add config option max_verify_depth to CertificateValidationContext (#20115)

Added option to limit the number of certificates parsed during verification.

Signed-off-by: Deepti Gupta <deepti_gupta2@apple.com>

Mirrored from https://github.com/envoyproxy/envoy @ b130ee612018cf099a91b3f2bc1225f70f49e48c
pull/626/head
data-plane-api(Azure Pipelines) 3 years ago
parent 44451cef66
commit 8e1e848562
  1. 9
      envoy/extensions/transport_sockets/tls/v3/common.proto

@ -288,7 +288,7 @@ message SubjectAltNameMatcher {
type.matcher.v3.StringMatcher matcher = 2 [(validate.rules).message = {required: true}];
}
// [#next-free-field: 16]
// [#next-free-field: 17]
message CertificateValidationContext {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.auth.CertificateValidationContext";
@ -486,4 +486,11 @@ message CertificateValidationContext {
// If this option is set to true, only the certificate at the end of the
// certificate chain will be subject to validation by :ref:`CRL <envoy_v3_api_field_extensions.transport_sockets.tls.v3.CertificateValidationContext.crl>`.
bool only_verify_leaf_cert_crl = 14;
// Config for the max number of intermediate certificates in chain that are parsed during verification.
// This does not include the leaf certificate. If configured, and the certificate chain is longer than allowed, the certificates
// above the limit are ignored, and certificate validation will fail. The default limit is 100,
// though this can be system-dependent.
// https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_verify_depth.html
google.protobuf.UInt32Value max_verify_depth = 16 [(validate.rules).uint32 = {lte: 100}];
}

Loading…
Cancel
Save