Skip to content

Commit fc70b1e

Browse files
authored
Merge pull request #258078 from niklarin/aad3
Adding AAD pre-requisites
2 parents c82f3d9 + ff6ba38 commit fc70b1e

File tree

2 files changed

+79
-54
lines changed

2 files changed

+79
-54
lines changed

articles/cosmos-db/postgresql/concepts-authentication.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
title: Active Directory authentication - Azure Cosmos DB for PostgreSQL
3-
description: Learn about the concepts of native PostgreSQL and Microsoft Entra authentication with Azure Cosmos DB for PostgreSQL
2+
title: PostgreSQL and Microsoft Entra ID authentication - Azure Cosmos DB for PostgreSQL
3+
description: Learn about the concepts of native PostgreSQL and Microsoft Entra ID authentication with Azure Cosmos DB for PostgreSQL
44
author: niklarin
55
ms.author: nlarin
66
ms.service: cosmos-db
77
ms.subservice: postgresql
88
ms.topic: conceptual
9-
ms.date: 09/19/2023
9+
ms.date: 11/07/2023
1010
---
1111

1212
# Microsoft Entra ID and PostgreSQL authentication with Azure Cosmos DB for PostgreSQL
1313

1414
[!INCLUDE [PostgreSQL](../includes/appliesto-postgresql.md)]
1515

1616
> [!IMPORTANT]
17-
> Microsoft Entra authentication in Azure Cosmos DB for PostgreSQL is currently in preview.
17+
> Microsoft Entra ID (formerly Azure Active Directory) authentication in Azure Cosmos DB for PostgreSQL is currently in preview.
1818
> This preview version is provided without a service level agreement, and it's not recommended
1919
> for production workloads. Certain features might not be supported or might have constrained
2020
> capabilities.
@@ -23,7 +23,7 @@ ms.date: 09/19/2023
2323
2424
Azure Cosmos DB for PostgreSQL supports PostgreSQL authentication and integration with Microsoft Entra ID. Each Azure Cosmos DB for PostgreSQL cluster is created with native PostgreSQL authentication enabled and one built-in PostgreSQL role named `citus`. You can add more native PostgreSQL roles after cluster provisioning is completed.
2525

26-
You can also enable Microsoft Entra authentication on a cluster in addition to the PostgreSQL authentication method or instead of it. You can configure authentication methods on each Azure Cosmos DB for PostgreSQL cluster independently. If you need to change authentication method, you can do it at any time after cluster provisioning is completed. Changing authentication methods doesn't require cluster restart.
26+
You can also enable Microsoft Entra ID (formerly Azure Active Directory) authentication on a cluster in addition to the PostgreSQL authentication method or instead of it. You can configure authentication methods on each Azure Cosmos DB for PostgreSQL cluster independently. If you need to change authentication method, you can do it at any time after cluster provisioning is completed. Changing authentication methods doesn't require cluster restart.
2727

2828
## PostgreSQL authentication
2929

@@ -50,7 +50,7 @@ Permissions for the `citus` role:
5050
superusers.
5151
* Read all pg\_stat\_\* views and use various statistics-related
5252
extensions--even views or extensions normally visible only to superusers.
53-
* Execute monitoring functions that may take ACCESS SHARE locks on tables,
53+
* Execute monitoring functions that might take ACCESS SHARE locks on tables,
5454
potentially for a long time.
5555
* [Create PostgreSQL extensions](reference-extensions.md).
5656

@@ -59,53 +59,53 @@ Notably, the `citus` role has some restrictions:
5959
* Can't create roles
6060
* Can't create databases
6161

62-
`citus` role can't be deleted but would be disabled if 'Microsoft Entra authentication only' authentication method is selected on cluster.
62+
`citus` role can't be deleted but would be disabled if 'Microsoft Entra ID authentication only' authentication method is selected on cluster.
6363

6464
<a name='azure-active-directory-authentication-preview'></a>
6565

66-
## Microsoft Entra authentication (preview)
66+
## Microsoft Entra ID authentication (preview)
6767

68-
[Microsoft Entra ID](./../../active-directory/fundamentals/active-directory-whatis.md) authentication is a mechanism of connecting to Azure Cosmos DB for PostgreSQL using identities defined in Microsoft Entra ID. With Microsoft Entra authentication, you can manage database user identities and other Microsoft services in a central location, which simplifies permission management.
68+
[Microsoft Entra ID](/entra/fundamentals/whatis) (formerly Azure Active Directory) authentication is a mechanism of connecting to Azure Cosmos DB for PostgreSQL using identities defined in Microsoft Entra ID. With Microsoft Entra ID authentication, you can manage database user identities and other Microsoft services in a central location, which simplifies permission management.
6969

7070
Benefits of using Microsoft Entra ID include:
7171

7272
- Authentication of users across Azure Services in a uniform way
7373
- Management of password policies and password rotation in a single place
7474
- Multiple forms of authentication supported by Microsoft Entra ID, which can eliminate the need to store passwords
75-
- Microsoft Entra authentication uses PostgreSQL database roles to authenticate identities at the database level
75+
- Microsoft Entra ID authentication uses PostgreSQL database roles to authenticate identities at the database level
7676
- Support of token-based authentication for applications connecting to Azure Cosmos DB for PostgreSQL
7777

