feat(graphql-auth-transformer): implement owner.inGroup() AND logic authorization#3382
Open
cheruvian wants to merge 1 commit intoaws-amplify:mainfrom
Open
feat(graphql-auth-transformer): implement owner.inGroup() AND logic authorization#3382cheruvian wants to merge 1 commit intoaws-amplify:mainfrom
cheruvian wants to merge 1 commit intoaws-amplify:mainfrom
Conversation
…uthorization Add transformer support for owner-based auth rules that require group membership. When an owner rule has static groups defined, the generated VTL resolvers enforce that users must match the owner field AND be in one of the specified groups. - Add operationGroups and groupClaim to RoleDefinition for tracking AND requirements - Generate VTL that checks cognito:groups claim alongside owner validation - Support operation-specific group requirements via inGroup() - Add validation to block owner.inGroup() for SQL data sources (not supported) - Add comprehensive unit tests for owner auth with group requirements 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Add transformer support for
owner.inGroup()authorization rules that require both owner matching AND group membership. When an owner rule has static groups defined viainGroup(), the generated VTL resolvers enforce that users must match the owner field AND be a member of one of the specified groups.Key changes:
operationGroupsandgroupClaimtoRoleDefinitionfor tracking AND requirementscognito:groupsclaim alongside owner validationinGroup()owner.inGroup()for SQL data sources (not supported)CDK / CloudFormation Parameters Changed
None - this change affects VTL resolver generation only.
Issue #, if available
Closes #3381
Description of how you validated changes
yarn testpasses (4897 tests passed in auth-transformer package)Checklist
yarn testpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.