Package io.envoyproxy.envoy.api.v2.auth
Class CertificateValidationContext
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.api.v2.auth.CertificateValidationContext
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,CertificateValidationContextOrBuilder,Serializable
public final class CertificateValidationContext
extends com.google.protobuf.GeneratedMessageV3
implements CertificateValidationContextOrBuilder
[#next-free-field: 11]Protobuf type
envoy.api.v2.auth.CertificateValidationContext- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class[#next-free-field: 11]static enumPeer certificate verification mode.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanIf specified, Envoy will not reject expired certificates.getCrl()An optional `certificate revocation list <https://en.wikipedia.org/wiki/Certificate_revocation_list>`_ (in PEM format).An optional `certificate revocation list <https://en.wikipedia.org/wiki/Certificate_revocation_list>`_ (in PEM format).static CertificateValidationContextstatic final com.google.protobuf.Descriptors.DescriptorgetMatchSubjectAltNames(int index) An optional list of Subject Alternative name matchers.intAn optional list of Subject Alternative name matchers.An optional list of Subject Alternative name matchers.getMatchSubjectAltNamesOrBuilder(int index) An optional list of Subject Alternative name matchers.List<? extends StringMatcherOrBuilder>An optional list of Subject Alternative name matchers.com.google.protobuf.Parser<CertificateValidationContext>com.google.protobuf.BoolValue[#not-implemented-hide:] Must present a signed time-stamped OCSP response.com.google.protobuf.BoolValueOrBuilder[#not-implemented-hide:] Must present a signed time-stamped OCSP response.com.google.protobuf.BoolValue[#not-implemented-hide:] Must present signed certificate time-stamp.com.google.protobuf.BoolValueOrBuilder[#not-implemented-hide:] Must present signed certificate time-stamp.intCertificate trust chain verification mode.intCertificate trust chain verification mode.TLS certificate data containing certificate authority certificates to use in verifying a presented peer certificate (e.g. server certificate for clusters or client certificate for listeners).TLS certificate data containing certificate authority certificates to use in verifying a presented peer certificate (e.g. server certificate for clusters or client certificate for listeners).getVerifyCertificateHash(int index) An optional list of hex-encoded SHA-256 hashes.com.google.protobuf.ByteStringgetVerifyCertificateHashBytes(int index) An optional list of hex-encoded SHA-256 hashes.intAn optional list of hex-encoded SHA-256 hashes.com.google.protobuf.ProtocolStringListAn optional list of hex-encoded SHA-256 hashes.getVerifyCertificateSpki(int index) An optional list of base64-encoded SHA-256 hashes.com.google.protobuf.ByteStringgetVerifyCertificateSpkiBytes(int index) An optional list of base64-encoded SHA-256 hashes.intAn optional list of base64-encoded SHA-256 hashes.com.google.protobuf.ProtocolStringListAn optional list of base64-encoded SHA-256 hashes.getVerifySubjectAltName(int index) Deprecated.envoy.api.v2.auth.CertificateValidationContext.verify_subject_alt_name is deprecated.com.google.protobuf.ByteStringgetVerifySubjectAltNameBytes(int index) Deprecated.envoy.api.v2.auth.CertificateValidationContext.verify_subject_alt_name is deprecated.intDeprecated.envoy.api.v2.auth.CertificateValidationContext.verify_subject_alt_name is deprecated.com.google.protobuf.ProtocolStringListDeprecated.envoy.api.v2.auth.CertificateValidationContext.verify_subject_alt_name is deprecated.booleanhasCrl()An optional `certificate revocation list <https://en.wikipedia.org/wiki/Certificate_revocation_list>`_ (in PEM format).inthashCode()boolean[#not-implemented-hide:] Must present a signed time-stamped OCSP response.boolean[#not-implemented-hide:] Must present signed certificate time-stamp.booleanTLS certificate data containing certificate authority certificates to use in verifying a presented peer certificate (e.g. server certificate for clusters or client certificate for listeners).protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleannewBuilder(CertificateValidationContext prototype) protected CertificateValidationContext.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static CertificateValidationContextparseDelimitedFrom(InputStream input) static CertificateValidationContextparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CertificateValidationContextparseFrom(byte[] data) static CertificateValidationContextparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CertificateValidationContextparseFrom(com.google.protobuf.ByteString data) static CertificateValidationContextparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CertificateValidationContextparseFrom(com.google.protobuf.CodedInputStream input) static CertificateValidationContextparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CertificateValidationContextparseFrom(InputStream input) static CertificateValidationContextparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CertificateValidationContextparseFrom(ByteBuffer data) static CertificateValidationContextparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<CertificateValidationContext>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
TRUSTED_CA_FIELD_NUMBER
public static final int TRUSTED_CA_FIELD_NUMBER- See Also:
-
VERIFY_CERTIFICATE_SPKI_FIELD_NUMBER
public static final int VERIFY_CERTIFICATE_SPKI_FIELD_NUMBER- See Also:
-
VERIFY_CERTIFICATE_HASH_FIELD_NUMBER
public static final int VERIFY_CERTIFICATE_HASH_FIELD_NUMBER- See Also:
-
VERIFY_SUBJECT_ALT_NAME_FIELD_NUMBER
public static final int VERIFY_SUBJECT_ALT_NAME_FIELD_NUMBER- See Also:
-
MATCH_SUBJECT_ALT_NAMES_FIELD_NUMBER
public static final int MATCH_SUBJECT_ALT_NAMES_FIELD_NUMBER- See Also:
-
REQUIRE_OCSP_STAPLE_FIELD_NUMBER
public static final int REQUIRE_OCSP_STAPLE_FIELD_NUMBER- See Also:
-
REQUIRE_SIGNED_CERTIFICATE_TIMESTAMP_FIELD_NUMBER
public static final int REQUIRE_SIGNED_CERTIFICATE_TIMESTAMP_FIELD_NUMBER- See Also:
-
CRL_FIELD_NUMBER
public static final int CRL_FIELD_NUMBER- See Also:
-
ALLOW_EXPIRED_CERTIFICATE_FIELD_NUMBER
public static final int ALLOW_EXPIRED_CERTIFICATE_FIELD_NUMBER- See Also:
-
TRUST_CHAIN_VERIFICATION_FIELD_NUMBER
public static final int TRUST_CHAIN_VERIFICATION_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
hasTrustedCa
public boolean hasTrustedCa()TLS certificate data containing certificate authority certificates to use in verifying a presented peer certificate (e.g. server certificate for clusters or client certificate for listeners). If not specified and a peer certificate is presented it will not be verified. By default, a client certificate is optional, unless one of the additional options (:ref:`require_client_certificate <envoy_api_field_auth.DownstreamTlsContext.require_client_certificate>`, :ref:`verify_certificate_spki <envoy_api_field_auth.CertificateValidationContext.verify_certificate_spki>`, :ref:`verify_certificate_hash <envoy_api_field_auth.CertificateValidationContext.verify_certificate_hash>`, or :ref:`match_subject_alt_names <envoy_api_field_auth.CertificateValidationContext.match_subject_alt_names>`) is also specified. It can optionally contain certificate revocation lists, in which case Envoy will verify that the presented peer certificate has not been revoked by one of the included CRLs. See :ref:`the TLS overview <arch_overview_ssl_enabling_verification>` for a list of common system CA locations.
.envoy.api.v2.core.DataSource trusted_ca = 1;- Specified by:
hasTrustedCain interfaceCertificateValidationContextOrBuilder- Returns:
- Whether the trustedCa field is set.
-
getTrustedCa
TLS certificate data containing certificate authority certificates to use in verifying a presented peer certificate (e.g. server certificate for clusters or client certificate for listeners). If not specified and a peer certificate is presented it will not be verified. By default, a client certificate is optional, unless one of the additional options (:ref:`require_client_certificate <envoy_api_field_auth.DownstreamTlsContext.require_client_certificate>`, :ref:`verify_certificate_spki <envoy_api_field_auth.CertificateValidationContext.verify_certificate_spki>`, :ref:`verify_certificate_hash <envoy_api_field_auth.CertificateValidationContext.verify_certificate_hash>`, or :ref:`match_subject_alt_names <envoy_api_field_auth.CertificateValidationContext.match_subject_alt_names>`) is also specified. It can optionally contain certificate revocation lists, in which case Envoy will verify that the presented peer certificate has not been revoked by one of the included CRLs. See :ref:`the TLS overview <arch_overview_ssl_enabling_verification>` for a list of common system CA locations.
.envoy.api.v2.core.DataSource trusted_ca = 1;- Specified by:
getTrustedCain interfaceCertificateValidationContextOrBuilder- Returns:
- The trustedCa.
-
getTrustedCaOrBuilder
TLS certificate data containing certificate authority certificates to use in verifying a presented peer certificate (e.g. server certificate for clusters or client certificate for listeners). If not specified and a peer certificate is presented it will not be verified. By default, a client certificate is optional, unless one of the additional options (:ref:`require_client_certificate <envoy_api_field_auth.DownstreamTlsContext.require_client_certificate>`, :ref:`verify_certificate_spki <envoy_api_field_auth.CertificateValidationContext.verify_certificate_spki>`, :ref:`verify_certificate_hash <envoy_api_field_auth.CertificateValidationContext.verify_certificate_hash>`, or :ref:`match_subject_alt_names <envoy_api_field_auth.CertificateValidationContext.match_subject_alt_names>`) is also specified. It can optionally contain certificate revocation lists, in which case Envoy will verify that the presented peer certificate has not been revoked by one of the included CRLs. See :ref:`the TLS overview <arch_overview_ssl_enabling_verification>` for a list of common system CA locations.
.envoy.api.v2.core.DataSource trusted_ca = 1;- Specified by:
getTrustedCaOrBuilderin interfaceCertificateValidationContextOrBuilder
-
getVerifyCertificateSpkiList
public com.google.protobuf.ProtocolStringList getVerifyCertificateSpkiList()An optional list of base64-encoded SHA-256 hashes. If specified, Envoy will verify that the SHA-256 of the DER-encoded Subject Public Key Information (SPKI) of the presented certificate matches one of the specified values. A base64-encoded SHA-256 of the Subject Public Key Information (SPKI) of the certificate can be generated with the following command: .. code-block:: bash $ openssl x509 -in path/to/client.crt -noout -pubkey | openssl pkey -pubin -outform DER | openssl dgst -sha256 -binary | openssl enc -base64 NvqYIYSbgK2vCJpQhObf77vv+bQWtc5ek5RIOwPiC9A= This is the format used in HTTP Public Key Pinning. When both: :ref:`verify_certificate_hash <envoy_api_field_auth.CertificateValidationContext.verify_certificate_hash>` and :ref:`verify_certificate_spki <envoy_api_field_auth.CertificateValidationContext.verify_certificate_spki>` are specified, a hash matching value from either of the lists will result in the certificate being accepted. .. attention:: This option is preferred over :ref:`verify_certificate_hash <envoy_api_field_auth.CertificateValidationContext.verify_certificate_hash>`, because SPKI is tied to a private key, so it doesn't change when the certificate is renewed using the same private key.repeated string verify_certificate_spki = 3 [(.validate.rules) = { ... }- Specified by:
getVerifyCertificateSpkiListin interfaceCertificateValidationContextOrBuilder- Returns:
- A list containing the verifyCertificateSpki.
-
getVerifyCertificateSpkiCount
public int getVerifyCertificateSpkiCount()An optional list of base64-encoded SHA-256 hashes. If specified, Envoy will verify that the SHA-256 of the DER-encoded Subject Public Key Information (SPKI) of the presented certificate matches one of the specified values. A base64-encoded SHA-256 of the Subject Public Key Information (SPKI) of the certificate can be generated with the following command: .. code-block:: bash $ openssl x509 -in path/to/client.crt -noout -pubkey | openssl pkey -pubin -outform DER | openssl dgst -sha256 -binary | openssl enc -base64 NvqYIYSbgK2vCJpQhObf77vv+bQWtc5ek5RIOwPiC9A= This is the format used in HTTP Public Key Pinning. When both: :ref:`verify_certificate_hash <envoy_api_field_auth.CertificateValidationContext.verify_certificate_hash>` and :ref:`verify_certificate_spki <envoy_api_field_auth.CertificateValidationContext.verify_certificate_spki>` are specified, a hash matching value from either of the lists will result in the certificate being accepted. .. attention:: This option is preferred over :ref:`verify_certificate_hash <envoy_api_field_auth.CertificateValidationContext.verify_certificate_hash>`, because SPKI is tied to a private key, so it doesn't change when the certificate is renewed using the same private key.repeated string verify_certificate_spki = 3 [(.validate.rules) = { ... }- Specified by:
getVerifyCertificateSpkiCountin interfaceCertificateValidationContextOrBuilder- Returns:
- The count of verifyCertificateSpki.
-
getVerifyCertificateSpki
An optional list of base64-encoded SHA-256 hashes. If specified, Envoy will verify that the SHA-256 of the DER-encoded Subject Public Key Information (SPKI) of the presented certificate matches one of the specified values. A base64-encoded SHA-256 of the Subject Public Key Information (SPKI) of the certificate can be generated with the following command: .. code-block:: bash $ openssl x509 -in path/to/client.crt -noout -pubkey | openssl pkey -pubin -outform DER | openssl dgst -sha256 -binary | openssl enc -base64 NvqYIYSbgK2vCJpQhObf77vv+bQWtc5ek5RIOwPiC9A= This is the format used in HTTP Public Key Pinning. When both: :ref:`verify_certificate_hash <envoy_api_field_auth.CertificateValidationContext.verify_certificate_hash>` and :ref:`verify_certificate_spki <envoy_api_field_auth.CertificateValidationContext.verify_certificate_spki>` are specified, a hash matching value from either of the lists will result in the certificate being accepted. .. attention:: This option is preferred over :ref:`verify_certificate_hash <envoy_api_field_auth.CertificateValidationContext.verify_certificate_hash>`, because SPKI is tied to a private key, so it doesn't change when the certificate is renewed using the same private key.repeated string verify_certificate_spki = 3 [(.validate.rules) = { ... }- Specified by:
getVerifyCertificateSpkiin interfaceCertificateValidationContextOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The verifyCertificateSpki at the given index.
-
getVerifyCertificateSpkiBytes
public com.google.protobuf.ByteString getVerifyCertificateSpkiBytes(int index) An optional list of base64-encoded SHA-256 hashes. If specified, Envoy will verify that the SHA-256 of the DER-encoded Subject Public Key Information (SPKI) of the presented certificate matches one of the specified values. A base64-encoded SHA-256 of the Subject Public Key Information (SPKI) of the certificate can be generated with the following command: .. code-block:: bash $ openssl x509 -in path/to/client.crt -noout -pubkey | openssl pkey -pubin -outform DER | openssl dgst -sha256 -binary | openssl enc -base64 NvqYIYSbgK2vCJpQhObf77vv+bQWtc5ek5RIOwPiC9A= This is the format used in HTTP Public Key Pinning. When both: :ref:`verify_certificate_hash <envoy_api_field_auth.CertificateValidationContext.verify_certificate_hash>` and :ref:`verify_certificate_spki <envoy_api_field_auth.CertificateValidationContext.verify_certificate_spki>` are specified, a hash matching value from either of the lists will result in the certificate being accepted. .. attention:: This option is preferred over :ref:`verify_certificate_hash <envoy_api_field_auth.CertificateValidationContext.verify_certificate_hash>`, because SPKI is tied to a private key, so it doesn't change when the certificate is renewed using the same private key.repeated string verify_certificate_spki = 3 [(.validate.rules) = { ... }- Specified by:
getVerifyCertificateSpkiBytesin interfaceCertificateValidationContextOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the verifyCertificateSpki at the given index.
-
getVerifyCertificateHashList
public com.google.protobuf.ProtocolStringList getVerifyCertificateHashList()An optional list of hex-encoded SHA-256 hashes. If specified, Envoy will verify that the SHA-256 of the DER-encoded presented certificate matches one of the specified values. A hex-encoded SHA-256 of the certificate can be generated with the following command: .. code-block:: bash $ openssl x509 -in path/to/client.crt -outform DER | openssl dgst -sha256 | cut -d" " -f2 df6ff72fe9116521268f6f2dd4966f51df479883fe7037b39f75916ac3049d1a A long hex-encoded and colon-separated SHA-256 (a.k.a. "fingerprint") of the certificate can be generated with the following command: .. code-block:: bash $ openssl x509 -in path/to/client.crt -noout -fingerprint -sha256 | cut -d"=" -f2 DF:6F:F7:2F:E9:11:65:21:26:8F:6F:2D:D4:96:6F:51:DF:47:98:83:FE:70:37:B3:9F:75:91:6A:C3:04:9D:1A Both of those formats are acceptable. When both: :ref:`verify_certificate_hash <envoy_api_field_auth.CertificateValidationContext.verify_certificate_hash>` and :ref:`verify_certificate_spki <envoy_api_field_auth.CertificateValidationContext.verify_certificate_spki>` are specified, a hash matching value from either of the lists will result in the certificate being accepted.
repeated string verify_certificate_hash = 2 [(.validate.rules) = { ... }- Specified by:
getVerifyCertificateHashListin interfaceCertificateValidationContextOrBuilder- Returns:
- A list containing the verifyCertificateHash.
-
getVerifyCertificateHashCount
public int getVerifyCertificateHashCount()An optional list of hex-encoded SHA-256 hashes. If specified, Envoy will verify that the SHA-256 of the DER-encoded presented certificate matches one of the specified values. A hex-encoded SHA-256 of the certificate can be generated with the following command: .. code-block:: bash $ openssl x509 -in path/to/client.crt -outform DER | openssl dgst -sha256 | cut -d" " -f2 df6ff72fe9116521268f6f2dd4966f51df479883fe7037b39f75916ac3049d1a A long hex-encoded and colon-separated SHA-256 (a.k.a. "fingerprint") of the certificate can be generated with the following command: .. code-block:: bash $ openssl x509 -in path/to/client.crt -noout -fingerprint -sha256 | cut -d"=" -f2 DF:6F:F7:2F:E9:11:65:21:26:8F:6F:2D:D4:96:6F:51:DF:47:98:83:FE:70:37:B3:9F:75:91:6A:C3:04:9D:1A Both of those formats are acceptable. When both: :ref:`verify_certificate_hash <envoy_api_field_auth.CertificateValidationContext.verify_certificate_hash>` and :ref:`verify_certificate_spki <envoy_api_field_auth.CertificateValidationContext.verify_certificate_spki>` are specified, a hash matching value from either of the lists will result in the certificate being accepted.
repeated string verify_certificate_hash = 2 [(.validate.rules) = { ... }- Specified by:
getVerifyCertificateHashCountin interfaceCertificateValidationContextOrBuilder- Returns:
- The count of verifyCertificateHash.
-
getVerifyCertificateHash
An optional list of hex-encoded SHA-256 hashes. If specified, Envoy will verify that the SHA-256 of the DER-encoded presented certificate matches one of the specified values. A hex-encoded SHA-256 of the certificate can be generated with the following command: .. code-block:: bash $ openssl x509 -in path/to/client.crt -outform DER | openssl dgst -sha256 | cut -d" " -f2 df6ff72fe9116521268f6f2dd4966f51df479883fe7037b39f75916ac3049d1a A long hex-encoded and colon-separated SHA-256 (a.k.a. "fingerprint") of the certificate can be generated with the following command: .. code-block:: bash $ openssl x509 -in path/to/client.crt -noout -fingerprint -sha256 | cut -d"=" -f2 DF:6F:F7:2F:E9:11:65:21:26:8F:6F:2D:D4:96:6F:51:DF:47:98:83:FE:70:37:B3:9F:75:91:6A:C3:04:9D:1A Both of those formats are acceptable. When both: :ref:`verify_certificate_hash <envoy_api_field_auth.CertificateValidationContext.verify_certificate_hash>` and :ref:`verify_certificate_spki <envoy_api_field_auth.CertificateValidationContext.verify_certificate_spki>` are specified, a hash matching value from either of the lists will result in the certificate being accepted.
repeated string verify_certificate_hash = 2 [(.validate.rules) = { ... }- Specified by:
getVerifyCertificateHashin interfaceCertificateValidationContextOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The verifyCertificateHash at the given index.
-
getVerifyCertificateHashBytes
public com.google.protobuf.ByteString getVerifyCertificateHashBytes(int index) An optional list of hex-encoded SHA-256 hashes. If specified, Envoy will verify that the SHA-256 of the DER-encoded presented certificate matches one of the specified values. A hex-encoded SHA-256 of the certificate can be generated with the following command: .. code-block:: bash $ openssl x509 -in path/to/client.crt -outform DER | openssl dgst -sha256 | cut -d" " -f2 df6ff72fe9116521268f6f2dd4966f51df479883fe7037b39f75916ac3049d1a A long hex-encoded and colon-separated SHA-256 (a.k.a. "fingerprint") of the certificate can be generated with the following command: .. code-block:: bash $ openssl x509 -in path/to/client.crt -noout -fingerprint -sha256 | cut -d"=" -f2 DF:6F:F7:2F:E9:11:65:21:26:8F:6F:2D:D4:96:6F:51:DF:47:98:83:FE:70:37:B3:9F:75:91:6A:C3:04:9D:1A Both of those formats are acceptable. When both: :ref:`verify_certificate_hash <envoy_api_field_auth.CertificateValidationContext.verify_certificate_hash>` and :ref:`verify_certificate_spki <envoy_api_field_auth.CertificateValidationContext.verify_certificate_spki>` are specified, a hash matching value from either of the lists will result in the certificate being accepted.
repeated string verify_certificate_hash = 2 [(.validate.rules) = { ... }- Specified by:
getVerifyCertificateHashBytesin interfaceCertificateValidationContextOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the verifyCertificateHash at the given index.
-
getVerifySubjectAltNameList
Deprecated.envoy.api.v2.auth.CertificateValidationContext.verify_subject_alt_name is deprecated. See envoy/api/v2/auth/common.proto;l=285An optional list of Subject Alternative Names. If specified, Envoy will verify that the Subject Alternative Name of the presented certificate matches one of the specified values. .. attention:: Subject Alternative Names are easily spoofable and verifying only them is insecure, therefore this option must be used together with :ref:`trusted_ca <envoy_api_field_auth.CertificateValidationContext.trusted_ca>`.
repeated string verify_subject_alt_name = 4 [deprecated = true];- Specified by:
getVerifySubjectAltNameListin interfaceCertificateValidationContextOrBuilder- Returns:
- A list containing the verifySubjectAltName.
-
getVerifySubjectAltNameCount
Deprecated.envoy.api.v2.auth.CertificateValidationContext.verify_subject_alt_name is deprecated. See envoy/api/v2/auth/common.proto;l=285An optional list of Subject Alternative Names. If specified, Envoy will verify that the Subject Alternative Name of the presented certificate matches one of the specified values. .. attention:: Subject Alternative Names are easily spoofable and verifying only them is insecure, therefore this option must be used together with :ref:`trusted_ca <envoy_api_field_auth.CertificateValidationContext.trusted_ca>`.
repeated string verify_subject_alt_name = 4 [deprecated = true];- Specified by:
getVerifySubjectAltNameCountin interfaceCertificateValidationContextOrBuilder- Returns:
- The count of verifySubjectAltName.
-
getVerifySubjectAltName
Deprecated.envoy.api.v2.auth.CertificateValidationContext.verify_subject_alt_name is deprecated. See envoy/api/v2/auth/common.proto;l=285An optional list of Subject Alternative Names. If specified, Envoy will verify that the Subject Alternative Name of the presented certificate matches one of the specified values. .. attention:: Subject Alternative Names are easily spoofable and verifying only them is insecure, therefore this option must be used together with :ref:`trusted_ca <envoy_api_field_auth.CertificateValidationContext.trusted_ca>`.
repeated string verify_subject_alt_name = 4 [deprecated = true];- Specified by:
getVerifySubjectAltNamein interfaceCertificateValidationContextOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The verifySubjectAltName at the given index.
-
getVerifySubjectAltNameBytes
Deprecated.envoy.api.v2.auth.CertificateValidationContext.verify_subject_alt_name is deprecated. See envoy/api/v2/auth/common.proto;l=285An optional list of Subject Alternative Names. If specified, Envoy will verify that the Subject Alternative Name of the presented certificate matches one of the specified values. .. attention:: Subject Alternative Names are easily spoofable and verifying only them is insecure, therefore this option must be used together with :ref:`trusted_ca <envoy_api_field_auth.CertificateValidationContext.trusted_ca>`.
repeated string verify_subject_alt_name = 4 [deprecated = true];- Specified by:
getVerifySubjectAltNameBytesin interfaceCertificateValidationContextOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the verifySubjectAltName at the given index.
-
getMatchSubjectAltNamesList
An optional list of Subject Alternative name matchers. Envoy will verify that the Subject Alternative Name of the presented certificate matches one of the specified matches. When a certificate has wildcard DNS SAN entries, to match a specific client, it should be configured with exact match type in the :ref:`string matcher <envoy_api_msg_type.matcher.StringMatcher>`. For example if the certificate has "\*.example.com" as DNS SAN entry, to allow only "api.example.com", it should be configured as shown below. .. code-block:: yaml match_subject_alt_names: exact: "api.example.com" .. attention:: Subject Alternative Names are easily spoofable and verifying only them is insecure, therefore this option must be used together with :ref:`trusted_ca <envoy_api_field_auth.CertificateValidationContext.trusted_ca>`.repeated .envoy.type.matcher.StringMatcher match_subject_alt_names = 9;- Specified by:
getMatchSubjectAltNamesListin interfaceCertificateValidationContextOrBuilder
-
getMatchSubjectAltNamesOrBuilderList
An optional list of Subject Alternative name matchers. Envoy will verify that the Subject Alternative Name of the presented certificate matches one of the specified matches. When a certificate has wildcard DNS SAN entries, to match a specific client, it should be configured with exact match type in the :ref:`string matcher <envoy_api_msg_type.matcher.StringMatcher>`. For example if the certificate has "\*.example.com" as DNS SAN entry, to allow only "api.example.com", it should be configured as shown below. .. code-block:: yaml match_subject_alt_names: exact: "api.example.com" .. attention:: Subject Alternative Names are easily spoofable and verifying only them is insecure, therefore this option must be used together with :ref:`trusted_ca <envoy_api_field_auth.CertificateValidationContext.trusted_ca>`.repeated .envoy.type.matcher.StringMatcher match_subject_alt_names = 9;- Specified by:
getMatchSubjectAltNamesOrBuilderListin interfaceCertificateValidationContextOrBuilder
-
getMatchSubjectAltNamesCount
public int getMatchSubjectAltNamesCount()An optional list of Subject Alternative name matchers. Envoy will verify that the Subject Alternative Name of the presented certificate matches one of the specified matches. When a certificate has wildcard DNS SAN entries, to match a specific client, it should be configured with exact match type in the :ref:`string matcher <envoy_api_msg_type.matcher.StringMatcher>`. For example if the certificate has "\*.example.com" as DNS SAN entry, to allow only "api.example.com", it should be configured as shown below. .. code-block:: yaml match_subject_alt_names: exact: "api.example.com" .. attention:: Subject Alternative Names are easily spoofable and verifying only them is insecure, therefore this option must be used together with :ref:`trusted_ca <envoy_api_field_auth.CertificateValidationContext.trusted_ca>`.repeated .envoy.type.matcher.StringMatcher match_subject_alt_names = 9;- Specified by:
getMatchSubjectAltNamesCountin interfaceCertificateValidationContextOrBuilder
-
getMatchSubjectAltNames
An optional list of Subject Alternative name matchers. Envoy will verify that the Subject Alternative Name of the presented certificate matches one of the specified matches. When a certificate has wildcard DNS SAN entries, to match a specific client, it should be configured with exact match type in the :ref:`string matcher <envoy_api_msg_type.matcher.StringMatcher>`. For example if the certificate has "\*.example.com" as DNS SAN entry, to allow only "api.example.com", it should be configured as shown below. .. code-block:: yaml match_subject_alt_names: exact: "api.example.com" .. attention:: Subject Alternative Names are easily spoofable and verifying only them is insecure, therefore this option must be used together with :ref:`trusted_ca <envoy_api_field_auth.CertificateValidationContext.trusted_ca>`.repeated .envoy.type.matcher.StringMatcher match_subject_alt_names = 9;- Specified by:
getMatchSubjectAltNamesin interfaceCertificateValidationContextOrBuilder
-
getMatchSubjectAltNamesOrBuilder
An optional list of Subject Alternative name matchers. Envoy will verify that the Subject Alternative Name of the presented certificate matches one of the specified matches. When a certificate has wildcard DNS SAN entries, to match a specific client, it should be configured with exact match type in the :ref:`string matcher <envoy_api_msg_type.matcher.StringMatcher>`. For example if the certificate has "\*.example.com" as DNS SAN entry, to allow only "api.example.com", it should be configured as shown below. .. code-block:: yaml match_subject_alt_names: exact: "api.example.com" .. attention:: Subject Alternative Names are easily spoofable and verifying only them is insecure, therefore this option must be used together with :ref:`trusted_ca <envoy_api_field_auth.CertificateValidationContext.trusted_ca>`.repeated .envoy.type.matcher.StringMatcher match_subject_alt_names = 9;- Specified by:
getMatchSubjectAltNamesOrBuilderin interfaceCertificateValidationContextOrBuilder
-
hasRequireOcspStaple
public boolean hasRequireOcspStaple()[#not-implemented-hide:] Must present a signed time-stamped OCSP response.
.google.protobuf.BoolValue require_ocsp_staple = 5;- Specified by:
hasRequireOcspStaplein interfaceCertificateValidationContextOrBuilder- Returns:
- Whether the requireOcspStaple field is set.
-
getRequireOcspStaple
public com.google.protobuf.BoolValue getRequireOcspStaple()[#not-implemented-hide:] Must present a signed time-stamped OCSP response.
.google.protobuf.BoolValue require_ocsp_staple = 5;- Specified by:
getRequireOcspStaplein interfaceCertificateValidationContextOrBuilder- Returns:
- The requireOcspStaple.
-
getRequireOcspStapleOrBuilder
public com.google.protobuf.BoolValueOrBuilder getRequireOcspStapleOrBuilder()[#not-implemented-hide:] Must present a signed time-stamped OCSP response.
.google.protobuf.BoolValue require_ocsp_staple = 5;- Specified by:
getRequireOcspStapleOrBuilderin interfaceCertificateValidationContextOrBuilder
-
hasRequireSignedCertificateTimestamp
public boolean hasRequireSignedCertificateTimestamp()[#not-implemented-hide:] Must present signed certificate time-stamp.
.google.protobuf.BoolValue require_signed_certificate_timestamp = 6;- Specified by:
hasRequireSignedCertificateTimestampin interfaceCertificateValidationContextOrBuilder- Returns:
- Whether the requireSignedCertificateTimestamp field is set.
-
getRequireSignedCertificateTimestamp
public com.google.protobuf.BoolValue getRequireSignedCertificateTimestamp()[#not-implemented-hide:] Must present signed certificate time-stamp.
.google.protobuf.BoolValue require_signed_certificate_timestamp = 6;- Specified by:
getRequireSignedCertificateTimestampin interfaceCertificateValidationContextOrBuilder- Returns:
- The requireSignedCertificateTimestamp.
-
getRequireSignedCertificateTimestampOrBuilder
public com.google.protobuf.BoolValueOrBuilder getRequireSignedCertificateTimestampOrBuilder()[#not-implemented-hide:] Must present signed certificate time-stamp.
.google.protobuf.BoolValue require_signed_certificate_timestamp = 6;- Specified by:
getRequireSignedCertificateTimestampOrBuilderin interfaceCertificateValidationContextOrBuilder
-
hasCrl
public boolean hasCrl()An optional `certificate revocation list <https://en.wikipedia.org/wiki/Certificate_revocation_list>`_ (in PEM format). If specified, Envoy will verify that the presented peer certificate has not been revoked by this CRL. If this DataSource contains multiple CRLs, all of them will be used.
.envoy.api.v2.core.DataSource crl = 7;- Specified by:
hasCrlin interfaceCertificateValidationContextOrBuilder- Returns:
- Whether the crl field is set.
-
getCrl
An optional `certificate revocation list <https://en.wikipedia.org/wiki/Certificate_revocation_list>`_ (in PEM format). If specified, Envoy will verify that the presented peer certificate has not been revoked by this CRL. If this DataSource contains multiple CRLs, all of them will be used.
.envoy.api.v2.core.DataSource crl = 7;- Specified by:
getCrlin interfaceCertificateValidationContextOrBuilder- Returns:
- The crl.
-
getCrlOrBuilder
An optional `certificate revocation list <https://en.wikipedia.org/wiki/Certificate_revocation_list>`_ (in PEM format). If specified, Envoy will verify that the presented peer certificate has not been revoked by this CRL. If this DataSource contains multiple CRLs, all of them will be used.
.envoy.api.v2.core.DataSource crl = 7;- Specified by:
getCrlOrBuilderin interfaceCertificateValidationContextOrBuilder
-
getAllowExpiredCertificate
public boolean getAllowExpiredCertificate()If specified, Envoy will not reject expired certificates.
bool allow_expired_certificate = 8;- Specified by:
getAllowExpiredCertificatein interfaceCertificateValidationContextOrBuilder- Returns:
- The allowExpiredCertificate.
-
getTrustChainVerificationValue
public int getTrustChainVerificationValue()Certificate trust chain verification mode.
.envoy.api.v2.auth.CertificateValidationContext.TrustChainVerification trust_chain_verification = 10 [(.validate.rules) = { ... }- Specified by:
getTrustChainVerificationValuein interfaceCertificateValidationContextOrBuilder- Returns:
- The enum numeric value on the wire for trustChainVerification.
-
getTrustChainVerification
Certificate trust chain verification mode.
.envoy.api.v2.auth.CertificateValidationContext.TrustChainVerification trust_chain_verification = 10 [(.validate.rules) = { ... }- Specified by:
getTrustChainVerificationin interfaceCertificateValidationContextOrBuilder- Returns:
- The trustChainVerification.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static CertificateValidationContext parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CertificateValidationContext parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CertificateValidationContext parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CertificateValidationContext parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CertificateValidationContext parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CertificateValidationContext parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static CertificateValidationContext parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static CertificateValidationContext parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static CertificateValidationContext parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static CertificateValidationContext parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
public static CertificateValidationContext.Builder newBuilder(CertificateValidationContext prototype) -
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected CertificateValidationContext.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-