7878
<a name='manage-postgresql-access-for-azure-ad-principals'></a>
7979

80-
### Manage PostgreSQL access for Microsoft Entra principals
80+
### Manage PostgreSQL access for Microsoft Entra ID principals
8181

82-
When Microsoft Entra authentication is enabled and Microsoft Entra principal is added as a Microsoft Entra administrator, the account gets the same privileges as [the `citus` role](#the-citus-role). The Microsoft Entra administrator sign-in can be a Microsoft Entra user, Service Principal or Managed Identity. Multiple Microsoft Entra administrators can be configured at any time and you can optionally disable PostgreSQL (password) authentication to the Azure Cosmos DB for PostgreSQL cluster for better auditing and compliance needs.
82+
When Microsoft Entra ID authentication is enabled and Microsoft Entra ID principal is added as a Microsoft Entra ID administrator, the account gets the same privileges as [the `citus` role](#the-citus-role). The Microsoft Entra ID administrator sign-in can be a Microsoft Entra ID user, Service Principal or Managed Identity. Multiple Microsoft Entra ID administrators can be configured at any time and you can optionally disable PostgreSQL (password) authentication to the Azure Cosmos DB for PostgreSQL cluster for better auditing and compliance needs.
8383

84-
Additionally, any number of non-admin Microsoft Entra roles can be added to a cluster at any time once Microsoft Entra authentication is enabled. Database permissions for non-admin Microsoft Entra roles are managed similar to regular roles.
84+
Additionally, any number of non-admin Microsoft Entra ID roles can be added to a cluster at any time once Microsoft Entra ID authentication is enabled. Database permissions for non-admin Microsoft Entra ID roles are managed similar to regular roles.
8585

8686
<a name='connect-using-azure-ad-identities'></a>
8787

88-
### Connect using Microsoft Entra identities
88+
### Connect using Microsoft Entra ID identities
8989

90-
Microsoft Entra authentication supports the following methods of connecting to a database using Microsoft Entra identities:
90+
Microsoft Entra ID authentication supports the following methods of connecting to a database using Microsoft Entra ID identities:
9191

92-
- Microsoft Entra Password
93-
- Microsoft Entra integrated
94-
- Microsoft Entra Universal with MFA
95-
- Using Active Directory Application certificates or client secrets
92+
- Microsoft Entra ID Password
93+
- Microsoft Entra ID integrated
94+
- Microsoft Entra ID Universal with MFA
95+
- Using Microsoft Entra ID Application certificates or client secrets
9696
- Managed Identity
9797

98-
Once you've authenticated against the Active Directory, you then retrieve a token. This token is your password for logging in.
98+
Once you've authenticated against the Microsoft Entra ID, you then retrieve a token. This token is your password for logging in.
9999

100100
### Other considerations
101101

102-
- Multiple Microsoft Entra principals (a user, service principal, or managed identity) can be configured as Microsoft Entra administrator for an Azure Cosmos DB for PostgreSQL cluster at any time.
103-
- If a Microsoft Entra principal is deleted from Microsoft Entra service, it still remains as a PostgreSQL role on the cluster, but it's no longer able to acquire new access token. In this case, although the matching role still exists in the Postgres database it's unable to authenticate to the cluster nodes. Database administrators need to transfer ownership and drop such roles manually.
102+
- Multiple Microsoft Entra ID principals (a user, service principal, or managed identity) can be configured as Microsoft Entra ID administrator for an Azure Cosmos DB for PostgreSQL cluster at any time.
103+
- If a Microsoft Entra ID principal is deleted from Microsoft Entra ID service, it still remains as a PostgreSQL role on the cluster, but it's no longer able to acquire new access token. In this case, although the matching role still exists in the Postgres database it's unable to authenticate to the cluster nodes. Database administrators need to transfer ownership and drop such roles manually.
104104

105105
> [!NOTE]
106-
> Login with the deleted Microsoft Entra user can still be done till the token expires (up to 90 minutes from token issuing). If you also remove the user from Azure Cosmos DB for PostgreSQL cluster this access will be revoked immediately.
106+
> Login with the deleted Microsoft Entra ID user can still be done till the token expires (up to 90 minutes from token issuing). If you also remove the user from Azure Cosmos DB for PostgreSQL cluster this access will be revoked immediately.
107107
108-
- Azure Cosmos DB for PostgreSQL matches access tokens to the database role using the user’s unique Microsoft Entra user ID, as opposed to using the username. If a Microsoft Entra user is deleted and a new user is created with the same name, Azure Cosmos DB for PostgreSQL considers that a different user. Therefore, if a user is deleted from Microsoft Entra ID and a new user is added with the same name the new user would be unable to connect with the existing role.
108+
- Azure Cosmos DB for PostgreSQL matches access tokens to the database role using the user’s unique Microsoft Entra ID user ID, as opposed to using the username. If a Microsoft Entra ID user is deleted and a new user is created with the same name, Azure Cosmos DB for PostgreSQL considers that a different user. Therefore, if a user is deleted from Microsoft Entra ID and a new user is added with the same name the new user would be unable to connect with the existing role.
109109

110110
## Next steps
111111

0 commit comments

Comments
 (0)