User Tools

Site Tools


postgresqlflexible

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
postgresqlflexible [2025/03/26 14:32] z0hpvkpostgresqlflexible [2025/03/26 14:58] (current) z0hpvk
Line 1: Line 1:
-==== Entra ID Authentication ====+===== Entra ID Authentication ===== 
 +[[https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-manage-azure-ad-users]] 
 +==== Logon ====
  
 <code powershell> <code powershell>
Line 8: Line 10:
 </code> </code>
  
 +==== Administration ====
 <code postgresql> <code postgresql>
--- Display existing Entra principals+-- Display all existing Entra principals
 select * from pg_catalog.pgaadauth_list_principals(false); select * from pg_catalog.pgaadauth_list_principals(false);
  
--- Add Entra principal to the server+-- Add Entra principal to the server, "roleNamemust match the name of an existing Entra principal
--- roleName must match the name of an existing Entra principal+
 select * from pg_catalog.pgaadauth_create_principal(roleName text, isAdmin boolean, isMfa boolean) select * from pg_catalog.pgaadauth_create_principal(roleName text, isAdmin boolean, isMfa boolean)
 select * from pg_catalog.pgaadauth_create_principal('postgres_users', false, false) select * from pg_catalog.pgaadauth_create_principal('postgres_users', false, false)
 </code> </code>
  
 +<code postgresql>
 +-- Enable Microsoft Entra authentication for an existing PostgreSQL role
 +SECURITY LABEL for "pgaadauth" on role "postgres_admin" is 'aadauth,oid=<objectId>,type=<objectType>,admin';
 +</code>
postgresqlflexible.1742999573.txt.gz · Last modified: 2025/03/26 14:32 by z0hpvk