Azure-Samples / Azure-Samples/azure-sdk-for-go-samples
The MSI endpoint is not available
- Dominant language
- Go
- Stars
- 308
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
## This issue is a: (mark with an `x`)
- [x] bug report
- [ ] request for new sample
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
## Steps to reproduce:
1. Ran code as provided setting environment variables as requested.
## Errors and log messages:
Listing secret names in keyvault:
unable to get list of secrets: azure.BearerAuthorizer#WithAuthorization: Failed to refresh the Token for request to https://****.vault.azure.net/secrets?api-version=2016-10-01: StatusCode=0 -- Original Error: the MSI endpoint is not available
exit status 1
## Expected behavior:
Secrets listed
## OS and Go versions:
OS = macOSx 10.15.6
Go = go version go1.14.2 darwin/amd64
## Further info:
I've tested with both a Managed System Identity and a User Managed Identity for the AZURE_CLIENT_ID but neither works. I've added and verified all permissions necessary to hit the Azure KeyVault both using the KV Access Policy list as well as via the Identity's RBAC.
Contributor guide
Research direction
Start by running the provided Go sample on macOS with the reported environment variables and review the Azure Key Vault authentication path. Reproduce the MSI endpoint error for both managed identity configurations, then verify that the sample can list secret names without the token-refresh failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go
- Domain
- authentication, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100