Interface TlsClientPolicy

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
TlsClientPolicy.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:46.168Z") @Stability(Stable) public interface TlsClientPolicy extends software.amazon.jsii.JsiiSerializable
Represents the properties needed to define client policy.

Example:

 Mesh mesh;
 Service service;
 VirtualNode node = VirtualNode.Builder.create(this, "node")
         .mesh(mesh)
         .serviceDiscovery(ServiceDiscovery.cloudMap(service))
         .listeners(List.of(VirtualNodeListener.http(HttpVirtualNodeListenerOptions.builder()
                 .port(8080)
                 .healthCheck(HealthCheck.http(HttpHealthCheckOptions.builder()
                         .healthyThreshold(3)
                         .interval(Duration.seconds(5))
                         .path("/ping")
                         .timeout(Duration.seconds(2))
                         .unhealthyThreshold(2)
                         .build()))
                 .timeout(HttpTimeout.builder()
                         .idle(Duration.seconds(5))
                         .build())
                 .build())))
         .backendDefaults(BackendDefaults.builder()
                 .tlsClientPolicy(TlsClientPolicy.builder()
                         .validation(TlsValidation.builder()
                                 .trust(TlsValidationTrust.file("/keys/local_cert_chain.pem"))
                                 .build())
                         .build())
                 .build())
         .accessLog(AccessLog.fromFilePath("/dev/stdout"))
         .build();
 Tags.of(node).add("Environment", "Dev");
 
  • Method Details

    • getValidation

      @Stability(Stable) @NotNull TlsValidation getValidation()
      Represents the object for TLS validation context.
    • getEnforce

      @Stability(Stable) @Nullable default Boolean getEnforce()
      Whether the policy is enforced.

      Default: true

    • getMutualTlsCertificate

      @Stability(Stable) @Nullable default MutualTlsCertificate getMutualTlsCertificate()
      Represents a client TLS certificate.

      The certificate will be sent only if the server requests it, enabling mutual TLS.

      Default: - client TLS certificate is not provided

    • getPorts

      @Stability(Stable) @Nullable default List<Number> getPorts()
      TLS is enforced on the ports specified here.

      If no ports are specified, TLS will be enforced on all the ports.

      Default: - all ports

    • builder

      @Stability(Stable) static TlsClientPolicy.Builder builder()
      Returns:
      a TlsClientPolicy.Builder of TlsClientPolicy