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
Here is an example list of steps in order to add an Entra group with a database schema select grant. While some are achievable using tools like terraform or bicep, it feels like Azure could make this process more accessible and automated. Additionally, the existence of functions like pgaadauth_create_principal only in the cloud, makes the automation testing more difficult.
In Azure Portal, Azure Database for PostgreSQL flexible server | Databases create test database
In Azure Portal, Azure Database for PostgreSQL flexible server | Authentication | Add Microsoft Entra Admins create MyAdAdmin user, using an existing MyAdAdmin AAD group
Workload has a WorkloadIdentity along with the Federated Credential
Workload can then gain access to the database based on the WorkloadIdentity -> FederatedCredential -> AccessToken
I found this very confusing to get working compared to AWS Postgres IAM Authentication which provides plugins to make things easier. Alot of the documentation mentions how to use WorkloadIdentities but not in the sense of coming from AKS
In the above post, the important part, the setup of postgres users/roles and their grants is not automated in the way I'm looking for, but relies on executing sql.
You need to run the pgaaadauth_create_principal on the ‘postgres’ database of the server.
Secondly, you need to run the ‘create table’ and ‘Grant Insert’ on the test-db database.
Here is an example list of steps in order to add an Entra group with a database schema select grant. While some are achievable using tools like terraform or bicep, it feels like Azure could make this process more accessible and automated. Additionally, the existence of functions like
pgaadauth_create_principal
only in the cloud, makes the automation testing more difficult.Azure Database for PostgreSQL flexible server | Databases
createtest
databaseAzure Database for PostgreSQL flexible server | Authentication | Add Microsoft Entra Admins
createMyAdAdmin
user, using an existingMyAdAdmin
AAD grouppostgres
database usingMyAdAdmin
(due to https://github.com/MicrosoftDocs/azure-docs/issues/102693#issuecomment-1798118261)MyAdReader
user, using an existingMyAdReader
AAD groupAdmin
(notMyAdAdmin
) connect totest
databaseMyAdReader
MyAdReader
connect totest
databaseThe text was updated successfully, but these errors were encountered: