[fuzz] Added validation for secrets (#13543)

Signed-off-by: Zach <zasweq@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ bc5c44a1a842379daa6f810dc3841c71a513661b
pull/622/head
data-plane-api(CircleCI) 4 years ago
parent 485f70f947
commit f545e6be33
  1. 6
      envoy/extensions/transport_sockets/tls/v3/secret.proto
  2. 3
      envoy/extensions/transport_sockets/tls/v4alpha/secret.proto

@ -12,6 +12,7 @@ import "udpa/annotations/migrate.proto";
import "udpa/annotations/sensitive.proto";
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.v3";
option java_outer_classname = "SecretProto";
@ -33,7 +34,10 @@ message SdsSecretConfig {
// Name (FQDN, UUID, SPKI, SHA256, etc.) by which the secret can be uniquely referred to.
// When both name and config are specified, then secret can be fetched and/or reloaded via
// SDS. When only name is specified, then secret will be loaded from static resources.
string name = 1 [(udpa.annotations.field_migrate).oneof_promotion = "name_specifier"];
string name = 1 [
(validate.rules).string = {min_len: 1},
(udpa.annotations.field_migrate).oneof_promotion = "name_specifier"
];
// Resource locator for SDS. This is mutually exclusive to *name*.
// [#not-implemented-hide:]

@ -11,6 +11,7 @@ import "udpa/core/v1/resource_locator.proto";
import "udpa/annotations/sensitive.proto";
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.v4alpha";
option java_outer_classname = "SecretProto";
@ -35,7 +36,7 @@ message SdsSecretConfig {
// Name (FQDN, UUID, SPKI, SHA256, etc.) by which the secret can be uniquely referred to.
// When both name and config are specified, then secret can be fetched and/or reloaded via
// SDS. When only name is specified, then secret will be loaded from static resources.
string name = 1;
string name = 1 [(validate.rules).string = {min_len: 1}];
// Resource locator for SDS. This is mutually exclusive to *name*.
// [#not-implemented-hide:]

Loading…
Cancel
Save