We run a Dolt remotesapi endpoint behind an identity-aware proxy. Both layers require authentication:
- The proxy expects a short-lived bearer token in
Proxy-Authorization.
- Dolt expects its normal credentials in
Authorization.
Native gRPC over HTTPS works here. The problem is that the Dolt client has no supported way to attach the second header while preserving its own authentication.
Our current workaround is a local HTTP/2 proxy that obtains and refreshes the identity token, injects Proxy-Authorization, and forwards the gRPC stream unchanged. It works, but adds another process and more operational complexity.
Would the maintainers be open to a credential-helper mechanism for additional gRPC metadata? For example, Dolt could invoke a configured command that returns headers and an expiration time, then refresh them when necessary. Dolt would continue managing its own Authorization header.
Important properties would be:
- Scoped to a specific remote
- Works for unary and streaming RPCs
- Supports expiring credentials
- Does not persist or log returned values
- Cannot accidentally override Dolt's own authentication
A static --header option would help some cases, but would not be sufficient for short-lived tokens.
I'm happy to draft a PR once we agree on the configuration and credential-provider shape. Is PerRPCCredentials the right extension point, or is there an existing mechanism I've missed?
I don't want to just throw up some AI slop without checking first :)
We run a Dolt
remotesapiendpoint behind an identity-aware proxy. Both layers require authentication:Proxy-Authorization.Authorization.Native gRPC over HTTPS works here. The problem is that the Dolt client has no supported way to attach the second header while preserving its own authentication.
Our current workaround is a local HTTP/2 proxy that obtains and refreshes the identity token, injects
Proxy-Authorization, and forwards the gRPC stream unchanged. It works, but adds another process and more operational complexity.Would the maintainers be open to a credential-helper mechanism for additional gRPC metadata? For example, Dolt could invoke a configured command that returns headers and an expiration time, then refresh them when necessary. Dolt would continue managing its own
Authorizationheader.Important properties would be:
A static
--headeroption would help some cases, but would not be sufficient for short-lived tokens.I'm happy to draft a PR once we agree on the configuration and credential-provider shape. Is
PerRPCCredentialsthe right extension point, or is there an existing mechanism I've missed?I don't want to just throw up some AI slop without checking first :)