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

feat: allow optional idp arg into auth to allow provided auth role or authenticated identity #8609

Merged
merged 1 commit into from Nov 2, 2021

Conversation

SwaySway
Copy link
Contributor

@SwaySway SwaySway commented Nov 1, 2021

Description of changes

  • allow optional identity pool to be passed into auth transformer
    • this supports iam auth backed by a cognito identity pool (through amplify cli) this keeps all other authenticated identities with different arns to still be constricted to the same rules as private.
  • updated unit and e2e

Description of how you validated changes

  • unit test
  • local testing
  • e2e

Checklist

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

@codecov-commenter
Copy link

codecov-commenter commented Nov 1, 2021

Codecov Report

Merging #8609 (fac79fd) into master (4adb237) will increase coverage by 0.03%.
The diff coverage is 78.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8609      +/-   ##
==========================================
+ Coverage   57.14%   57.18%   +0.03%     
==========================================
  Files         728      728              
  Lines       41195    41219      +24     
  Branches     8444     8449       +5     
==========================================
+ Hits        23542    23572      +30     
+ Misses      16841    16835       -6     
  Partials      812      812              
Impacted Files Coverage Δ
...-graphql-auth-transformer/src/utils/definitions.ts 100.00% <ø> (ø)
...awscloudformation/src/graphql-transformer/utils.ts 32.60% <28.57%> (-0.36%) ⬇️
...fy-graphql-auth-transformer/src/resolvers/query.ts 59.18% <50.00%> (ø)
...rc/graphql-transformer/transform-graphql-schema.ts 15.89% <50.00%> (-0.07%) ⬇️
...-auth-transformer/src/resolvers/mutation.update.ts 84.61% <80.00%> (-0.72%) ⬇️
...-auth-transformer/src/resolvers/mutation.create.ts 84.61% <83.33%> (-0.72%) ⬇️
...-auth-transformer/src/resolvers/mutation.delete.ts 88.23% <83.33%> (-1.00%) ⬇️
...y-graphql-auth-transformer/src/resolvers/search.ts 69.79% <83.33%> (-0.11%) ⬇️
...l-auth-transformer/src/graphql-auth-transformer.ts 88.30% <100.00%> (+2.92%) ⬆️
...fy-graphql-auth-transformer/src/resolvers/field.ts 73.91% <100.00%> (ø)
... and 4 more

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 4adb237...fac79fd. Read the comment docs.

@SwaySway SwaySway marked this pull request as ready for review November 1, 2021 21:52
@SwaySway SwaySway requested a review from a team as a code owner November 1, 2021 21:52
@@ -650,6 +682,18 @@ test(`Test 'private' provider: 'iam' authStrategy`, async () => {
},
}),
).rejects.toThrow('Network error: Response not successful: Received status code 401');

// we expect the custom group client to fail even if their signed in they'll still recieve a 401
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// we expect the custom group client to fail even if their signed in they'll still recieve a 401
// we expect the custom group client to fail even if they're signed in they'll still receive a 401

@yuth yuth merged commit bf843b9 into aws-amplify:master Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants