Skip to content

OIDC auth support for Azure auto-discovery#61494

Merged
Tener merged 10 commits intomasterfrom
tener/azure-oidc-discovery-auth
Nov 26, 2025
Merged

OIDC auth support for Azure auto-discovery#61494
Tener merged 10 commits intomasterfrom
tener/azure-oidc-discovery-auth

Conversation

@Tener
Copy link
Copy Markdown
Contributor

@Tener Tener commented Nov 18, 2025

WithAzureIntegrationCredentials is 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

@Tener Tener force-pushed the tener/azure-oidc-discovery-auth branch 2 times, most recently from 1dfa3b7 to 8ab5b2a Compare November 18, 2025 22:55
Base automatically changed from tener/cloud-clients-split to master November 20, 2025 08:48
@Tener Tener force-pushed the tener/azure-oidc-discovery-auth branch from 8ab5b2a to d609316 Compare November 20, 2025 09:20
@Tener Tener force-pushed the tener/azure-oidc-discovery-auth branch from f279a22 to a1e54b6 Compare November 21, 2025 13:09
@Tener Tener changed the title [wip] azure oidc auth for discovery OIDC auth support to Azure auto-discovery Nov 21, 2025
@Tener Tener marked this pull request as ready for review November 21, 2025 13:12
@github-actions github-actions bot added database-access Database access related issues and PRs discovery size/md labels Nov 21, 2025
Comment thread lib/srv/db/watcher.go
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.")
Copy link
Copy Markdown
Contributor Author

@Tener Tener Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

@greedy52 greedy52 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have we tested integration with db or kube discovery? in theory they should be fine but i think we should do some minimal testing.

Comment thread lib/cloud/clients.go
Comment thread lib/srv/discovery/discovery.go Outdated
Comment thread lib/srv/server/azure_watcher.go
Comment thread lib/srv/discovery/fetchers/db/db.go
@Tener
Copy link
Copy Markdown
Contributor Author

Tener commented Nov 25, 2025

have we tested integration with db or kube discovery? in theory they should be fine but i think we should do some minimal testing.

Not yet, but I do have plans in that direction, even though technically the requirements in #60815 only demand VM discovery to work.

@greedy52
Copy link
Copy Markdown
Contributor

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.

Comment thread lib/cloud/clients.go
@Tener Tener enabled auto-merge November 26, 2025 11:29
@Tener
Copy link
Copy Markdown
Contributor Author

Tener commented Nov 26, 2025

@r0mant this PR needs excludeflake as well, can you provide one?

@r0mant
Copy link
Copy Markdown
Collaborator

r0mant commented Nov 26, 2025

/excludeflake *

@Tener Tener added this pull request to the merge queue Nov 26, 2025
Merged via the queue into master with commit 9b888a3 Nov 26, 2025
42 of 43 checks passed
@Tener Tener deleted the tener/azure-oidc-discovery-auth branch November 26, 2025 17:42
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@Tener See the table below for backport results.

Branch Result
branch/v18 Failed

Tener added a commit that referenced this pull request Nov 27, 2025
* 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
@Tener Tener changed the title OIDC auth support to Azure auto-discovery OIDC auth support for Azure auto-discovery Nov 27, 2025
cthach pushed a commit that referenced this pull request Dec 1, 2025
* 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
github-merge-queue bot pushed a commit that referenced this pull request Dec 2, 2025
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add OIDC auth support to Azure auto-discovery

5 participants