Azure Government keyvault integration Authentication errors
#8,329 opened on Oct 6, 2020
Repository metrics
- Stars
- (13,071 stars)
- PR merge metrics
- (Avg merge 24d 6h) (30 merged PRs in 30d)
Description
ISSUE TYPE
- Bug Report
SUMMARY
Azure Keyvault lookup plugin not working for Azure Government. Vague "Authentication Error" popup with no details or log.
The azure keyvault credentials plugin found here: awx/awx/main/credential_plugins/azure_kv.py
ENVIRONMENT
- AWX version: 14.1.0
- AWX install method: docker on linux
- Ansible version: 2.9.11
- Operating System: RHEL 7.7
- Web Browser: Chrome
STEPS TO REPRODUCE
Create Microsoft Azure Key Vault credential type. Populate details with Azure Government Keyvault and Application registration Select Cloud Environment "AzureGovernment" Save credential Click Test, Enter Valid Secrete name
EXPECTED RESULTS
Microsoft Azure Keyvault:Test Passed!
ACTUAL RESULTS
Red Error message Microsoft Azure Keyvault: Authentication Error
ADDITIONAL INFORMATION
This issue is related to Feature Idea #5138 I had previously submitted. I was unable to validate functionality before that issues was closed.
I think the this is failing because the ServicePrincipalCredentials method does not contain cloud_environment=azure_cloud.AZURE_US_GOV_CLOUD
Or because the KeyVaultClient method is not given the base_url for the government API endpoint.
On https://docs.microsoft.com/en-us/azure/developer/python/azure-sdk-authenticate?tabs=cmd
there is a section on Azure Sovereign or national Cloud logons.