GraphQL subscription with security context awareness #1072
Replies: 4 comments 1 reply
-
Hi @mswiderski ! I assume this is in Quarkus ? We still have quarkusio/quarkus#20092 on our TODO list, just need to find time to look at this. I would need some help from @sberyozkin on how this should be handled. |
Beta Was this translation helpful? Give feedback.
-
correct, it is on Quarkus good to hear it's on the list :) |
Beta Was this translation helpful? Give feedback.
-
so the linked quarkus issue is partially related and then the remains part is how to gain access to that security context info to do custom filtering via the |
Beta Was this translation helpful? Give feedback.
-
just some heads up that I managed to make it work for the use case I have. It was by extending Works well for what I needed. If you ask me what might be improved to make it easier - allowing to extend |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am working on a use case where GraphQL subscriptions should be security context aware. What I mean by that is when clients subscribe to given GraphQL subscription all events sent through that subscription should be filtered by the security context of the caller.
For example if I have two clients
client A
andclient B
where first one is member ofmanagers
and the other is member ofemployees
and they both subscribe to GraphQL subscriptionnews
I would like to make sure that events onnews
are filtered based on membership of the caller. So when there are news restricted tomanagers
I would like to make sure that onlyclient A
will get those and notclient B
.I looked at the
BroadcastProcessor
class that has the subscriptions but there is no way to do any filtering on it.So the question, is there anyway to make this happen? Does the subscription have any security context available on it?
Any and all feedback more than welcome :)
Beta Was this translation helpful? Give feedback.
All reactions