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
Support for dynamic groups subscriptions with @auth 2.0 #389
Comments
@undefobj There you go, separate issue. |
@yuth thanks for taking a look at this. Mind keeping us in the loop as you discuss this with the team? Happens to be a sensitive time for us with this being a critical requirement. Thank you! |
@undefobj any update on this issue? We are evaluating AWS Amplify + AppSync, but having subscriptions w/o dynamic group filtering is a no go for us 😞 |
Same for us, I was very interested in Datastore + Appsync to migrate our app, is there any chance that it will be supported before the end of the year ? |
I'm experiencing the same issue. Without dynamic groups subscriptions, It's useless for our use case |
Same here |
Same |
2 similar comments
Same |
Same |
From my experimentation, it seems that if you need to use dynamic group @auth, you can't use DataStore at all, right? Because DataStore simply fails to initialize if it doesn't have permission to all the subscriptions. Makes all this a tough sell. :( |
@pmclachlan - this is a huge thing to get confirmed. I'm finding with DataStore its 1 step forward then 2 steps back as you try to get it working. Couldn't support types without @model - couldn't co-exist with ElasticSearch (@searchable) to name but two. Those have now been addressed, but still not sure its all there yet. Thanks for posting this warning. DataStore really does need to work as we need offline search - but if dynamic group @auth is not there I agree with you that it would kill it. |
I was asking about this issue on Amplify's chat and
Link to chat message: https://discord.com/channels/705853757799399426/707328986077855836/717886780535472188 |
Hi @lucido-apps - thanks for posting this. Given all the grief that Dynamic Groups causes Subscriptions & Data Store sounds like need to look at another approach. Hope this doesn't sound like too much of a dumb question, but is anyone able to provide any more input/references on this last line in the statement? Would seem like the @auth is of extremely limited use and everything should happen on the client. Is that a fair statement? "That being said almost all systems do runtime filtering at clients and AuthZ happens on connections just like this since it's the most scalable solution." |
Here's an example app demonstrating this issue (uses only AppSync, not DataStore): https://github.com/lucido-apps/appsync-dynamic-groups-subscribe And a video: https://youtu.be/O7rofaqRdaU Hopefully this is useful for troubleshooting! |
@rawadrifai How could the alternative (workaround) you mentioned above be implemented? Do you have an example of this by any chance?
Changing owner field to an array doesn't make subscriptions work for me for tasks shared by multiple users. Moreover, even same-owner subscriptions stop working when I set the owner field to an array... |
Am I confused? This doesn't even seem like a viable solution for any application that needs a modicum of privacy and security. |
Has there been any progress with this? Dynamic groups are required for a planned feature and we won't be able to progress without this |
It would be great if Datastore starts supporting Dynamic groups. Is there any update on this feature? Or is this feature never going to be there? |
Second that notion. We are blocked on implementing multi-tenancy from this, which majorly impacts our business. Would love to see support for this, or at the least an expected timeline for implementation. |
@fitform-devs @maheshmogal @PS-MS Looks like this may be solved with latest updates: https://aws.amazon.com/blogs/mobile/appsync-enhanced-filtering/
|
Hello everyone - as mentioned above we have been working across the AppSync and Amplify teams for the past couple years to design a scalable solution which was just released in AppSync yesterday. You can read the blog above for more information. We'll be working in the coming weeks/months to integration these new features into Amplify CLI and libraries as well to complete these functional requests. |
Hi @undefobj - thanks for the feedback. Will this new capability help for filtering of the deltaSync table (aws-amplify/amplify-js#9776) which is a similar problem? |
Great news! Hoping very much for weeks instead of month 🤞🤞😬 Keep it up! |
Hi. Any updates to this feature implementation? Thanks. |
So it's been some years now. Any updates on this issue? |
Dynamic group auth is supported for subscriptions now in GraphQL transformer V2. Refer the blog for more details. |
Any updates on support in DataStore? |
Is your feature request related to a problem? Please describe.
This related to https://github.com/aws-amplify/amplify-cli/issues/1043
Subscriptions auth is not sophisticated enough to support a generic use case, a messenger like Slack. The reason is lack of support for Dynamic groups in the 2.0 update for the cli.
Take a very simple use case. A user inserts a message record in the messages table. The message is directed at a channel. The members of the channel are dynamic and may change anytime. Subscriptions should be aware of who belongs in the channel.
Static groups cannot possibly support a use case like this. Every message comes with different permissions, depending whether it's a channel message, a conversation, a group conversation, etc. I tried to design it with static groups, it's just impossible.
Describe the solution you'd like
Subscriptions should support dynamic groups.
For the developer it should be as simple as:
If there is no filter, it sends events for all messages that the user subscribing is authorized to see. Mimic what is done for queries. Same behavior. *** If I can read it, I should get an event. ***
If a filter is provided, it applies additional filtering on an attribute provided in the filter.
Describe alternatives you've considered
I am considering using the owner field instead with an array of strings. So every message would contain all of the users that are authorized to see it. That is of course very inefficient but it's the only thing possible today.
Additional context
I think Amplify will render itself unusable if dynamic groups are not support by subscriptions auth. We are trying to push for the best for the framework. We are too deep in it now to change frameworks, so we hope you would support this as soon as possible.
The text was updated successfully, but these errors were encountered: