-
Hi, is it possible to use Azure Workload Identites to connect to Azure Database for PostgreSQL?
In general, it is possible to connect to Postgresql server using an managed identity as described here: https://learn.microsoft.com/en-us/azure/postgresql/single-server/how-to-connect-with-managed-identity. However, if I create the identity on my own (which I do not assign to the k8s node vms) I cannot get an access token. When I try to get an access token, I get the following error:
I am able to get an access token if I use the managed identity assigned to the k8s nodes. But I do not want this because that means that all pods could get an access token. But I want to give access just to a single pod. Here you find the steps to reproduce: dspace-group/simphera-reference-architecture-azure#84 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Workload Identity Federation (WIF) doesn't rely on the (169.254.169.254) IMDS, so this step isn't valid if you're using WIF. From the code perspective, as long as you're using the minimum required Azure Identity SDK version , WIF will work. |
Beta Was this translation helpful? Give feedback.
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