You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Azure workload identity injects an environment variable named AZURE_FEDERATED_TOKEN_FILE and its value is the file path mounted to Pod(/var/run/secrets/azure/tokens/azure-identity-token).
This means I cannot set up the Pulumi Azure native provider to auth with Azure using the required ARM_OIDC_REQUEST_TOKEN directly.
It is a common pattern to support ARM_OIDC_TOKEN_FILE_PATH. I also find that ARM_OIDC_REQUEST_TOKEN exists in the source code.
the error is OIDC authentication was requested via useOidc/ARM_USE_OIDC but no token and/or request URL were configured. See https://www.pulumi.com/registry/packages/azure-native/installation-configuration/#credentials for more information.
the workaround is to retrieve the token from file system.
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered:
yuft
changed the title
Support using ARM_OIDC_TOKEN_FILE_PATH to Configuring OIDC
Support using ARM_OIDC_TOKEN_FILE_PATH to Configure OIDC
Jun 21, 2024
What happened?
I followed the configuration guide(https://www.pulumi.com/registry/packages/azure-native/installation-configuration/#configuration-options) to set up CI runners in AKS cluster.
Azure workload identity injects an environment variable named
AZURE_FEDERATED_TOKEN_FILE
and its value is the file path mounted to Pod(/var/run/secrets/azure/tokens/azure-identity-token).This means I cannot set up the Pulumi Azure native provider to auth with Azure using the required
ARM_OIDC_REQUEST_TOKEN
directly.It is a common pattern to support
ARM_OIDC_TOKEN_FILE_PATH
. I also find thatARM_OIDC_REQUEST_TOKEN
exists in the source code.pulumi-azure-native/provider/pkg/provider/auth.go
Line 112 in d1a2366
Example
If I set up the provider like below
the error is
OIDC authentication was requested via useOidc/ARM_USE_OIDC but no token and/or request URL were configured. See https://www.pulumi.com/registry/packages/azure-native/installation-configuration/#credentials for more information.
the workaround is to retrieve the token from file system.
Output of
pulumi about
CLI
Version 3.117.0
Go Version go1.22.3
Go Compiler gc
Host
OS darwin
Version 14.4.1
Arch arm64
Additional context
I feel there could be some code missing, but I haven't invested more time.
Terraform Azure provider supports
oidc_token_file_path
, so the issue might also apply to Pulumi Azure classic provider.https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/service_principal_oidc
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: