Share via

Allow access to Azure database for Postgres only through Active Directory

PECORARI Emanuele 6 Reputation points
2021-12-20T17:14:14.83+00:00

Hi,
is there a way to allow the access to the Azure Database for Postgres only through Active Directory Managed Identities? Today, when creating the database, an admin username and password need to be specified and this account can't be deleted even once an AD Admin access is enabled.

Thanks
Emanuele Pecorari

Azure Database for PostgreSQL
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments

3 answers

Sort by: Most helpful
  1. PECORARI Emanuele 6 Reputation points
    2021-12-22T16:01:33.917+00:00

    I tried but it's not possible:

    'ERROR: must be superuser to perform revoke login on server owner'

    Was this answer helpful?


  2. Alfredo Revilla (Personal Account) 391 Reputation points
    2021-12-21T17:55:29.47+00:00

    Hello Emanuele, after you're done disabling or removing unwanted users, try to connect to your server trough pgAdmin using the original admin, select its profile from the Login/Group roles node, right click it and select Properties, got to the Privileges tab, toggle Can login? to off and Save. That should disable it.

    Please let me know how it goes.

    Was this answer helpful?

    0 comments No comments

  3. PECORARI Emanuele 6 Reputation points
    2021-12-21T08:33:22.46+00:00

    Hi @Alfredo Revilla (Personal Account) ,
    I think my request is not clear.
    Azure Database for Postgres supports connection to the database through the Managed Identities: howto-connect-with-managed-identity

    My question is more: is it possible to allow connections to Postgres only using managed identities (disabling the server admin access with username and password)?

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.