-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
gRPC: Enable per-service interceptor registration #19229
Comments
/cc @cescoffier |
@mkouba WDYT? |
Sounds good. But introducing the |
I don't like the names though... how about |
AFAIR, gRPC doesn't allow per-service-method. |
You can create a new stub via
-1 We already broke some stuff in the recent versions of the grpc extension.. |
JAX-RS has |
and look how much better UX of Quarkus gRPC is now :) We could have a switch to keep auto-registration. But annotation to disable global registration doesn't sound nice to me. |
Do you mean |
oh, you are right. However, there registering global filters is opt-in, you need to add |
+100 :-)
It's definitely not nice...
Maybe we could detect interceptors that are NOT used on any service and are NOT annotated with |
BTW we could reuse the |
I like this idea. I think I'd leave it a warning though so that people who add dependencies with grpc interceptors (that are not used) don't end up with failing builds. Re |
+1
It could still implement |
Description
ATM we can only register server interceptors globally.
We do that by creating a CDI bean that implements
ServerInterceptor
.I can imagine that someone may e.g. want to have one of the service secured and another one publicly available.
And interceptors are a good fit for security in gRPC.
Implementation ideas
I think this would mean that we have to introduce two annotations.
One for global interceptors, so it would be sth like:
And another one for per-service interceptors:
The text was updated successfully, but these errors were encountered: