-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(appsync): erroneous api key created when additional authorization is not configured #9057
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.
Hi @warrify, thanks for contributing :)
Is it possible to write out a unit test for this to make sure that the API_KEY
is not created?
Also, editing the commit message of the PR to explain the issue and approach at hand would be great for customers to be able to see.
I wrote a unit test for it and posted it on gist here! Check it out and add to it if you want :) As for the commit message, something that explains the issue and the fix should be sufficient:
|
AppSync uses API Key Auth by default. If specifying another auth type it still creates a Key. Now a Key is only created if the auth mode or an additional auth mode is set to API_KEY.
@BryanPan342 thanks for the test! Sorry for the delay, missed your first comment. |
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.
We have a picky linter :( makes me sad too but from the error logs
@aws-cdk/aws-appsync: 68:13 error Strings must use singlequote quotes
@aws-cdk/aws-appsync: 69:50 error Strings must use singlequote quotes
@aws-cdk/aws-appsync: 79:38 error Strings must use singlequote quotes
The change is simply to make these single quotes!
No worries @warrify! Thanks again for the contribution 😃 I think the only thing that's left is to update the PR description and address the linter 🎉 |
The linter expects single quotes and my Editor screwed them up
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.
LGTM 🎉
Nice job and thanks @warrify on the contribution 😃
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
… is not configured (aws#9057) fixes aws#9054 The AppSync GraphQL API uses API_KEY Auth by default. For this it creates an API key. This is fine as long as API_KEY auth is configured for the API. But this behaviour is erroneous when API_KEY Auth is neither the default nor an addition authentication method. This PR addresses this issue and ensures that an API key is only created when API_KEY auth is really configured. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
fixes #9054
The AppSync GraphQL API uses API_KEY Auth by default. For this it creates an API key. This is fine as long as API_KEY auth is configured for the API. But this behaviour is erroneous when API_KEY Auth is neither the default nor an addition authentication method.
This PR addresses this issue and ensures that an API key is only created when API_KEY auth is really configured.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license