Skip to content

Connect to Azure Database for PostgreSQL using Azure Workload Identity #855

Answered by aramase
schwichti asked this question in Q&A
Discussion options

You must be logged in to vote

If you're inside the pod that is mutated by the Azure Workload Identity mutating webhook (mwh), you can run the following command to login and get an access token

az login --identity -u $AZURE_CLIENT_ID -t $AZURE_TENANT_ID --federated-token $(cat $AZURE_FEDERATED_TOKEN_FILE)
az account get-access-token --resource=<resource url> --query accessToken --output tsv

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@schwichti
Comment options

@aramase
Comment options

@schwichti
Comment options

@aramase
Comment options

Answer selected by aramase
@schwichti
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants