Skip to content
v2.278.0

TlsValidationContextProperty Struct ​

An object that represents how the proxy will validate its peer during Transport Layer Security (TLS) negotiation.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appmesh as appmesh } from 'aws-cdk-lib';
const tlsValidationContextProperty: appmesh.CfnVirtualNode.TlsValidationContextProperty = {
  trust: {
    acm: {
      certificateAuthorityArns: ['certificateAuthorityArns'],
    },
    file: {
      certificateChain: 'certificateChain',
    },
    sds: {
      secretName: 'secretName',
    },
  },

  // the properties below are optional
  subjectAlternativeNames: {
    match: {
      exact: ['exact'],
    },
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appmesh as appmesh

tls_validation_context_property = appmesh.CfnVirtualNode.TlsValidationContextProperty(
    trust=appmesh.CfnVirtualNode.TlsValidationContextTrustProperty(
        acm=appmesh.CfnVirtualNode.TlsValidationContextAcmTrustProperty(
            certificate_authority_arns=["certificateAuthorityArns"]
        ),
        file=appmesh.CfnVirtualNode.TlsValidationContextFileTrustProperty(
            certificate_chain="certificateChain"
        ),
        sds=appmesh.CfnVirtualNode.TlsValidationContextSdsTrustProperty(
            secret_name="secretName"
        )
    ),

    # the properties below are optional
    subject_alternative_names=appmesh.CfnVirtualNode.SubjectAlternativeNamesProperty(
        match=appmesh.CfnVirtualNode.SubjectAlternativeNameMatchersProperty(
            exact=["exact"]
        )
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appmesh.*;

TlsValidationContextProperty tlsValidationContextProperty = TlsValidationContextProperty.builder()
        .trust(TlsValidationContextTrustProperty.builder()
                .acm(TlsValidationContextAcmTrustProperty.builder()
                        .certificateAuthorityArns(List.of("certificateAuthorityArns"))
                        .build())
                .file(TlsValidationContextFileTrustProperty.builder()
                        .certificateChain("certificateChain")
                        .build())
                .sds(TlsValidationContextSdsTrustProperty.builder()
                        .secretName("secretName")
                        .build())
                .build())

        // the properties below are optional
        .subjectAlternativeNames(SubjectAlternativeNamesProperty.builder()
                .match(SubjectAlternativeNameMatchersProperty.builder()
                        .exact(List.of("exact"))
                        .build())
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppMesh;

var tlsValidationContextProperty = new TlsValidationContextProperty {
    Trust = new TlsValidationContextTrustProperty {
        Acm = new TlsValidationContextAcmTrustProperty {
            CertificateAuthorityArns = new [] { "certificateAuthorityArns" }
        },
        File = new TlsValidationContextFileTrustProperty {
            CertificateChain = "certificateChain"
        },
        Sds = new TlsValidationContextSdsTrustProperty {
            SecretName = "secretName"
        }
    },

    // the properties below are optional
    SubjectAlternativeNames = new SubjectAlternativeNamesProperty {
        Match = new SubjectAlternativeNameMatchersProperty {
            Exact = new [] { "exact" }
        }
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

tlsValidationContextProperty := &TlsValidationContextProperty{
	Trust: &TlsValidationContextTrustProperty{
		Acm: &TlsValidationContextAcmTrustProperty{
			CertificateAuthorityArns: []*string{
				jsii.String("certificateAuthorityArns"),
			},
		},
		File: &TlsValidationContextFileTrustProperty{
			CertificateChain: jsii.String("certificateChain"),
		},
		Sds: &TlsValidationContextSdsTrustProperty{
			SecretName: jsii.String("secretName"),
		},
	},

	// the properties below are optional
	SubjectAlternativeNames: &SubjectAlternativeNamesProperty{
		Match: &SubjectAlternativeNameMatchersProperty{
			Exact: []*string{
				jsii.String("exact"),
			},
		},
	},
}

Properties ​

subjectAlternativeNamesoptionalIResolvable | CfnVirtualNode.SubjectAlternativeNamesPropertysubject_alternative_namesoptionaltyping.Union[IResolvable, SubjectAlternativeNamesProperty]subjectAlternativeNamesoptionalIResolvableSubjectAlternativeNamesoptionalIResolvableSubjectAlternativeNamesoptionalinterface{} #
A reference to an object that represents the SANs for a Transport Layer Security (TLS) validation context.
notes

If you don't specify SANs on the terminating mesh endpoint, the Envoy proxy for that node doesn't verify the SAN on a peer client certificate. If you don't specify SANs on the originating mesh endpoint, the SAN on the certificate provided by the terminating endpoint must match the mesh endpoint service discovery configuration. Since SPIRE vended certificates have a SPIFFE ID as a name, you must set the SAN since the name doesn't match the service discovery name.

A reference to where to retrieve the trust chain when validating a peer’s Transport Layer Security (TLS) certificate.