amplify-category-api icon indicating copy to clipboard operation
amplify-category-api copied to clipboard

fix: redact relational field in mutation & subscription based on model auth rules

Open AaronZyLee opened this issue 1 year ago • 0 comments

Description of changes

The relational field is redacted in mutation result and subsequent subscription from another client based on the comparison result of

  • Read role definitions for relational field
  • Read role definitions for the related model

The comparison will occur if the relational field is not protected by any field level auth rules (as the field is redacted when field level auth is added currently). The field redaction will only happen when the model subscription level is on in either case

CDK / CloudFormation Parameters Changed

Issue #, if available

Description of how you validated changes

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
  • [ ] Any CDK or CloudFormation parameter changes are called out explicitly

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

AaronZyLee avatar May 08 '24 19:05 AaronZyLee