chore(elbv2): add post-quantum cryptography SSL policies#36297
chore(elbv2): add post-quantum cryptography SSL policies#36297mergify[bot] merged 44 commits intoaws:mainfrom
Conversation
- Add 6 new post-quantum hybrid key exchange SSL policies using ML-KEM * TLS13_13_PQ: TLS 1.3 only with quantum resistance * TLS13_12_PQ: TLS 1.2 and 1.3 with quantum resistance * TLS13_12_RES_PQ: Restricted cipher suite with quantum resistance * TLS13_12_EXT1_PQ: Extended cipher suite 1 with quantum resistance * TLS13_12_EXT2_PQ: Extended cipher suite 2 with quantum resistance * TLS13_10_PQ: TLS 1.0 through 1.3 with quantum resistance - Add 8 new FIPS-compliant post-quantum cryptography SSL policies * FIPS_TLS13_13_PQ: FIPS TLS 1.3 only with quantum resistance * FIPS_TLS13_12_PQ: FIPS TLS 1.2 and 1.3 with quantum resistance * FIPS_TLS13_12_RES_PQ: FIPS restricted cipher suite with quantum resistance * FIPS_TLS13_12_EXT0_PQ: FIPS extended cipher suite 0 with quantum resistance * FIPS_TLS13_12_EXT1_PQ: FIPS extended cipher suite 1 with quantum resistance * FIPS_TLS13_12_EXT2_PQ: FIPS extended cipher suite 2 with quantum resistance * FIPS_TLS13_11_PQ: FIPS TLS 1.1 through 1.3 with quantum resistance * FIPS_TLS13_10_PQ: FIPS TLS 1.0 through 1.3 with quantum resistance - Support AWS recommended post-quantum cryptography policies for enhanced security
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
Can you also update |
Sure I will look into this and update this PR. |
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/describe-ssl-policies.html
Key Discrepancy: The AWS Console already defaults to post-quantum security, but all programmatic methods (CLI, CloudFormation, CDK) still use older, non-post-quantum policies. This creates an inconsistent experience where Console users get better security by default than infrastructure-as-code users. I am on board to make CDK default to We have two options here to move this path forward: Option 1: Feature Flag// Add a new feature flag
RECOMMENDED_TLS_PQ = 'ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09'
// Keep existing for backward compatibility
RECOMMENDED_TLS = 'ELBSecurityPolicy-TLS13-1-2-2021-06'Users opt-in via CDK feature flags: // cdk.json
{
"context": {
"@aws-cdk/aws-elasticloadbalancingv2:usePostQuantumTlsPolicy": true
}
}export enum SslPolicy {
/**
* The recommended security policy for TLS listeners.
*
* When feature flag @aws-cdk/aws-elasticloadbalancingv2:usePostQuantumTlsPolicy is enabled,
* this uses ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09 (post-quantum).
* Otherwise uses ELBSecurityPolicy-TLS13-1-2-2021-06 (legacy).
*/
RECOMMENDED_TLS = // dynamically determined based on feature flag
FeatureFlags.of(this).isEnabled(ELB_USE_POST_QUANTUM_TLS_POLICY)
? 'ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09'
: 'ELBSecurityPolicy-TLS13-1-2-2021-06',
}Result:
This way existing code using SslPolicy.RECOMMENDED_TLS gets the new behavior only when users explicitly opt-in via the feature flag. Option 2: New Enum Value// Add alongside existing
RECOMMENDED_TLS = 'ELBSecurityPolicy-TLS13-1-2-2021-06' // unchanged
RECOMMENDED_TLS_PQ = 'ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09' // newexport enum SslPolicy {
/**
* The recommended security policy for TLS listeners.
* This policy includes TLS 1.3, and is backwards compatible with TLS 1.2
*/
RECOMMENDED_TLS = 'ELBSecurityPolicy-TLS13-1-2-2021-06', // UNCHANGED
/**
* The recommended post-quantum security policy for TLS listeners.
* AWS recommended policy for post-quantum cryptography.
*/
RECOMMENDED_TLS_PQ = 'ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09', // NEW
}Behavior:
Personally, if the console now defaults to TLS_PQ, I don't see any reason CDK should not by introducing a FF. Let me know if there's any other concerns. |
|
I'm in favor of |
- Add integration test for post-quantum cryptography TLS policies on ALB and NLB - Add feature flag test case with disabled post-quantum TLS policy behavior - Add snapshot files for post-quantum TLS policy integration test stack - Update ALB application listener to support post-quantum TLS policies - Update NLB network listener to support post-quantum TLS policies - Add post-quantum TLS policy enum values to shared enums - Add feature flag '@aws-cdk/aws-elasticloadbalancingv2:usePostQuantumTlsPolicy' to cx-api - Update ALB and NLB listener unit tests to cover post-quantum policy scenarios - Ensures backward compatibility with feature flag disabled by default
|
|
||||||||||||||
|
|
||||||||||||||
|
I think the new Post Quantum AWS customers who are currently using the classical version of I know that the AWS Console defaults to I'd feel much more confident in making the new Post Quantum CDK |
| */ | ||
| export function getRecommendedTlsPolicy(scope: Construct): string { | ||
| if (FeatureFlags.of(scope).isEnabled(cxapi.ELB_USE_POST_QUANTUM_TLS_POLICY)) { | ||
| return SslPolicy.TLS13_12_RES_PQ; |
There was a problem hiding this comment.
I think you should add a new RECOMMENDED_TLS_PQ enum to SslPolicy, and then change this line to be return SslPolicy.RECOMMENDED_TLS_PQ
- Add new `RECOMMENDED_TLS_PQ` enum value for post-quantum TLS policy - Set policy to `ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09` with ML-KEM hybrid key exchange - Update `getRecommendedTlsPolicy()` to return `RECOMMENDED_TLS_PQ` instead of `TLS13_12_RES_PQ` - Add comprehensive JSDoc comments explaining post-quantum cryptography support - Provides AWS-recommended security policy for quantum-resistant TLS connections
- Update SSL policy name from `ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09` to `ELBSecurityPolicy-TLS13-1-2-PQ-2025-09` - Update ALB listener snapshot with corrected policy name - Update NLB listener snapshot with corrected policy name - Update enums.ts to reflect the correct policy identifier - Add test cases for ALB and NLB listeners with corrected policy - Update feature flag configuration in cx-api - Fixes incorrect policy naming that was using "Res" prefix which should not be present in the post-quantum TLS policy identifier
- Remove `getRecommendedTlsPolicy()` helper function and inline feature flag logic directly in listeners - Update ApplicationListener to calculate SSL policy based on feature flag before calling super() - Update NetworkListener to calculate SSL policy based on feature flag before calling super() - Remove test file for feature flag disabled scenario (test-feature-flag-disabled.ts) - Simplify SSL policy determination by checking `ELB_USE_POST_QUANTUM_TLS_POLICY` feature flag at listener construction time - This change consolidates TLS policy selection logic and removes unnecessary abstraction layer
Rename RECOMMENDED_TLS_PQ enum to TLS13_12_PQ to follow the same naming convention as other PQ entries (TLS13_13_PQ, TLS13_12_RES_PQ, etc.) per reviewer feedback. No opinion baked into the enum name - the feature flag handles the 'recommended' semantics.
|
➡️ PR build request submitted to A maintainer must now check the pipeline and add the |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Merge Queue Status
This pull request spent 47 minutes 52 seconds in the queue, with no time running CI. ReasonThe pull request can't be updated
HintYou should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. |
|
@Mergifyio refresh |
✅ Pull request refreshed |
Merge Queue Status
This pull request spent 3 seconds in the queue, with no time running CI. ReasonThe pull request can't be updated
HintYou should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Merge Queue Status
Required conditions to merge
Required conditions to stay in the queue
|
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #36283.
Reason for this change
AWS supports post-quantum (PQ) security policies for ALB and NLB using hybrid ML-KEM key exchange. The CDK's SslPolicy enum lacks these policies, and the AWS Console already defaults to PQ policies while CDK still uses ELBSecurityPolicy-2016-08.
Description of changes
Added 11 post-quantum security policy enum values to SslPolicy:
Standard TLS Policies with PQ:
FIPS-Compliant Policies with PQ:
All enum entries include
@seelinks to the AWS ELB SSL policies documentation.Added feature flag
@aws-cdk/aws-elasticloadbalancingv2:usePostQuantumTlsPolicy:SslPolicy.TLS13_12_PQ(ELBSecurityPolicy-TLS13-1-2-PQ-2025-09)Updated listener implementations:
sslPolicyalways overrides the feature flagBehavior Summary
Description of how you validated changes
Checklist