Skip to content

Commit 56189d6

Browse files
committed
changes
1 parent ebac6d0 commit 56189d6

File tree

3 files changed

+33
-29
lines changed

3 files changed

+33
-29
lines changed

articles/postgresql/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@
321321
items:
322322
- name: Encrypted connectivity using TLS/SSL
323323
href: flexible-server/how-to-connect-tls-ssl.md
324-
- name: Update application client SSL\TLS certificates
324+
- name: Update application client SSL/TLS certificates
325325
href: flexible-server/how-to-update-client-certificates-java.md
326326
- name: Private access with virtual network integration
327327
items:

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ For more on SSL\TLS configuration on the client, see [PostgreSQL documentation](
101101
> * For connectivity to servers deployed to Azure government cloud regions (US Gov Virginia, US Gov Texas, US Gov Arizona): [DigiCert Global Root G2](https://www.digicert.com/kb/digicert-root-certificates.htm) and [Microsoft RSA Root Certificate Authority 2017](https://www.microsoft.com/pkiops/docs/repository.htm) root CA certificates, as services are migrating from Digicert to Microsoft CA.
102102
> * For connectivity to servers deployed to Azure public cloud regions worldwide : [Digicert Global Root CA](https://www.digicert.com/kb/digicert-root-certificates.htm) and [Microsoft RSA Root Certificate Authority 2017](https://www.microsoft.com/pkiops/docs/repository.htm), as services are migrating from Digicert to Microsoft CA.
103103
104-
### Downloading Root CA certificates and updating application clients in certificate pinning scenarios.
104+
### Downloading Root CA certificates and updating application clients in certificate pinning scenarios
105+
105106
To update client applications in certificate pinning scenarios you can download certificates from following URIs:
106107
* For connectivity to servers deployed to Azure Government cloud regions (US Gov Virginia, US Gov Texas, US Gov Arizona) download Microsoft RSA Root Certificate Authority 2017 and DigiCert Global Root G2 certificates from following URIs:
107108
Microsoft RSA Root Certificate Authority 2017 https://www.microsoft.com/pkiops/certs/Microsoft%20RSA%20Root%20Certificate%20Authority%202017.crt,
@@ -123,7 +124,7 @@ Therefore, for clients that use **verify-ca** and **verify-full** sslmode config
123124
> [!NOTE]
124125
> Azure Database for PostgreSQL - Flexible server doesn't support [certificate based authentication](https://www.postgresql.org/docs/current/auth-cert.html) at this time.
125126
126-
## Testing SSL\TLS Connectivity
127+
## Testing SSL/TLS Connectivity
127128

128129
Before trying to access your SSL enabled server from client application, make sure you can get to it via psql. You should see output similar to the following if you established an SSL connection.
129130

articles/postgresql/flexible-server/how-to-update-client-certificates-java.md

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Updating Client SSL\TLS Certificates for Java
3-
description: Learn about updating Java clients with Flexible Server using SSL and TLS
2+
title: Updating Client SSL/TLS Certificates for Java
3+
description: Learn about updating Java clients with Flexible Server using SSL and TLS.
44
author: GennadNY
55
ms.author: gennadyk
66
ms.date: 04/04/2024
@@ -9,44 +9,44 @@ ms.subservice: flexible-server
99
ms.topic: conceptual
1010
---
1111

12-
# Update client TLS certificates for Application Clients with Azure Database for PostgreSQL - Flexible Server
12+
# Update Client TLS Certificates for Application Clients with Azure Database for PostgreSQL - Flexible Server
1313

1414
[!INCLUDE [applies-to-postgresql-flexible-server](../includes/applies-to-postgresql-flexible-server.md)]
1515

1616

17-
## Importing Root CA Certificates in Java Key Store on the client for certificate pinning scenarios
17+
## Import Root CA Certificates in Java Key Store on the client for certificate pinning scenarios
1818

1919
Custom-written Java applications use a default keystore, called *cacerts*, which contains trusted certificate authority (CA) certificates. It's also often known as Java trust store. A certificates file named *cacerts* resides in the security properties directory, java.home\lib\security, where java.home is the runtime environment directory (the jre directory in the SDK or the top-level directory of the Java™ 2 Runtime Environment).
2020
You can use following directions to update client root CA certificates for client certificate pinning scenarios with PostgreSQL Flexible Server:
2121
1. Make a backup copy of your custom keystore.
22-
2. Download [certificates](../flexible-server/concepts-networking-ssl-tls.md#downloading-root-ca-certificates-and-updating-application-clients-in-certificate-pinning-scenarios)(#downloading-root-ca-certificates-and-updating-application-clients-in-certificate-pinning-scenarios)
22+
2. Download [certificates](../flexible-server/concepts-networking-ssl-tls.md#downloading-root-ca-certificates-and-updating-application-clients-in-certificate-pinning-scenarios)
2323
3. Generate a combined CA certificate store with both Root CA certificates are included. Example below shows using DefaultJavaSSLFactory for PostgreSQL JDBC users.
2424

25-
* For connectivity to servers deployed to Azure Government cloud regions (US Gov Virginia, US Gov Texas, US Gov Arizona)
26-
```powershell
25+
* For connectivity to servers deployed to Azure Government cloud regions (US Gov Virginia, US Gov Texas, US Gov Arizona)
26+
```powershell
2727
2828
29-
keytool -importcert -alias PostgreSQLServerCACert -file D:\ DigiCertGlobalRootG2.crt.pem -keystore truststore -storepass password -noprompt
29+
keytool -importcert -alias PostgreSQLServerCACert -file D:\ DigiCertGlobalRootG2.crt.pem -keystore truststore -storepass password -noprompt
3030
31-
keytool -importcert -alias PostgreSQLServerCACert2 -file "D:\ Microsoft ECC Root Certificate Authority 2017.crt.pem" -keystore truststore -storepass password -noprompt
32-
```
33-
* For connectivity to servers deployed in Azure public regions worldwide
34-
```powershell
31+
keytool -importcert -alias PostgreSQLServerCACert2 -file "D:\ Microsoft ECC Root Certificate Authority 2017.crt.pem" -keystore truststore -storepass password -noprompt
32+
```
33+
* For connectivity to servers deployed in Azure public regions worldwide
34+
```powershell
3535
36-
keytool -importcert -alias PostgreSQLServerCACert -file D:\ DigiCertGlobalRootCA.crt.pem -keystore truststore -storepass password -noprompt
36+
keytool -importcert -alias PostgreSQLServerCACert -file D:\ DigiCertGlobalRootCA.crt.pem -keystore truststore -storepass password -noprompt
3737
38-
keytool -importcert -alias PostgreSQLServerCACert2 -file "D:\ Microsoft ECC Root Certificate Authority 2017.crt.pem" -keystore truststore -storepass password -noprompt
39-
```
38+
keytool -importcert -alias PostgreSQLServerCACert2 -file "D:\ Microsoft ECC Root Certificate Authority 2017.crt.pem" -keystore truststore -storepass password -noprompt
39+
```
4040
4141
5. Replace the original keystore file with the new generated one:
4242
43-
```java
44-
System.setProperty("javax.net.ssl.trustStore","path_to_truststore_file");
45-
System.setProperty("javax.net.ssl.trustStorePassword","password");
46-
```
43+
```java
44+
System.setProperty("javax.net.ssl.trustStore","path_to_truststore_file");
45+
System.setProperty("javax.net.ssl.trustStorePassword","password");
46+
```
4747
6. Replace the original root CA pem file with the combined root CA file and restart your application/client.
4848
49-
For more information on configuring client certificates with PostgreSQL JDBC driver, see this [documentation](https://jdbc.postgresql.org/documentation/ssl/)
49+
For more information on configuring client certificates with PostgreSQL JDBC driver, see this [documentation.](https://jdbc.postgresql.org/documentation/ssl/)
5050
5151
5252
@@ -80,28 +80,30 @@ public void whenLoadingCacertsKeyStore_thenCertificatesArePresent() {
8080
assertFalse(certificates.isEmpty());
8181
}
8282
```
83-
## Updating Root CA certificates when using clients in Azure App Services with Azure Database for PostgreSQL - Flexible Server for certificate pinning scenarios
83+
## Update Root CA certificates when using clients in Azure App Services with Azure Database for PostgreSQL - Flexible Server for certificate pinning scenarios
8484

8585
For Azure App services, connecting to Azure Database for PostgreSQL, we can have two possible scenarios on updating client certificates and it depends on how on you're using SSL with your application deployed to Azure App Services.
8686

87-
* Usually new certificates are added to App Service at platform level prior to changes in Azure Database for PostgreSQL - Flexible Server. If you are using the SSL certificates included on App Service platform in your application, then no action is needed. Consult following [Azure App Service documentation](../../app-service/configure-ssl-certificate.md) for more information.
87+
* Usually new certificates are added to App Service at platform level prior to changes in Azure Database for PostgreSQL - Flexible Server. If you're using the SSL certificates included on App Service platform in your application, then no action is needed. Consult following [Azure App Service documentation](../../app-service/configure-ssl-certificate.md) for more information.
8888
* If you're explicitly including the path to SSL cert file in your code, then you would need to download the new cert and update the code to use the new cert. A good example of this scenario is when you use custom containers in App Service as shared in the [App Service documentation](../../app-service/tutorial-multi-container-app.md#configure-database-variables-in-wordpress)
8989

90-
## Updating Root CA certificates when using clients in Azure Kubernetes Service (AKS) with Azure Database for PostgreSQL - Flexible Server for certificate pinning scenarios
90+
## Update Root CA certificates when using clients in Azure Kubernetes Service (AKS) with Azure Database for PostgreSQL - Flexible Server for certificate pinning scenarios
9191

9292
If you're trying to connect to the Azure Database for PostgreSQL using applications hosted in Azure Kubernetes Services (AKS) and pinning certificates, it's similar to access from a dedicated customers host environment. Refer to the steps [here](../../aks/ingress-tls.md).
9393

94-
## Updating Root CA certificates for For .NET (Npgsql) users on Windows with Azure Database for PostgreSQL - Flexible Server for certificate pinning scenarios
94+
## Updating Root CA certificates for .NET (Npgsql) users on Windows with Azure Database for PostgreSQL - Flexible Server for certificate pinning scenarios
9595

9696
For .NET (Npgsql) users on Windows, connecting to Azure Database for PostgreSQL - Flexible Servers deployed in Azure Government cloud regions (US Gov Virginia, US Gov Texas, US Gov Arizona) make sure **both** Microsoft RSA Root Certificate Authority 2017 and DigiCert Global Root G2 both exist in Windows Certificate Store, Trusted Root Certification Authorities. If any certificates don't exist, import the missing certificate.
9797

98-
For .NET (Npgsql) users on Windows, connecting to Azure Database for PostgreSQL - Flexible Servers deployed in Azure pubiic regions worldwide make sure **both** Microsoft RSA Root Certificate Authority 2017 and DigiCert Global Root CA **both** exist in Windows Certificate Store, Trusted Root Certification Authorities. If any certificates don't exist, import the missing certificate.
98+
For .NET (Npgsql) users on Windows, connecting to Azure Database for PostgreSQL - Flexible Servers deployed in Azure public regions worldwide make sure **both** Microsoft RSA Root Certificate Authority 2017 and DigiCert Global Root CA **both** exist in Windows Certificate Store, Trusted Root Certification Authorities. If any certificates don't exist, import the missing certificate.
9999

100100

101101

102102
## Updating Root CA certificates for other clients for certificate pinning scenarios
103103

104-
For other PostgreSQL client users, you can merge two CA certificate files like this format below:
104+
For other PostgreSQL client users, you can merge two CA certificate files like this format below.
105+
106+
```azurecli
105107
106108
107109
-----BEGIN CERTIFICATE-----
@@ -110,6 +112,7 @@ For other PostgreSQL client users, you can merge two CA certificate files like t
110112
-----BEGIN CERTIFICATE-----
111113
(Root CA2: Microsoft ECC Root Certificate Authority 2017.crt.pem)
112114
-----END CERTIFICATE-----
115+
```
113116

114117
## Related content
115118

0 commit comments

Comments
 (0)