OIDC auth support for Azure auto-discovery#61494
Conversation
1dfa3b7 to
8ab5b2a
Compare
8ab5b2a to
d609316
Compare
f279a22 to
a1e54b6
Compare
| azureFetchers, err := dbfetchers.MakeAzureFetchers(s.cfg.AzureClients, s.cfg.AzureMatchers, "" /* discovery config */) | ||
| azureFetchers, err := dbfetchers.MakeAzureFetchers(ctx, func(ctx context.Context, integration string) (cloud.AzureClients, error) { | ||
| if integration != "" { | ||
| return nil, trace.NotImplemented("db_service discovery does not support Azure OIDC authentication; use discovery_service instead.") |
There was a problem hiding this comment.
While db service accepts Azure matchers with integration field set, for consistency across different configuration layers, it is missing the required machinery to fetch integration credentials. We might want to change this in the future, but I don't think we need to right now.
Not yet, but I do have plans in that direction, even though technically the requirements in #60815 only demand VM discovery to work. |
I don't mind to drop db and kube. but if we do so, we should make the service fail when integration is specified. or we spend a day or two to do some quick testing. i can help out too. |
…lyWithT for improved error reporting
|
@r0mant this PR needs |
|
/excludeflake * |
* feat: add support for Azure OIDC integration auth for discovery service * docs: improve documentation for getAzureClients function * feat: add integration field to Azure fetcher configurations * update expected test result * update another expected test result; update said test to use EventuallyWithT for improved error reporting * lint fix
* feat: add support for Azure OIDC integration auth for discovery service * docs: improve documentation for getAzureClients function * feat: add integration field to Azure fetcher configurations * update expected test result * update another expected test result; update said test to use EventuallyWithT for improved error reporting * lint fix
* OIDC auth support to Azure auto-discovery (#61494) * feat: add support for Azure OIDC integration auth for discovery service * docs: improve documentation for getAzureClients function * feat: add integration field to Azure fetcher configurations * update expected test result * update another expected test result; update said test to use EventuallyWithT for improved error reporting * lint fix * fix import order
WithAzureIntegrationCredentialsis the key addition in this PR, adding an option to authenticate using particular integration. This is leveraged in discovery service whenever Azure matcher has the integration field set. The rest is plumbing/tests/config.Closes #60815
changelog: Added support for authenticating Azure resource discovery using Azure OIDC integrations