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: fixes sets of multiclaim owner fields with mixed identity claim types #491

Merged

Conversation

danielleadams
Copy link
Contributor

@danielleadams danielleadams commented May 27, 2022

Description of changes

While writing the e2e test to check for correct return values from owner fields that are sets and use the sub::username identity claim, there were 2 issues identified:

  • With mixed identity claims sets (ie. owner set contains both username and sub::username), the return value did not strip out the prefix (sub) and returned the full value.
  • Creating an owner set with the sub::username identity claim would return Unauthorized when passing in your own claim.

This PR fixes the 2 bugs and includes the e2e test that identified the bugs.

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies

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

@danielleadams danielleadams requested a review from a team May 27, 2022 23:10
@danielleadams danielleadams requested a review from a team as a code owner May 27, 2022 23:10
@danielleadams danielleadams changed the title Fix sets of multiclaim owner fields fix: fixes sets of multiclaim owner fields with mixed identity claim types May 27, 2022
Copy link
Contributor

@lazpavel lazpavel left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@phani-srikar phani-srikar left a comment

Choose a reason for hiding this comment

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

LGTM

@phani-srikar phani-srikar merged commit e1e46c8 into aws-amplify:main Jun 8, 2022
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

5 participants