How to use MSI workload identity to authenticate to CosmosDB Cassandra
Hello,
I've provisioned a CosmosDB Cassandra instance, have it configured with private endpoint. the DB is routable/accessible.
My question is about using an MSI (either Entra ID Group or a k8s federated Workload Identity to authenticate/authorize queries against the DB, using gocql library.
It is unclear how set the password in the Authenticator struct.
If I enable CosmosDB local-authentication, then of-course I can establish a connection, but that is using static-credentials, and the rotation of these credentials poses an operationl risk.
When compared to MSI-based authN/Z which is much more secure and streamlined.
Although I've assigned both the control-plane "DocumentDB Account Contributor" and the data-plane internal data-contributor, I'm getting a 403 when trying to authenticate.
I've tried using "azidentity.NewDefaultAzureCredential(nil).GetToken().Token" as the password, but to no avail.
Anyone else facing the same issue? or something I'm missing in CosmosDB AuthN/Z design?