Skip to content

fix: allow disabling Key Vault auth challenge resource verification - #2047

Open
cizji wants to merge 1 commit into
Azure:masterfrom
cizji:fix/disable-challenge-resource-verification
Open

fix: allow disabling Key Vault auth challenge resource verification#2047
cizji wants to merge 1 commit into
Azure:masterfrom
cizji:fix/disable-challenge-resource-verification

Conversation

@cizji

@cizji cizji commented Jul 9, 2026

Copy link
Copy Markdown

Summary

  • Fixes csi-secrets-store-provider-azure not working in azure stack hub #2044. Newer versions of the Key Vault SDK clients (azsecrets/azkeys/azcertificates) validate that the authentication challenge resource returned by Key Vault/Managed HSM matches the vault's domain. This provider constructed those clients with nil ClientOptions, so there was no way to set DisableChallengeResourceVerification, breaking mounts on some non-standard vault URIs (e.g. certain Azure Stack Hub deployments) with:
    challenge resource "..." doesn't match the requested domain. Set DisableChallengeResourceVerification to true in your client options to disable.
    
  • Adds a new disableChallengeResourceVerification SecretProviderClass parameter (default "false", matching prior behavior) that is threaded through provider.go -> mountConfig -> keyvault.NewClient, which now sets DisableChallengeResourceVerification in the ClientOptions of all three Key Vault clients.
  • Documents the new parameter in the usage guide and in the custom/Azure Stack Hub environments guide.

Test plan

  • go build ./...
  • go test ./pkg/provider/... (two pre-existing, Windows-path-related test failures unrelated to this change, verified to also fail on master without this diff)
  • Added TestGetDisableChallengeResourceVerification unit test covering true/false/empty/invalid values

The Key Vault SDK clients (azsecrets/azkeys/azcertificates) were
constructed with nil ClientOptions, so there was no way to set
DisableChallengeResourceVerification. On non-standard vault URIs
(e.g. some Azure Stack Hub deployments), the SDK's challenge resource
check can fail mounts with:

  challenge resource "..." doesn't match the requested domain.
  Set DisableChallengeResourceVerification to true in your client
  options to disable.

Add a disableChallengeResourceVerification SecretProviderClass
parameter that is threaded through to each Key Vault client's
ClientOptions.

Fixes Azure#2044
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@cizji

cizji commented Jul 19, 2026

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@guich59

guich59 commented Jul 26, 2026

Copy link
Copy Markdown

Please up Anish Ramasekar (@aramase) or Mo Khan (@enj) to make this working with azure stack hub

@Cyr-Az

Cyr-Az commented Aug 3, 2026

Copy link
Copy Markdown

Anish Ramasekar (@aramase) Mo Khan (@enj) This fix is needed on our side as well, could you please review it? Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

csi-secrets-store-provider-azure not working in azure stack hub

3 participants