Skip to content
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: add sharedId in externalAuthEnable() #7315

Merged
merged 2 commits into from
May 24, 2021
Merged

fix: add sharedId in externalAuthEnable() #7315

merged 2 commits into from
May 24, 2021

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented May 12, 2021

Description of changes

This commit updates externalAuthEnable() to include the auth sharedId when creating an auth resource. The sharedId is given the lowest priority in the authProps object so that it will not overwrite any previously existing sharedId. It also uses the sharedId from cognito-defaults for consistency. This change prevents the creation of snsundefined roles.

Issue #, if available

N/A

Description of how you validated changes

Manual testing - create a new project, add a REST API with restricted access

Checklist

  • PR description included
  • yarn test passes

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@cjihrig cjihrig requested a review from a team as a code owner May 12, 2021 16:48
@cjihrig cjihrig requested a review from attilah May 12, 2021 16:50
@codecov-commenter
Copy link

codecov-commenter commented May 12, 2021

Codecov Report

Merging #7315 (187deea) into master (4cc2b2c) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7315   +/-   ##
=======================================
  Coverage   52.63%   52.63%           
=======================================
  Files         511      511           
  Lines       25895    25893    -2     
  Branches     5052     5052           
=======================================
- Hits        13630    13629    -1     
+ Misses      11292    11291    -1     
  Partials      973      973           
Impacted Files Coverage Δ
packages/amplify-category-auth/src/index.js 9.66% <ø> (-0.39%) ⬇️
...utils/awscloudformation/assets/cognito-defaults.js 69.56% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4cc2b2c...187deea. Read the comment docs.

Copy link
Contributor

@akshbhu akshbhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

This commit updates externalAuthEnable() to include the auth
sharedId when creating an auth resource. The sharedId is given
the lowest priority in the authProps object so that it will not
overwrite any previously existing sharedId. It also uses the
sharedId from cognito-defaults for consistency. This change
prevents the creation of "snsundefined" roles.
@yuth yuth merged commit fd552b4 into aws-amplify:master May 24, 2021
@cjihrig cjihrig deleted the sharedid branch May 24, 2021 19:26
@github-actions github-actions bot added the referenced-in-release Issues referenced in a published release changelog label May 26, 2021
@github-actions
Copy link

👋 Hi, this pull request was referenced in the v4.51.3 release!

Check out the release notes here https://github.com/aws-amplify/amplify-cli/releases/tag/v4.51.3.

cjihrig added a commit to ctjlewis/amplify-cli that referenced this pull request Jul 12, 2021
This commit updates externalAuthEnable() to include the auth
sharedId when creating an auth resource. The sharedId is given
the lowest priority in the authProps object so that it will not
overwrite any previously existing sharedId. It also uses the
sharedId from cognito-defaults for consistency. This change
prevents the creation of "snsundefined" roles.


Co-authored-by: Colin Ihrig <colihrig@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
referenced-in-release Issues referenced in a published release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants