Skip to content

Commit 36e36b0

Browse files
committed
wip
1 parent 251e671 commit 36e36b0

File tree

3 files changed

+27
-55
lines changed

3 files changed

+27
-55
lines changed

src/content/docs/hyperdrive/configuration/tls-ssl-certificates-for-hyperdrive.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ npx wrangler cert upload certificate-authority --ca-cert \<ROUTE_TO_CA_PEM_FILE\
4848
---
4949

5050
Uploading CA Certificate tmp-cert...
51-
Success! Uploaded CA Certificate \<CUSTOM_NAME_FOR_CA_CERT\>
52-
ID: \<YOUR_ID_FOR_THE_CA_CERTIFICATE\>
51+
Success! Uploaded CA Certificate <CUSTOM_NAME_FOR_CA_CERT>
52+
ID: <YOUR_ID_FOR_THE_CA_CERTIFICATE>
5353
...
5454
```
5555

@@ -60,10 +60,8 @@ certificates using either the dashboard or Wrangler. You must also specify the S
6060

6161
Using Wrangler, enter the following command in your terminal:
6262

63-
UPDATE WRANGLER
64-
6563
```bash
66-
npx wrangler hyperdrive create \<NAME_OF_HYPERDRIVE_CONFIG\> --connection-string="postgres://user:password@HOSTNAME_OR_IP_ADDRESS:PORT/database_name" --certificate-authority-id \<YOUR_CA_CERT_ID\>
64+
npx wrangler hyperdrive create <NAME_OF_HYPERDRIVE_CONFIG> --connection-string="postgres://user:password@HOSTNAME_OR_IP_ADDRESS:PORT/database_name" --ca-certificate-id <YOUR_CA_CERT_ID> --sslmode verify-full
6765
```
6866

6967
When creating the Hyperdrive configuration, Hyperdrive will attempt to connect to the database with the
@@ -105,5 +103,9 @@ You can now create a Hyperdrive configuration using the newly created client cer
105103
Using Wrangler, run the following command:
106104

107105
```bash
108-
npx wrangler hyperdrive create <NAME_OF_HYPERDRIVE_CONFIG> --connection-string="postgres://user:password@HOSTNAME_OR_IP_ADDRESS:PORT/database_name" --certificate-authority-id <YOUR_CA_CERT_ID> --mtls-certificate-uuid <YOUR_CLIENT_CERT_PAIR_ID>
106+
npx wrangler hyperdrive create <NAME_OF_HYPERDRIVE_CONFIG> --connection-string="postgres://user:password@HOSTNAME_OR_IP_ADDRESS:PORT/database_name" --mtls-certificate-id <YOUR_CLIENT_CERT_PAIR_ID>
109107
```
108+
109+
When Hyperdrive will connect to your database, it will provide a client certificate signed with the private key to the database server. This will allow the database server to confirm that the
110+
client, in this case Hyperdrive, has both the private key and the client certificate. By using client certificates, you can add an additional authentication layer for your database that ensures
111+
that only Hyperdrive can connect to it.

src/content/docs/hyperdrive/reference/supported-databases-and-features.mdx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,25 @@ The following is a non-exhaustive list of database providers:
3030
| Planetscale || All | Planetscale currently runs MySQL 8.x |
3131
| MariaDB || All | MySQL-compatible. |
3232

33+
## Supported TLS (SSL) modes
34+
35+
Hyperdrive supports the following [PostgreSQL TLS (SSL)](https://www.postgresql.org/docs/current/libpq-ssl.html) connection modes when connecting to your origin database:
36+
37+
| Mode | Supported | Details |
38+
| ------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
39+
| `none` | No | Hyperdrive does not support insecure plain text connections. |
40+
| `prefer` | No (use `require`) | Hyperdrive will always use TLS. |
41+
| `require` | Yes (default) | TLS is required, and server certificates are validated (based on WebPKI). |
42+
| `verify-ca` | Yes | Verifies the server's TLS certificate is signed by a root CA on the client. This ensures the server has a certificate the client trusts. |
43+
| `verify-full` | Yes | Identical to `verify-ca`, but also requires the database hostname must match a Subject Alternative Name (SAN) present on the certificate. |
44+
45+
Refer to [SSL/TLS certificates](/hyperdrive/configuration/tls-ssl-certificates-for-hyperdrive/) documentation for details on how to configure `verify-ca` or `verify-full` TLS (SSL) modes for Hyperdrive.
46+
:::note
47+
48+
Hyperdrive support for `verify-ca` and `verify-full` is not available for MySQL (beta).
49+
50+
:::
51+
3352
## Supported PostgreSQL authentication modes
3453

3554
Hyperdrive supports the following [authentication modes](https://www.postgresql.org/docs/current/auth-methods.html) for connecting to PostgreSQL databases:

src/content/docs/hyperdrive/reference/supported-databases.mdx

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)