Class SubjectAlternativeNames
Used to generate Subject Alternative Names Matchers.
Inheritance
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class SubjectAlternativeNames : DeputyBase
Syntax (vb)
Public MustInherit Class SubjectAlternativeNames
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
Mesh mesh;
var node1 = new VirtualNode(this, "node1", new VirtualNodeProps {
Mesh = mesh,
ServiceDiscovery = ServiceDiscovery.Dns("node"),
Listeners = new [] { VirtualNodeListener.Grpc(new GrpcVirtualNodeListenerOptions {
Port = 80,
Tls = new ListenerTlsOptions {
Mode = TlsMode.STRICT,
Certificate = TlsCertificate.File("path/to/certChain", "path/to/privateKey"),
// Validate a file client certificates to enable mutual TLS authentication when a client provides a certificate.
MutualTlsValidation = new MutualTlsValidation {
Trust = TlsValidationTrust.File("path-to-certificate")
}
}
}) }
});
var certificateAuthorityArn = "arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/12345678-1234-1234-1234-123456789012";
var node2 = new VirtualNode(this, "node2", new VirtualNodeProps {
Mesh = mesh,
ServiceDiscovery = ServiceDiscovery.Dns("node2"),
BackendDefaults = new BackendDefaults {
TlsClientPolicy = new TlsClientPolicy {
Ports = new [] { 8080, 8081 },
Validation = new TlsValidation {
SubjectAlternativeNames = SubjectAlternativeNames.MatchingExactly("mesh-endpoint.apps.local"),
Trust = TlsValidationTrust.Acm(new [] { CertificateAuthority.FromCertificateAuthorityArn(this, "certificate", certificateAuthorityArn) })
},
// Provide a SDS client certificate when a server requests it and enable mutual TLS authentication.
MutualTlsCertificate = TlsCertificate.Sds("secret_certificate")
}
}
});
Synopsis
Constructors
SubjectAlternativeNames() | |
SubjectAlternativeNames(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
SubjectAlternativeNames(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(Construct) | Returns Subject Alternative Names Matcher based on method type. |
MatchingExactly(String[]) | The values of the SAN must match the specified values exactly. |
Constructors
SubjectAlternativeNames()
protected SubjectAlternativeNames()
SubjectAlternativeNames(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected SubjectAlternativeNames(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
SubjectAlternativeNames(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected SubjectAlternativeNames(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(Construct)
Returns Subject Alternative Names Matcher based on method type.
public abstract ISubjectAlternativeNamesMatcherConfig Bind(Construct scope)
Parameters
- scope Constructs.Construct
Returns
ISubjectAlternativeNamesMatcherConfig
MatchingExactly(String[])
The values of the SAN must match the specified values exactly.
public static SubjectAlternativeNames MatchingExactly(params string[] names)
Parameters
- names System.String[]
The exact values to test against.
Returns