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

Server side authorization for EDFS #774

Open
xwrs opened this issue May 9, 2024 · 3 comments
Open

Server side authorization for EDFS #774

xwrs opened this issue May 9, 2024 · 3 comments
Labels
enhancement New feature or request internally-reviewed The issue has been reviewed internally.

Comments

@xwrs
Copy link

xwrs commented May 9, 2024

Component(s)

router

Is your feature request related to a problem? Please describe.

EDFS is a fantastic approach to rethink subscriptions and mitigate it’s flaws. I am struggling now to implement contextual subscription meaning:
subscribe to a certain subset of resources BUT subset is defined by context. namely authorization context of a user. let’s say I am a member of a user group and I subscribe to all changes to documents of my user group.
so essentially I have to pass array of my user’s groups as a topic identifying value. two options here: pass my user groups as claim in token but the token can be too large so essentially it is impossible; second option is to pull the context of the user on subscription and basically check if user has access to user groups.

Describe the solution you'd like

not sure. maybe allow to validate user input somehow and check if topic user subscribed to has access to this topic by the authorization rules.
maybe some (web) hook which will be triggered by router for each request for subscription and enrich user input with some context

Describe alternatives you've considered

living without EDFS

Additional context

No response

@xwrs xwrs added the enhancement New feature or request label May 9, 2024
Copy link

github-actions bot commented May 9, 2024

WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible.
The roadmap is driven by our customers and we have to prioritize issues that are important to them.
You can influence the priority by becoming a customer. Please contact us here.

@Aenimus
Copy link
Member

Aenimus commented May 9, 2024

HI @xwrs,

Incorporating claims into EDFS is on our roadmap. I believe this is exactly what you're looking for. Please stay tuned.

@xwrs
Copy link
Author

xwrs commented May 10, 2024

the idea I have in mind
image

I am going to try and add support for this kind of opinionated middlewares to router

@StarpTech StarpTech added the internally-reviewed The issue has been reviewed internally. label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internally-reviewed The issue has been reviewed internally.
Projects
None yet
Development

No branches or pull requests

3 participants