Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 4 additions & 54 deletions src/content/docs/workers/wrangler/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1568,22 +1568,7 @@ Manage mTLS client certificates and Certificate Authority (CA) chain certificate

These certificates can be used in Hyperdrive configurations, enabling them to present the certificate when connecting to an origin database that requires client authentication (mTLS) or a custom Certificate Authority (CA).

### `upload mtls-certificate`

Upload a client certificate.

```txt
wrangler cert upload mtls-certificate --cert <PATH> --key <PATH> [OPTIONS]
```

- `--cert` <Type text="string" /> <MetaInfo text="required" />
- A path to the TLS certificate to upload. Certificate chains are supported.
- `--key` <Type text="string" /> <MetaInfo text="required" />
- A path to the private key to upload.
- `--name` <Type text="string" /> <MetaInfo text="optional" />
- The name assigned to the mTLS certificate at upload.

<Render file="wrangler-commands/global-flags" product="workers" />
<WranglerCommand command="cert upload mtls-certificate" headingLevel={3}/>

The following is an example of using the `upload` command to upload an mTLS certificate.

Expand All @@ -1601,21 +1586,7 @@ Expires: 1/01/2025

Note that the certificate and private keys must be in separate (typically `.pem`) files when uploading.

### `upload certificate-authority`

Upload a client certificate.

```txt
wrangler cert upload certificate-authority --ca-cert <PATH> [OPTIONS]
```

- `--ca-cert` <Type text="string" /> <MetaInfo text="required" />
- A path to the Certificate Authority (CA) chain certificate to upload.

- `--name` <Type text="string" /> <MetaInfo text="optional" />
- The name assigned to the mTLS certificate at upload.

<Render file="wrangler-commands/global-flags" product="workers" />
<WranglerCommand command="cert upload certificate-authority" headingLevel={3}/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback (for later) about the WranglerCommand component:

The command specification now includes less info. I believe this was useful -- users could copy the whole command and fill in the parameters.

Before:
image

After:
image

Also, we should probably list required parameters first, before any optional parameters (like we did before).


The following is an example of using the `upload` command to upload an CA certificate.

Expand All @@ -1632,15 +1603,7 @@ Issuer: CN=my-secured-origin.com,OU=my-team,O=my-org,L=San Francisco,ST=Californ
Expires: 1/01/2025
```

### `list`

List mTLS certificates associated with the current account ID. This will display both mTLS certificates and CA certificates.

```txt
wrangler cert list
```

<Render file="wrangler-commands/global-flags" product="workers" />
<WranglerCommand command="cert list" headingLevel={3}/>

The following is an example of using the `list` command to upload an mTLS or CA certificate.

Expand All @@ -1661,20 +1624,7 @@ Created on: 1/01/2023
Expires: 1/01/2025
```

### `delete`

Delete a client certificate.

```txt
wrangler cert delete {--id <ID|--name <NAME>}
```

- `--id` <Type text="string" />
- The ID of the mTLS or CA certificate.
- `--name` <Type text="string" />
- The name assigned to the mTLS or CA certificate at upload.

<Render file="wrangler-commands/global-flags" product="workers" />
<WranglerCommand command="cert delete" headingLevel={3}/>

The following is an example of using the `delete` command to delete an mTLS or CA certificate.

Expand Down
Loading