Open svanmieghem opened 5 months ago
DAB only supports System Assigned managed identities at this time. There is an issue #1944 which tracks user assigned managed identities, which utilize clientID, which also seems to apply to WIF (workload identity). That's on the backlog.
What happened?
I am able to deploy the DAB container in an AKS cluster and mount the configfile, which is loaded. Our preferred policy is to use a workload identity to authenticate with the Postgresql Flexible server database.
Connection string, via environment variable injected in dab-config.json. The client id gets replaced at deploy time via Helm:
"Host=psqlf-demo....postgres.database.azure.com;Port=5432;Database=demo;SSL Mode=Require;User Id={{.Value.serviceAccount.clientId}}"
Part of the config file:
"$schema": "https://github.com/Azure/data-api-builder/releases/download/v1.1.7/dab.draft.schema.json", "data-source": { "database-type": "postgresql", "connection-string": "@env('DATABASE_CONNECTION')" }, "runtime": { "host": { "mode": "development" }
According to source code, an Azure identity is assumed when the connection string does not contain a password. Startup fails with a 28P01: password authentication failed for
I might be missing the option to explicitly inform DAB to use Azure authentication instead of regular username/password authentication.
Version
1.1.7
What database are you using?
PostgreSQL
What hosting model are you using?
Custom Docker host
Which API approach are you accessing DAB through?
REST, GraphQL
Relevant log output
Code of Conduct