-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 plugin framework does not respect --query.bearer-token-propagation flag #1821
Comments
Out of curiosity, which storage backend are you using via grpc plugin that requires bearer token? |
At Klarrio, we are using Jaeger for multi-tenant KPN Data Services Hub. Here's a talk from Kafka Summit London: https://www.confluent.io/kafka-summit-lon19/talking-traffic-data-in-the-drivers-seat. |
@radekg we (@jpkrohling ) would like to follow up on the multitenancy and ES storage. Feel free to ping me on IRC or via email or just comment here. Is the plugin published somewhere? |
done in #1822 |
Requirement - what kind of business use case are you trying to solve?
I am trying to run elastic search storage back end via GRPC plugin and have the bearer token forwarded to the GRPC plugin server.
Problem - what in Jaeger blocks you from solving the requirement?
Query UI has an option to forward Bearer token to the storage back end using
--query.bearer-token-propagation=true
flag. However, when using the GRPC storage plugin, the context created withspanstore.ContextWithBearerToken(ctx, token)
in https:/jaegertracing/jaeger/blob/master/cmd/query/app/token_propagation_handler.go#L48 is not passed to the GRPC plugin.Currently, the last place in the storage where the context with the
bearer.token
can be reached, is the GRPC client: https:/jaegertracing/jaeger/blob/master/plugin/storage/grpc/shared/grpc_client.go.This can be tested by adding these lines of code:
to any of the following methods:
func (c *grpcClient) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error)
func (c *grpcClient) GetServices(ctx context.Context) ([]string, error)
func (c *grpcClient) GetOperations(ctx context.Context, service string) ([]string, error)
func (c *grpcClient) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error)
func (c *grpcClient) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error)
However, on the server part of the plugin, the context is a new instance because the plugin is running as a separate process.
Proposal - what do you suggest to solve the problem or improve the existing situation?
To fix this problem, the bearer token has to be passed inside of the GRPC requests to the GRPC server and the
ContextWithBearerToken
must be reconstructed on the other side.The text was updated successfully, but these errors were encountered: