-
-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Added support for Authorizers #64
feat: Added support for Authorizers #64
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good.
Please update an example in examples/complete-http
to use the feature you are adding in this PR.
main.tf
Outdated
dynamic "jwt_configuration" { | ||
for_each = lookup(each.value, "audience", null) == null ? tolist([]) : tolist([lookup(each.value, "audience", null)]) | ||
content { | ||
audience = [lookup(each.value, "audience", null)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
audience = [lookup(each.value, "audience", null)] | |
audience = jwt_configuration.value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH - Both sub-elements (issuer and audience are both optional - the for_each should be based on the either of them being present, but not necessarily both...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this change assuming that audience and issuer would both be present. But it's possible to supply just issuer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then let's change for_each
on line 193 to handle that at least one value (audience or issuer) should be present.
Co-authored-by: Anton Babenko <anton@antonbabenko.com>
Co-authored-by: Anton Babenko <anton@antonbabenko.com>
Co-authored-by: Anton Babenko <anton@antonbabenko.com>
## [1.6.0](v1.5.1...v1.6.0) (2022-03-25) ### Features * Added support for Authorizers ([#64](#64)) ([5cd32e0](5cd32e0))
Thank you @bobbydeveaux for the contribution! I have updated the code in examples to make it executable. |
This PR is included in version 1.6.0 🎉 |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Adding a new section
Authorizers
which allows anyone to create multiple authorisers of varying types.Motivation and Context
We needed to add a JWT and OIDC Auth to our project API Gateway
How Has This Been Tested?
Deployed into our own sandbox account and working great.