How to handle security (authn/authz) with DGS Subscriptions and spring security ? #1644
Unanswered
lthoulon-locala
asked this question in
Q&A
Replies: 1 comment
-
This may be an interesting resource regarding this subject: #1442 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I've been struggling all day trying to make DGS subscriptions work with spring security.
I'm up to the point where if I
authorize("/subscriptions",permitAll)
while configuring mySecurityWebFilterChain
then everything is working.Now I need to make sur that the user is properly authenticated and authorized. I use ReactiveMetodSecurity with
@PreAuthorize("hasAuthority('read')")
orhasPermission(#id, 'entity', 'read:restricted')
directly on the@DgsSubscription
method.I'm not sure how I should be handling this here as my understanding is that I get the token on the
connection_init
message.My understanding is that permitting the
/subscriptions
endpoint is mandatory but that I need to do something more afterwards.Do you have any documentation or pointers on the matter ?
Thanks you.
Beta Was this translation helpful? Give feedback.
All reactions