@Generated(value="jsii-pacmak/1.57.0 (build f614666)", date="2022-04-22T22:36:22.227Z") @Stability(value=Stable) public enum SslPolicy extends Enum<SslPolicy>
We recommend the Recommended policy for general use. You can use the ForwardSecrecy policy if you require Forward Secrecy (FS).
You can use one of the TLS policies to meet compliance and security standards that require disabling certain TLS protocol versions, or to support legacy clients that require deprecated ciphers.
Example:
import software.amazon.awscdk.services.route53.HostedZone;
import software.amazon.awscdk.services.certificatemanager.Certificate;
import software.amazon.awscdk.services.elasticloadbalancingv2.SslPolicy;
Vpc vpc;
Cluster cluster;
IHostedZone domainZone = HostedZone.fromLookup(this, "Zone", HostedZoneProviderProps.builder().domainName("example.com").build());
ICertificate certificate = Certificate.fromCertificateArn(this, "Cert", "arn:aws:acm:us-east-1:123456:certificate/abcdefg");
ApplicationLoadBalancedFargateService loadBalancedFargateService = ApplicationLoadBalancedFargateService.Builder.create(this, "Service")
.vpc(vpc)
.cluster(cluster)
.certificate(certificate)
.sslPolicy(SslPolicy.RECOMMENDED)
.domainName("api.example.com")
.domainZone(domainZone)
.redirectHTTP(true)
.taskImageOptions(ApplicationLoadBalancedTaskImageOptions.builder()
.image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
.build())
.build();
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html| Enum Constant and Description |
|---|
FORWARD_SECRECY
Forward secrecy ciphers only.
|
FORWARD_SECRECY_TLS11
Forward secrecy ciphers only with TLS1.1 and higher.
|
FORWARD_SECRECY_TLS12
Forward secrecy ciphers and TLS1.2 only.
|
FORWARD_SECRECY_TLS12_RES
Strong forward secrecy ciphers and TLS1.2 only.
|
FORWARD_SECRECY_TLS12_RES_GCM
Strong foward secrecy ciphers and TLV1.2 only (2020 edition).
|
LEGACY
Support for DES-CBC3-SHA.
|
RECOMMENDED
The recommended security policy.
|
TLS11
TLS1.1 and higher with all ciphers.
|
TLS12
TLS1.2 only and no SHA ciphers.
|
TLS12_EXT
TLS1.2 only with all ciphers.
|
| Modifier and Type | Method and Description |
|---|---|
static SslPolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SslPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Stable) public static final SslPolicy RECOMMENDED
@Stability(value=Stable) public static final SslPolicy FORWARD_SECRECY_TLS12_RES_GCM
@Stability(value=Stable) public static final SslPolicy FORWARD_SECRECY_TLS12_RES
@Stability(value=Stable) public static final SslPolicy FORWARD_SECRECY_TLS12
@Stability(value=Stable) public static final SslPolicy FORWARD_SECRECY_TLS11
@Stability(value=Stable) public static final SslPolicy FORWARD_SECRECY
@Stability(value=Stable) public static final SslPolicy TLS12
@Stability(value=Stable) public static final SslPolicy TLS12_EXT
@Stability(value=Stable) public static final SslPolicy TLS11
@Stability(value=Stable) public static final SslPolicy LEGACY
Do not use this security policy unless you must support a legacy client that requires the DES-CBC3-SHA cipher, which is a weak cipher.
public static SslPolicy[] values()
for (SslPolicy c : SslPolicy.values()) System.out.println(c);
public static SslPolicy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.