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

Add support for Reactive Spring Security #247

Open
pluttrell opened this issue Jun 28, 2019 · 6 comments
Open

Add support for Reactive Spring Security #247

pluttrell opened this issue Jun 28, 2019 · 6 comments
Labels
enhancement A feature request or improvement help wanted Requesting external help
Milestone

Comments

@pluttrell
Copy link

The AuthenticatingServerInterceptor uses the SecurityContextHolder.getContext().setAuthentication(authentication) which won't work for Reactive Spring Security. We believe that ReactiveSecurityContextHolder should be used instead as shown in this example.

Perhaps one option might be to place the Authentication instance in the gRPC Context only and then when needed in the Reactive context, extract it and place it in the Reactive SubscriberContext.

It'd also be great to have an example of how to set this up.

@ST-DDT
Copy link
Collaborator

ST-DDT commented Jun 29, 2019

What would be the best way to detect that reactive spring security is enabled?
Is it possible that both the normal and reactive spring security are used in the same application?

@ST-DDT ST-DDT added enhancement A feature request or improvement help wanted Requesting external help labels Jun 29, 2019
@pluttrell
Copy link
Author

pluttrell commented Jun 29, 2019

I'm not sure what the best way to detect it would be. Spring's starter might provide some clues. Perhaps the presence of an org.springframework.security.authentication.ReactiveAuthenticationManager?

Regarding having both, I believe that would be considered an error. Reactive apps need to be entirely non-blocking because if some blocking code gets executed it'll block the cores from doing other work and likely drastically impact performance. So if an app is Reactive, it must be entirely Reactive.

@ST-DDT
Copy link
Collaborator

ST-DDT commented Jul 19, 2019

Any luck with this yet?

@nickjn92
Copy link

Bump

@ST-DDT
Copy link
Collaborator

ST-DDT commented Mar 22, 2020

Can someone create a sample project that uses reactive grpc and already uses reactive-web-security (e.g. fixed basic auth credentials)?
Then I will use it to create the reactive grpc-security part.

@ST-DDT ST-DDT added this to the Future milestone Jun 13, 2020
@iosif-bancioiu
Copy link

iosif-bancioiu commented Mar 1, 2024

@pluttrell @ST-DDT

Hi, are there any updates on this topic? I'm interested as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature request or improvement help wanted Requesting external help
Projects
None yet
Development

No branches or pull requests

4 participants