-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[DataStore] Detected multiple owner type auth rules with a READ operation #10001
Comments
Hey @Simon-PumpAndUp 👋 thanks for raising this! Since this is a DataStore-related issue I'm going to transfer this over to our amplify-js repo for better assistance 🙂 |
@Simon-PumpAndUp Hey! thanks for raising this issue. For this use case, we'd recommend using a Cognito User Group authorization rule to restrict access/permissions to different types of users. If you're trying to limit permissions for a sole owner of a record, you can set the For more information, please refer to our docs: https://docs.amplify.aws/cli/graphql/authorization-rules/#user-group-based-data-access |
This limitation has been going on for a while (more than a year). Any idea when it will be resolved? |
This is such a huge risk, what if your messages can be read by people who find vulnerability? |
Hey @NiksanJP, can you elaborate please? My use case is about having two or more people having a same record sync to their datastore. |
@Simon-PumpAndUp So I went through a few tutorials on how we can share collection using ownerfield for DataStore. I have seen countless times where owner checks has been done at the front like if |
@NiksanJP Thx for having a look on this mate! I ended up with the same conclusions and used AppSync subscriptions to solve this. |
Before opening, please confirm:
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
No response
Amplify CLI Version
8.5.1
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made
Amplify Categories
api
Amplify Commands
Not applicable
Describe the bug
Having two owner auth rules like so:
doesn't work :
DataStoreException{message=Error during subscription., cause=ApiAuthException{message=Detected multiple owner type auth rules with a READ operation, cause=null, recoverySuggestion=We currently do not support this use case. Please limit your type to just one owner auth rule with a READ operation restriction.}, recoverySuggestion=Evaluate details.}
There are open issue for ios, I didn't open it for flutter but here instead.
aws-amplify/amplify-swift#1780
aws-amplify/amplify-cli#10110
Expected behavior
AppSync should automatically sync down the entities where user is one of the owners.
Reproduction steps
See bug
GraphQL schema(s)
# Put schemas below this line
Log output
Additional information
No response
The text was updated successfully, but these errors were encountered: