wapacro / az-keyvault-php

Library to easily work with Azure Key Vault using managed identities
https://packagist.org/packages/wapacro/az-keyvault-php
MIT License
18 stars 15 forks source link

Support ACI #15

Closed georgeboot closed 1 year ago

georgeboot commented 2 years ago

When running inside an Azure Container Instance, IDENTITY_ENDPOINT is NOT present, but IDENTITY_HEADER header is.

Strangely, Azure still expects Metadata=true. I can't find any documentation supporting this, but it was found using trial and error.

This PR adds functionality to decide whether to use X-IDENTITY-HEADER or Metadata, based on the presence of the IDENTITY_ENDPOINT variable. This should work for both regular cases, VM's and ACI's.