You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Optionally, to prevent future disruption, it's also recommended to add the following roots to the trusted store:
113
113
Microsoft ECC Root Certificate Authority 2017 - https://www.microsoft.com/pkiops/certs/Microsoft%20ECC%20Root%20Certificate%20Authority%202017.crt
114
114
115
-
Detailed information on updating client applications certificate stores with new Root CA certificates has been documented in this **[tutorial](../flexible-server/how-to-update-client-certificates-java.md)**.
115
+
To import certificates to client certificate stores you may have to convert certificate .crt files to .pem format, after downloading certificate files from URIs above. You can use OpenSSL utility to do these file conversions, as shown in example below:
116
+
117
+
```powershell
118
+
openssl x509 -in cert.crt -out cert.pem
119
+
```
120
+
121
+
**Detailed information on updating client applications certificate stores with new Root CA certificates has been documented in this [how-to document](../flexible-server/how-to-update-client-certificates-java.md)**.
116
122
117
123
### Read Replicas with certificate pinning scenarios
118
124
119
125
With Root CA migration to [Microsoft RSA Root Certificate Authority 2017](https://www.microsoft.com/pkiops/docs/repository.htm) it's feasible for newly created replicas to be on a newer Root CA certificate than primary server created earlier.
120
-
Therefore, for clients that use **verify-ca** and **verify-full** sslmode configuration settings, i.e. certificate pinning, is imperative for interrupted connectivity to accept **both** root CA certificates:
126
+
Therefore, for clients that use **verify-ca** and **verify-full** sslmode configuration settings, that is, certificate pinning, is imperative for interrupted connectivity to accept **both** root CA certificates:
121
127
* 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.
122
128
* 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.
123
129
@@ -133,7 +139,7 @@ You can use psql command line from your client to test connectivity to the serve
Copy file name to clipboardExpand all lines: articles/postgresql/flexible-server/how-to-update-client-certificates-java.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,12 @@ ms.topic: conceptual
18
18
19
19
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).
20
20
You can use following directions to update client root CA certificates for client certificate pinning scenarios with PostgreSQL Flexible Server:
21
+
1. Check *cacerts* java keystore to see if it already contains required certificates. You can list certificates in Java keystore by using following command:
22
+
```powershell
23
+
keytool -list -v -keystore </path/to/cacerts>
24
+
```
25
+
If necessary certificates are not present in the java key store on the client, you should proceed with following directions:
3. Generate a combined CA certificate store with both Root CA certificates are included. Example below shows using DefaultJavaSSLFactory for PostgreSQL JDBC users.
@@ -48,9 +54,10 @@ You can use following directions to update client root CA certificates for clien
48
54
49
55
For more information on configuring client certificates with PostgreSQL JDBC driver, see this [documentation.](https://jdbc.postgresql.org/documentation/ssl/)
50
56
57
+
> [!NOTE]
58
+
> To import certificates to client certificate stores you may have to convert certificate .crt files to .pem format. You ?..can use **[OpenSSL utility to do these file conversions](./concepts-networking-ssl-tls.md#downloading-root-ca-certificates-and-updating-application-clients-in-certificate-pinning-scenarios)**.
51
59
52
-
53
-
## Get list of trusted certificates in Java Key Store
60
+
## Get list of trusted certificates in Java Key Store programmatically
54
61
55
62
As stated above, Java, by default, stores the trusted certificates in a special file named *cacerts* that is located inside Java installation folder on the client.
56
63
Example below first reads *cacerts* and loads it into *KeyStore* object:
0 commit comments