-
Notifications
You must be signed in to change notification settings - Fork 218
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
http-x-api-key auth not compatible with api gateway #327
Comments
It's really weird that the "name" property is case sensitive in API Gateway. That seems like a bug. We can hack in a fix though for 0.9.x. As for the CORs issue, here's a fix for the next major version we release (1.0): #328 |
mtdowling
added a commit
that referenced
this issue
Mar 27, 2020
Ensures that http-x-api-key adds the appropriate CORS headers and that it uses the lowercase header name to make API Gateway happy. Closes #327
Merged
mtdowling
added a commit
that referenced
this issue
Mar 27, 2020
Ensures that http-x-api-key adds the appropriate CORS headers and that it uses the lowercase header name to make API Gateway happy. Closes #327
Thanks for the quick turnaround! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the code for the converter it states that it is compatible with api gateway api key authorization but it does not seem to be the case or at least with the open api definition generated it does not correctly set the
ApiKeyRequired
property on the api gateway methods.From my findings the security scheme that is generated looks like this:
Which api gateway ignores, however if changing the value of name to
x-api-key
then api gateway will correctly set theApiKeyRequired
property on any methods annotated with@auth(["http-x-api-key"])
The other thing is that it should set
X-Api-Key
as an allowed header when using the@cors()
trait but it does not (though it could be easily added by modifying the converter above)Am I misinterpreting how this should work or is this a bug in the converter (or api gateway)?
The text was updated successfully, but these errors were encountered: