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

[Feature]: Implement bearer token auth interceptor #6035

Closed
frzifus opened this issue Oct 1, 2024 · 2 comments · Fixed by #6063 or #6133
Closed

[Feature]: Implement bearer token auth interceptor #6035

frzifus opened this issue Oct 1, 2024 · 2 comments · Fixed by #6063 or #6133
Labels
area/storage changelog:new-feature Change that should be called out as new feature in CHANGELOG enhancement

Comments

@frzifus
Copy link
Member

frzifus commented Oct 1, 2024

we should move upgradeContextWithBearerToken from plugin/storage/grpc/shared/grpc_client.go to be implemented as interceptor in pkg/bearertoken

Should be similar to the pkg/tenancy implementation.

Details: #6030 (comment)

@dosubot dosubot bot added area/storage changelog:new-feature Change that should be called out as new feature in CHANGELOG labels Oct 1, 2024
@yurishkuro
Copy link
Member

  1. We should use client interceptors in plugin/storage/grpc/shared/grpc_client.go, currently it extracts token manually, even though it seems like the factory does attach interceptors
plugin/storage/grpc/factory.go
136:	opts = append(opts, grpc.WithUnaryInterceptor(bearertoken.NewUnaryClientInterceptor()))
137:	opts = append(opts, grpc.WithStreamInterceptor(bearertoken.NewStreamClientInterceptor()))
  1. Another suspicious place:
plugin/metrics/prometheus/metricsstore/reader.go
25:	"github.com/jaegertracing/jaeger/pkg/bearertoken"
345:	return bearertoken.RoundTripper{
  1. Interceptor are installed in createGRPCServerLegacy but not in createGRPCServerOTEL in cmd/query/app/server.go

@yurishkuro yurishkuro reopened this Oct 25, 2024
@yurishkuro
Copy link
Member

@chahatsagarmain I re-opened as there are other places that could use interceptors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/storage changelog:new-feature Change that should be called out as new feature in CHANGELOG enhancement
Projects
None yet
2 participants