Skip to content

Commit 7d456d8

Browse files
Merge pull request #229530 from GennadNY/gennadyk898
Gennadyk898
2 parents 5d315fc + 613744b commit 7d456d8

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

articles/postgresql/flexible-server/concepts-networking.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,15 @@ All incoming connections that use earlier versions of the TLS protocol, such as
213213
[Certificate authentication](https://www.postgresql.org/docs/current/auth-cert.html) is performed using **SSL client certificates** for authentication. In this scenario, PostgreSQL server compares the CN (common name) attribute of the client certificate presented, against the requested database user.
214214
**Azure Database for PostgreSQL - Flexible Server does not support SSL certificate based authentication at this time.**
215215

216-
To determine your current SSL connection status you can load the [sslinfo extension](concepts-extensions.md) and then call the `ssl_is_used()` function to determine if SSL is being used. The function returns t if the connection is using SSL, otherwise it returns f.
217-
218-
216+
To determine your current SSL connection status you can load the [sslinfo extension](concepts-extensions.md) and then call the `ssl_is_used()` function to determine if SSL is being used. The function returns t if the connection is using SSL, otherwise it returns f. You can also collect all the information about your Azure Database for PostgreSQL - Flexible Server instance's SSL usage by process, client, and application by using the following query:
217+
218+
```sql
219+
SELECT datname as "Database name", usename as "User name", ssl, client_addr, application_name, backend_type
220+
FROM pg_stat_ssl
221+
JOIN pg_stat_activity
222+
ON pg_stat_ssl.pid = pg_stat_activity.pid
223+
ORDER BY ssl;
224+
```
219225
## Next steps
220226

221227
* Learn how to create a flexible server by using the **Private access (VNet integration)** option in [the Azure portal](how-to-manage-virtual-network-portal.md) or [the Azure CLI](how-to-manage-virtual-network-cli.md).

articles/postgresql/single-server/concepts-ssl-connection-security.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ You can enable or disable the **ssl-enforcement** parameter using `Enabled` or `
4848
```azurecli
4949
az postgres server update --resource-group myresourcegroup --name mydemoserver --ssl-enforcement Enabled
5050
```
51+
### Determining SSL connections status
52+
53+
You can also collect all the information about your Azure Database for PostgreSQL - Single Server instance's SSL usage by process, client, and application by using the following query:
54+
```sql
55+
SELECT datname as "Database name", usename as "User name", ssl, client_addr, application_name, backend_type
56+
FROM pg_stat_ssl
57+
JOIN pg_stat_activity
58+
ON pg_stat_ssl.pid = pg_stat_activity.pid
59+
ORDER BY ssl;
60+
```
5161

5262
## Ensure your application or framework supports TLS connections
5363

0 commit comments

Comments
 (0)