类 DestinationRuleOuterClass.ClientTLSSettings
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings
- 所有已实现的接口:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,DestinationRuleOuterClass.ClientTLSSettingsOrBuilder,Serializable
public static final class DestinationRuleOuterClass.ClientTLSSettings
extends com.google.protobuf.GeneratedMessageV3
implements DestinationRuleOuterClass.ClientTLSSettingsOrBuilder
SSL/TLS related settings for upstream connections. See Envoy's [TLS
context](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/auth/cert.proto.html)
for more details. These settings are common to both HTTP and TCP upstreams.
For example, the following rule configures a client to use mutual TLS
for connections to upstream database cluster.
{{<tabset category-name="example">}}
{{<tab name="v1alpha3" category-value="v1alpha3">}}
```yaml
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: db-mtls
spec:
host: mydbserver.prod.svc.cluster.local
trafficPolicy:
tls:
mode: MUTUAL
clientCertificate: /etc/certs/myclientcert.pem
privateKey: /etc/certs/client_private_key.pem
caCertificates: /etc/certs/rootcacerts.pem
```
{{</tab>}}
{{<tab name="v1beta1" category-value="v1beta1">}}
```yaml
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: db-mtls
spec:
host: mydbserver.prod.svc.cluster.local
trafficPolicy:
tls:
mode: MUTUAL
clientCertificate: /etc/certs/myclientcert.pem
privateKey: /etc/certs/client_private_key.pem
caCertificates: /etc/certs/rootcacerts.pem
```
{{</tab>}}
{{</tabset>}}
The following rule configures a client to use TLS when talking to a
foreign service whose domain matches *.foo.com.
{{<tabset category-name="example">}}
{{<tab name="v1alpha3" category-value="v1alpha3">}}
```yaml
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: tls-foo
spec:
host: "*.foo.com"
trafficPolicy:
tls:
mode: SIMPLE
```
{{</tab>}}
{{<tab name="v1beta1" category-value="v1beta1">}}
```yaml
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: tls-foo
spec:
host: "*.foo.com"
trafficPolicy:
tls:
mode: SIMPLE
```
{{</tab>}}
{{</tabset>}}
The following rule configures a client to use Istio mutual TLS when talking
to rating services.
{{<tabset category-name="example">}}
{{<tab name="v1alpha3" category-value="v1alpha3">}}
```yaml
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: ratings-istio-mtls
spec:
host: ratings.prod.svc.cluster.local
trafficPolicy:
tls:
mode: ISTIO_MUTUAL
```
{{</tab>}}
{{<tab name="v1beta1" category-value="v1beta1">}}
```yaml
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: ratings-istio-mtls
spec:
host: ratings.prod.svc.cluster.local
trafficPolicy:
tls:
mode: ISTIO_MUTUAL
```
{{</tab>}}
{{</tabset>}}
Protobuf type istio.networking.v1alpha3.ClientTLSSettings- 另请参阅:
-
嵌套类概要
嵌套类修饰符和类型类说明static final classSSL/TLS related settings for upstream connections.static enumTLS connection mode从类继承的嵌套类/接口 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 从类继承的嵌套类/接口 com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
字段概要
字段修饰符和类型字段说明static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int从类继承的字段 com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFields从类继承的字段 com.google.protobuf.AbstractMessage
memoizedSize从类继承的字段 com.google.protobuf.AbstractMessageLite
memoizedHashCode -
方法概要
修饰符和类型方法说明booleanOPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.com.google.protobuf.ByteStringOPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate.REQUIRED if mode is `MUTUAL`.com.google.protobuf.ByteStringREQUIRED if mode is `MUTUAL`.The name of the secret that holds the TLS certs for the client including the CA certificates.com.google.protobuf.ByteStringThe name of the secret that holds the TLS certs for the client including the CA certificates.static final com.google.protobuf.Descriptors.DescriptorgetMode()Indicates whether connections to this port should be secured using TLS.intIndicates whether connections to this port should be secured using TLS.com.google.protobuf.Parser<DestinationRuleOuterClass.ClientTLSSettings> REQUIRED if mode is `MUTUAL`.com.google.protobuf.ByteStringREQUIRED if mode is `MUTUAL`.intgetSni()SNI string to present to the server during TLS handshake.com.google.protobuf.ByteStringSNI string to present to the server during TLS handshake.getSubjectAltNames(int index) A list of alternate names to verify the subject identity in the certificate.com.google.protobuf.ByteStringgetSubjectAltNamesBytes(int index) A list of alternate names to verify the subject identity in the certificate.intA list of alternate names to verify the subject identity in the certificate.com.google.protobuf.ProtocolStringListA list of alternate names to verify the subject identity in the certificate.inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleannewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) parseDelimitedFrom(InputStream input) parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(byte[] data) parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(com.google.protobuf.ByteString data) parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(com.google.protobuf.CodedInputStream input) parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(InputStream input) parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(ByteBuffer data) parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<DestinationRuleOuterClass.ClientTLSSettings> parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) 从类继承的方法 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, writeStringNoTag从类继承的方法 com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString从类继承的方法 com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo从接口继承的方法 com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeTo从接口继承的方法 com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
字段详细资料
-
MODE_FIELD_NUMBER
public static final int MODE_FIELD_NUMBER- 另请参阅:
-
CLIENT_CERTIFICATE_FIELD_NUMBER
public static final int CLIENT_CERTIFICATE_FIELD_NUMBER- 另请参阅:
-
PRIVATE_KEY_FIELD_NUMBER
public static final int PRIVATE_KEY_FIELD_NUMBER- 另请参阅:
-
CA_CERTIFICATES_FIELD_NUMBER
public static final int CA_CERTIFICATES_FIELD_NUMBER- 另请参阅:
-
CREDENTIAL_NAME_FIELD_NUMBER
public static final int CREDENTIAL_NAME_FIELD_NUMBER- 另请参阅:
-
SUBJECT_ALT_NAMES_FIELD_NUMBER
public static final int SUBJECT_ALT_NAMES_FIELD_NUMBER- 另请参阅:
-
SNI_FIELD_NUMBER
public static final int SNI_FIELD_NUMBER- 另请参阅:
-
-
方法详细资料
-
newInstance
- 覆盖:
newInstance在类中com.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- 指定者:
internalGetFieldAccessorTable在类中com.google.protobuf.GeneratedMessageV3
-
getModeValue
public int getModeValue()Indicates whether connections to this port should be secured using TLS. The value of this field determines how TLS is enforced.
.istio.networking.v1alpha3.ClientTLSSettings.TLSmode mode = 1 [(.google.api.field_behavior) = REQUIRED];- 指定者:
getModeValue在接口中DestinationRuleOuterClass.ClientTLSSettingsOrBuilder- 返回:
- The enum numeric value on the wire for mode.
-
getMode
Indicates whether connections to this port should be secured using TLS. The value of this field determines how TLS is enforced.
.istio.networking.v1alpha3.ClientTLSSettings.TLSmode mode = 1 [(.google.api.field_behavior) = REQUIRED];- 指定者:
getMode在接口中DestinationRuleOuterClass.ClientTLSSettingsOrBuilder- 返回:
- The mode.
-
getClientCertificate
REQUIRED if mode is `MUTUAL`. The path to the file holding the client-side TLS certificate to use. Should be empty if mode is `ISTIO_MUTUAL`.
string client_certificate = 2;- 指定者:
getClientCertificate在接口中DestinationRuleOuterClass.ClientTLSSettingsOrBuilder- 返回:
- The clientCertificate.
-
getClientCertificateBytes
public com.google.protobuf.ByteString getClientCertificateBytes()REQUIRED if mode is `MUTUAL`. The path to the file holding the client-side TLS certificate to use. Should be empty if mode is `ISTIO_MUTUAL`.
string client_certificate = 2;- 指定者:
getClientCertificateBytes在接口中DestinationRuleOuterClass.ClientTLSSettingsOrBuilder- 返回:
- The bytes for clientCertificate.
-
getPrivateKey
REQUIRED if mode is `MUTUAL`. The path to the file holding the client's private key. Should be empty if mode is `ISTIO_MUTUAL`.
string private_key = 3;- 指定者:
getPrivateKey在接口中DestinationRuleOuterClass.ClientTLSSettingsOrBuilder- 返回:
- The privateKey.
-
getPrivateKeyBytes
public com.google.protobuf.ByteString getPrivateKeyBytes()REQUIRED if mode is `MUTUAL`. The path to the file holding the client's private key. Should be empty if mode is `ISTIO_MUTUAL`.
string private_key = 3;- 指定者:
getPrivateKeyBytes在接口中DestinationRuleOuterClass.ClientTLSSettingsOrBuilder- 返回:
- The bytes for privateKey.
-
getCaCertificates
OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate. If omitted, the proxy will not verify the server's certificate. Should be empty if mode is `ISTIO_MUTUAL`.
string ca_certificates = 4;- 指定者:
getCaCertificates在接口中DestinationRuleOuterClass.ClientTLSSettingsOrBuilder- 返回:
- The caCertificates.
-
getCaCertificatesBytes
public com.google.protobuf.ByteString getCaCertificatesBytes()OPTIONAL: The path to the file containing certificate authority certificates to use in verifying a presented server certificate. If omitted, the proxy will not verify the server's certificate. Should be empty if mode is `ISTIO_MUTUAL`.
string ca_certificates = 4;- 指定者:
getCaCertificatesBytes在接口中DestinationRuleOuterClass.ClientTLSSettingsOrBuilder- 返回:
- The bytes for caCertificates.
-
getCredentialName
The name of the secret that holds the TLS certs for the client including the CA certificates. Secret must exist in the same namespace with the proxy using the certificates. The secret (of type `generic`)should contain the following keys and values: `key: <privateKey>`, `cert: <serverCert>`, `cacert: <CACertificate>`. Secret of type tls for client certificates along with ca.crt key for CA certificates is also supported. Only one of client certificates and CA certificate or credentialName can be specified. **NOTE:** This field is currently applicable only at gateways. Sidecars will continue to use the certificate paths.
string credential_name = 7;- 指定者:
getCredentialName在接口中DestinationRuleOuterClass.ClientTLSSettingsOrBuilder- 返回:
- The credentialName.
-
getCredentialNameBytes
public com.google.protobuf.ByteString getCredentialNameBytes()The name of the secret that holds the TLS certs for the client including the CA certificates. Secret must exist in the same namespace with the proxy using the certificates. The secret (of type `generic`)should contain the following keys and values: `key: <privateKey>`, `cert: <serverCert>`, `cacert: <CACertificate>`. Secret of type tls for client certificates along with ca.crt key for CA certificates is also supported. Only one of client certificates and CA certificate or credentialName can be specified. **NOTE:** This field is currently applicable only at gateways. Sidecars will continue to use the certificate paths.
string credential_name = 7;- 指定者:
getCredentialNameBytes在接口中DestinationRuleOuterClass.ClientTLSSettingsOrBuilder- 返回:
- The bytes for credentialName.
-
getSubjectAltNamesList
public com.google.protobuf.ProtocolStringList getSubjectAltNamesList()A list of alternate names to verify the subject identity in the certificate. If specified, the proxy will verify that the server certificate's subject alt name matches one of the specified values. If specified, this list overrides the value of subject_alt_names from the ServiceEntry.
repeated string subject_alt_names = 5;- 指定者:
getSubjectAltNamesList在接口中DestinationRuleOuterClass.ClientTLSSettingsOrBuilder- 返回:
- A list containing the subjectAltNames.
-
getSubjectAltNamesCount
public int getSubjectAltNamesCount()A list of alternate names to verify the subject identity in the certificate. If specified, the proxy will verify that the server certificate's subject alt name matches one of the specified values. If specified, this list overrides the value of subject_alt_names from the ServiceEntry.
repeated string subject_alt_names = 5;- 指定者:
getSubjectAltNamesCount在接口中DestinationRuleOuterClass.ClientTLSSettingsOrBuilder- 返回:
- The count of subjectAltNames.
-
getSubjectAltNames
A list of alternate names to verify the subject identity in the certificate. If specified, the proxy will verify that the server certificate's subject alt name matches one of the specified values. If specified, this list overrides the value of subject_alt_names from the ServiceEntry.
repeated string subject_alt_names = 5;- 指定者:
getSubjectAltNames在接口中DestinationRuleOuterClass.ClientTLSSettingsOrBuilder- 参数:
index- The index of the element to return.- 返回:
- The subjectAltNames at the given index.
-
getSubjectAltNamesBytes
public com.google.protobuf.ByteString getSubjectAltNamesBytes(int index) A list of alternate names to verify the subject identity in the certificate. If specified, the proxy will verify that the server certificate's subject alt name matches one of the specified values. If specified, this list overrides the value of subject_alt_names from the ServiceEntry.
repeated string subject_alt_names = 5;- 指定者:
getSubjectAltNamesBytes在接口中DestinationRuleOuterClass.ClientTLSSettingsOrBuilder- 参数:
index- The index of the value to return.- 返回:
- The bytes of the subjectAltNames at the given index.
-
getSni
SNI string to present to the server during TLS handshake.
string sni = 6;- 指定者:
getSni在接口中DestinationRuleOuterClass.ClientTLSSettingsOrBuilder- 返回:
- The sni.
-
getSniBytes
public com.google.protobuf.ByteString getSniBytes()SNI string to present to the server during TLS handshake.
string sni = 6;- 指定者:
getSniBytes在接口中DestinationRuleOuterClass.ClientTLSSettingsOrBuilder- 返回:
- The bytes for sni.
-
isInitialized
public final boolean isInitialized()- 指定者:
isInitialized在接口中com.google.protobuf.MessageLiteOrBuilder- 覆盖:
isInitialized在类中com.google.protobuf.GeneratedMessageV3
-
writeTo
- 指定者:
writeTo在接口中com.google.protobuf.MessageLite- 覆盖:
writeTo在类中com.google.protobuf.GeneratedMessageV3- 抛出:
IOException
-
getSerializedSize
public int getSerializedSize()- 指定者:
getSerializedSize在接口中com.google.protobuf.MessageLite- 覆盖:
getSerializedSize在类中com.google.protobuf.GeneratedMessageV3
-
equals
- 指定者:
equals在接口中com.google.protobuf.Message- 覆盖:
equals在类中com.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- 指定者:
hashCode在接口中com.google.protobuf.Message- 覆盖:
hashCode在类中com.google.protobuf.AbstractMessage
-
parseFrom
public static DestinationRuleOuterClass.ClientTLSSettings parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DestinationRuleOuterClass.ClientTLSSettings parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DestinationRuleOuterClass.ClientTLSSettings parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DestinationRuleOuterClass.ClientTLSSettings parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DestinationRuleOuterClass.ClientTLSSettings parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DestinationRuleOuterClass.ClientTLSSettings parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DestinationRuleOuterClass.ClientTLSSettings parseFrom(InputStream input) throws IOException - 抛出:
IOException
-
parseFrom
public static DestinationRuleOuterClass.ClientTLSSettings parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - 抛出:
IOException
-
parseDelimitedFrom
public static DestinationRuleOuterClass.ClientTLSSettings parseDelimitedFrom(InputStream input) throws IOException - 抛出:
IOException
-
parseDelimitedFrom
public static DestinationRuleOuterClass.ClientTLSSettings parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - 抛出:
IOException
-
parseFrom
public static DestinationRuleOuterClass.ClientTLSSettings parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - 抛出:
IOException
-
parseFrom
public static DestinationRuleOuterClass.ClientTLSSettings parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - 抛出:
IOException
-
newBuilderForType
- 指定者:
newBuilderForType在接口中com.google.protobuf.Message- 指定者:
newBuilderForType在接口中com.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
public static DestinationRuleOuterClass.ClientTLSSettings.Builder newBuilder(DestinationRuleOuterClass.ClientTLSSettings prototype) -
toBuilder
- 指定者:
toBuilder在接口中com.google.protobuf.Message- 指定者:
toBuilder在接口中com.google.protobuf.MessageLite
-
newBuilderForType
protected DestinationRuleOuterClass.ClientTLSSettings.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - 指定者:
newBuilderForType在类中com.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- 指定者:
getParserForType在接口中com.google.protobuf.Message- 指定者:
getParserForType在接口中com.google.protobuf.MessageLite- 覆盖:
getParserForType在类中com.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- 指定者:
getDefaultInstanceForType在接口中com.google.protobuf.MessageLiteOrBuilder- 指定者:
getDefaultInstanceForType在接口中com.google.protobuf.MessageOrBuilder
-