-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Problem Statement
Hi,
We want to use Azure Workload Identity Federation to obtain access tokens that can be used with Databricks (see related discussions in #566, #737). Since this mechanism isn't implemented in the SDK, we have opted to obtain the access token manually, and pass it using the PAT authentication method (which also support OAuth access tokens).
This setup works great—except for a few specific endpoints, which require additional proprietary headers. If only the SDK allowed us to configure headers directly, we would not be locked into using one of the existing config implementations that append these headers.
Proposed Solution
I propose adding a configuration option to pass additional arbitrary headers to the HTTP client. This gives "advanced" users freedom to configure the client as they wish, and it future-proofs the SDK since newer features relying on headers can be used before they are natively implemented. If not specified, it has no effect.
Basically, I would like to see this:
type Config struct {
...
Headers map[string]string `name:"headers" env:"HEADERS" auth:"sensitive"`
}Which are then appended to the ApiClient.
Additional Context
N/A