googleapis / googleapis/google-cloud-rust
Replace `CloudTelemetryAuthInterceptor` with a tonic connector
Open
priority: p3
type: feature request
- Dominant language
- Rust
- Stars
- 955
- Forks
- 144
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 279
Description
We use `CloudTelemetryAuthInterceptor` as an interceptor to inject the authentication headers. The interceptors are synchronous, our credentials are async. We periodically refresh the credentials in a background thread and use a `tokio::sync::watch` to bridge the sync/async gap.
We could use a custom connector to create the `Channel`:
https://docs.rs/tonic/latest/tonic/transport/struct.Endpoint.html#method.connect_with_connector
https://docs.rs/tonic/latest/tonic/transport/struct.Channel.html#method.new
In that custom connector we can add an async layer that injects the auth headers.
Contributor guide
Assessment
This issue has not been assessed yet.