syntax = "proto3";

package envoy.extensions.transport_sockets.tls.cert_validator.dynamic_modules.v3;

import "envoy/extensions/dynamic_modules/v3/dynamic_modules.proto";

import "google/protobuf/any.proto";

import "udpa/annotations/status.proto";
import "validate/validate.proto";

option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.cert_validator.dynamic_modules.v3";
option java_outer_classname = "DynamicModulesProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/cert_validator/dynamic_modules/v3;dynamic_modulesv3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: Dynamic Module Certificate Validator]
// [#extension: envoy.tls.cert_validator.dynamic_modules]

// Configuration for the dynamic module certificate validator.
//
// Example:
//
// .. validated-code-block:: yaml
//   :type-name: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext
//
//   custom_validator_config:
//     name: envoy.tls.cert_validator.dynamic_modules
//     typed_config:
//       "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.cert_validator.dynamic_modules.v3.DynamicModuleCertValidatorConfig
//       dynamic_module_config:
//         name: my_module
//       validator_name: my_validator
//
message DynamicModuleCertValidatorConfig {
  // Dynamic module configuration. See :ref:`dynamic module configuration
  // <envoy_v3_api_msg_extensions.dynamic_modules.v3.DynamicModuleConfig>` for details.
  envoy.extensions.dynamic_modules.v3.DynamicModuleConfig dynamic_module_config = 1
      [(validate.rules).message = {required: true}];

  // The name of the cert validator implementation in the dynamic module.
  // This is passed to the module's ``envoy_dynamic_module_on_cert_validator_config_new``
  // function.
  string validator_name = 2 [(validate.rules).string = {min_len: 1}];

  // Optional configuration for the cert validator. This is passed as bytes to the dynamic module.
  google.protobuf.Any validator_config = 3;
}
