Skip to content

secrets/azurekeyvault: add a way to use az CLI auth; provide a better resource default#2463

Merged
vangent merged 2 commits into
google:masterfrom
vangent:azurekeyvault
Jul 3, 2019
Merged

secrets/azurekeyvault: add a way to use az CLI auth; provide a better resource default#2463
vangent merged 2 commits into
google:masterfrom
vangent:azurekeyvault

Conversation

@vangent

@vangent vangent commented Jul 3, 2019

Copy link
Copy Markdown
Contributor

Fixes #2462.

  1. If you set AZURE_KEYVAULT_AUTH_VIA_CLI to a truthy value, the default URLOpener will now get authorization from the az CLI instead of from the environment (there are 2 different functions in the Azure auth library for this). We also expose both forms via the existing Dial and a new DialUsingCLIAuth.

  2. If you provide a AZURE_AD_RESOURCE, we use it, but if you don't, we use https://vault.azure.net. The Azure auth library defaults it to the "management" resource, which is wrong for KeyVault.

  3. Fixed a bug in URL parsing where the URL was parsed incorrectly if the version was included.

@vangent vangent requested a review from shantuo July 3, 2019 18:47
@googlebot googlebot added the cla: yes Google CLA has been signed! label Jul 3, 2019
Comment thread secrets/azurekeyvault/akv.go
@codecov

codecov Bot commented Jul 3, 2019

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (master@93e40be). Click here to learn what that means.
The diff coverage is 58.33%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2463   +/-   ##
=========================================
  Coverage          ?   70.38%           
=========================================
  Files             ?      118           
  Lines             ?    13611           
  Branches          ?        0           
=========================================
  Hits              ?     9580           
  Misses            ?     3366           
  Partials          ?      665
Impacted Files Coverage Δ
internal/cmd/gocdk/internal/static/vfsdata.go 84.94% <100%> (ø)
secrets/azurekeyvault/akv.go 77.27% <56.52%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93e40be...4c4548d. Read the comment docs.

@vangent vangent merged commit 7ecd7e8 into google:master Jul 3, 2019
@vangent vangent deleted the azurekeyvault branch July 3, 2019 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Google CLA has been signed!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

secrets/azurekeyvault: add a way to use CLI auth

3 participants