feat(elasticloadbalancingv2): add authenticateJwtWithCognito and allowHttpsOutbound for JWT action#37494
Open
badmintoncryer wants to merge 42 commits intoaws:mainfrom
Open
feat(elasticloadbalancingv2): add authenticateJwtWithCognito and allowHttpsOutbound for JWT action#37494badmintoncryer wants to merge 42 commits intoaws:mainfrom
badmintoncryer wants to merge 42 commits intoaws:mainfrom
Conversation
…tication options Add HTTPS protocol and 256-character length validation for jwksEndpoint and issuer in AuthenticateJwtAction, catching misconfigurations at synth-time rather than deploy-time.
Update UnscopedValidationError calls in AuthenticateJwtAction to use lit`...` tagged template literals for error code names, as required by the LiteralString branded type introduced in aws#37381. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…and add test for JWT action
…wtWithCognito and warning when disabled - Add allowHttpsOutbound option to AuthenticateJwtWithCognitoOptions - Pass allowHttpsOutbound through to AuthenticateJwtAction in authenticateJwtWithCognito - Emit annotation warning when allowHttpsOutbound is false to remind users to configure outbound HTTPS in the ALB's security group manually
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
None
Reason for this change
When using a Cognito User Pool with
ListenerAction.authenticateJwt(), we currently have to manually construct the issuer and JWKS endpoint URLs.This PR is based on this comment in #36099 .
Description of changes
∙ Added
ListenerAction.authenticateJwtWithCognito(), which automatically builds the issuer and JWKS endpoint URLs simply by passing a Cognito User Pool.∙ Added an
allowHttpsOutboundoption (default:false) to AuthenticateJwtAction that automatically allows outbound HTTPS (port 443) on the ALB Security Group, consistent with the behavior of the OIDC action (AuthenticateOidcAction). To avoid breaking change, I made the default valuefalse.Description of how you validated changes
Added both unit and integ tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license