SubjectAlternativeNames
- class aws_cdk.aws_appmesh.SubjectAlternativeNames
Bases:
object
Used to generate Subject Alternative Names Matchers.
- ExampleMetadata:
infused
Example:
# mesh: appmesh.Mesh node1 = appmesh.VirtualNode(self, "node1", mesh=mesh, service_discovery=appmesh.ServiceDiscovery.dns("node"), listeners=[appmesh.VirtualNodeListener.grpc( port=80, tls=appmesh.ListenerTlsOptions( mode=appmesh.TlsMode.STRICT, certificate=appmesh.TlsCertificate.file("path/to/certChain", "path/to/privateKey"), # Validate a file client certificates to enable mutual TLS authentication when a client provides a certificate. mutual_tls_validation=appmesh.MutualTlsValidation( trust=appmesh.TlsValidationTrust.file("path-to-certificate") ) ) )] ) certificate_authority_arn = "arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/12345678-1234-1234-1234-123456789012" node2 = appmesh.VirtualNode(self, "node2", mesh=mesh, service_discovery=appmesh.ServiceDiscovery.dns("node2"), backend_defaults=appmesh.BackendDefaults( tls_client_policy=appmesh.TlsClientPolicy( ports=[8080, 8081], validation=appmesh.TlsValidation( subject_alternative_names=appmesh.SubjectAlternativeNames.matching_exactly("mesh-endpoint.apps.local"), trust=appmesh.TlsValidationTrust.acm([ acmpca.CertificateAuthority.from_certificate_authority_arn(self, "certificate", certificate_authority_arn) ]) ), # Provide a SDS client certificate when a server requests it and enable mutual TLS authentication. mutual_tls_certificate=appmesh.TlsCertificate.sds("secret_certificate") ) ) )
Methods
- abstract bind(scope)
Returns Subject Alternative Names Matcher based on method type.
- Parameters:
scope (
Construct
) –- Return type:
Static Methods
- classmethod matching_exactly(*names)
The values of the SAN must match the specified values exactly.
- Parameters:
names (
str
) – The exact values to test against.- Return type: