-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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: Perform authentication when gRPC server runs on the same server and root path is different than '/' #45861
gRPC: Perform authentication when gRPC server runs on the same server and root path is different than '/' #45861
Conversation
michalvavrik
commented
Jan 26, 2025
- fixes https://quarkusio.zulipchat.com/#narrow/channel/187030-users/topic/Quarkus.20gRPC.20Security.20and.20http.2Eroot.2Epath
- main router doesn't have authentication and authorization handlers, we attach them to the HTTP router, however gRPC is attached to a main router when the root path is different than '/'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
Status for workflow
|
securityHandlers = filterBuildItems | ||
.stream() | ||
.filter(filter -> filter.getPriority() == FilterBuildItem.AUTHENTICATION | ||
|| filter.getPriority() == FilterBuildItem.AUTHORIZATION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I slept on #45861 and realized that HTTP authorizer is not applied due to
quarkus/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/GrpcServerRecorder.java
Line 207 in b4287d5
} else if (ctx.get(HttpAuthenticator.class.getName()) != null) { |
Now I wonder, either drop filter.getPriority() == FilterBuildItem.AUTHORIZATION
because it is misleading or support & test & document HTTP Security policies with gRPC. I am not sure it makes sense to support HTTP Security policies with gRPC.
Apologies I didn't realize it sooner.