C++ Interceptor for authorization

52 views
Skip to first unread message

Aleksandr Yeganov

unread,
Sep 29, 2020, 2:03:21 PM9/29/20
to grpc.io
I have a fairly simple use case - check the headers of an incoming RPC call for a special string indicating authorization to use the service. Currently I am experimenting based off of this example https://github.com/grpc/grpc/blob/7bf82de9eda0aa8fecfe5edb33834f1b272be30b/test/cpp/end2end/server_interceptors_end2end_test.cc. Specifically the `LoggerInterceptor` example. The happy path involves calling `Proceed` on the `InterceptorBatchMethods`, but `Hijack` kills the program.

My main question is how do I `fail` the connection when the authorization is not present?

Sincerely,
Aleks

yas...@google.com

unread,
Sep 30, 2020, 7:40:40 PM9/30/20
to grpc.io
We've had a similar request/question in https://github.com/grpc/grpc/issues/24017
Reply all
Reply to author
Forward
0 new messages