Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for how to configure endpoint mTLS #156

Closed
wants to merge 2 commits into from
Closed
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
24 changes: 24 additions & 0 deletions docs/receiving/using-app-portal/adding-endpoints.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,27 @@ full descriptions of each endpoint as well as all the fields they send.
If you don't specify any event types, by default, your endpoint will receive all events, regardless of type.
This can be helpful for getting started and for testing, but we recommend changing this to a subset later on
to avoid receiving unexpected messages.

### Configuring mTLS

Svix now supports Mutual TLS (mTLS), per endpoint. At this time this feature is only configurable via API.

- `PUT $SVIX_ROOT/api/v1/app/APP/endpoint/ENDPOINT/mtls` to set the configuration options.
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't need to be now, just putting it for posterity, but let's follow the format in the rest of the docs with how we show URLs, endpoint IDs in URLS, etc.

All the $TOKEN and $SVIX_ROOT is very confusing.

- `DELETE $SVIX_ROOT/api/v1/app/APP/endpoint/ENDPOINT/mtls` to clear any previously set configuration.

The `PUT` body consists of one key:
- `identity` (required) a PEM encoded private key and X509 certificate used by the webhook sender to authenticate itself.


Example:

```sh
# using jq here to escape the newlines and produce a quoted string
CLIENT_PEM="$(cat client.pem | jq -sR .)"

curl -sS -H "Authorization: Bearer $TOKEN" \
-H "content-type: application/json" \
-X PUT \
-d '{"identity":'"$CLIENT_PEM"'}' \
$SVIX_ROOT/api/v1/app/my-app/endpoint/my-endpoint/mtls
```