Add (very) minimal support for AWS ALB #180
Merged
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 #, if available: #109
Description of changes: This PR adds (very) minimal support for AWS ALB, basically by being more lenient and accept any padding (
=
) characters in the JWT (such padding is, for the record, officially not allowed, per the JWS specification (see here)).This PR adds an AWS ALB setup to our Cognito test stack, as well as an automated script to get a real JWT signed by AWS ALB (using web scraping of the Cognito Hosted UI with
jsdom
library) and test verification of this JWT.To see how to verify an AWS ALB check the test
"Verify Data token from ALB"
in file ./tests/cognito/test/cognito.test.tsNOTE: This PR includes the updates from #179 -- please review and merge that one first.
NOTE 2: Proper AWS ALB support (e.g. with public key caching) is being added by @NicolasViaud in #176
NOTE 3: Also updated the Cognito test stack to CDK v2 which (therefore the diff is pretty big)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.