Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@
# DESTINATIONS_WEBHOOK_DISABLE_DEFAULT_SIGNATURE_HEADER=false
# DESTINATIONS_WEBHOOK_DISABLE_DEFAULT_TIMESTAMP_HEADER=false
# DESTINATIONS_WEBHOOK_DISABLE_DEFAULT_TOPIC_HEADER=false
# DESTINATIONS_WEBHOOK_SIGNATURE_CONTENT_TEMPLATE={{.Timestamp.Unix}}.{{.Body}}
# DESTINATIONS_WEBHOOK_SIGNATURE_HEADER_TEMPLATE=t={{.Timestamp.Unix}},v0={{.Signatures | join ","}}
# DESTINATIONS_WEBHOOK_SIGNATURE_CONTENT_TEMPLATE={{.Body}}
# DESTINATIONS_WEBHOOK_SIGNATURE_HEADER_TEMPLATE=v0={{.Signatures | join ","}}
# DESTINATIONS_WEBHOOK_SIGNATURE_ENCODING="hex"
# DESTINATIONS_WEBHOOK_SIGNATURE_ALGORITHM="hmac-sha256"

Expand Down
4 changes: 2 additions & 2 deletions docs/pages/destinations/webhook.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ Operators can customize webhook behavior via environment variables.
| -------------------- | ------- | ----------- |
| `DESTINATIONS_WEBHOOK_SIGNATURE_ALGORITHM` | `hmac-sha256` | Signature algorithm |
| `DESTINATIONS_WEBHOOK_SIGNATURE_ENCODING` | `hex` | Signature encoding (`hex` or `base64`) |
| `DESTINATIONS_WEBHOOK_SIGNATURE_VALUE_TEMPLATE` | `{{.Timestamp.Unix}}.{{.Body}}` | Template for the value being signed |
| `DESTINATIONS_WEBHOOK_SIGNATURE_HEADER_TEMPLATE` | `t={{.Timestamp.Unix}},v0={{.Signatures \| join ","}}` | Template for signature header value |
| `DESTINATIONS_WEBHOOK_SIGNATURE_CONTENT_TEMPLATE` | `{{.Body}}` | Template for the content being signed |
| `DESTINATIONS_WEBHOOK_SIGNATURE_HEADER_TEMPLATE` | `v0={{.Signatures \| join ","}}` | Template for signature header value |

See the [migration guide](/docs/guides/migrate-to-outpost#webhook-customization) for common customization patterns.

Expand Down
22 changes: 11 additions & 11 deletions docs/pages/guides/migrate-to-outpost.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,17 @@ You can customize the following webhook features and behaviors. The full path to

Templates use the [Go template syntax](https://pkg.go.dev/text/template).

| YAML | Environment Variable | Default Value |
| ---------------------------------- | ------------------------------------------------------- | ------------------------------------------------------ |
| `header_prefix` | `DESTINATIONS_WEBHOOK_HEADER_PREFIX` | `x-outpost` |
| `disable_default_event_id_header` | `DESTINATIONS_WEBHOOK_DISABLE_DEFAULT_EVENT_ID_HEADER` | `false` |
| `disable_default_signature_header` | `DESTINATIONS_WEBHOOK_DISABLE_DEFAULT_SIGNATURE_HEADER` | `false` |
| `disable_default_timestamp_header` | `DESTINATIONS_WEBHOOK_DISABLE_DEFAULT_TIMESTAMP_HEADER` | `false` |
| `disable_default_topic_header` | `DESTINATIONS_WEBHOOK_DISABLE_DEFAULT_TOPIC_HEADER` | `false` |
| `signature_content_template` | `DESTINATIONS_WEBHOOK_SIGNATURE_CONTENT_TEMPLATE` | `{{.Timestamp.Unix}}.{{.Body}}` |
| `signature_header_template` | `DESTINATIONS_WEBHOOK_SIGNATURE_HEADER_TEMPLATE` | `t={{.Timestamp.Unix}},v0={{.Signatures \| join ","}}` |
| `signature_encoding` | `DESTINATIONS_WEBHOOK_SIGNATURE_ENCODING` | `hex` |
| `signature_algorithm` | `DESTINATIONS_WEBHOOK_SIGNATURE_ALGORITHM` | `hmac-sha256` |
| YAML | Environment Variable | Default Value |
| ---------------------------------- | ------------------------------------------------------- | -------------------------------- |
| `header_prefix` | `DESTINATIONS_WEBHOOK_HEADER_PREFIX` | `x-outpost` |
| `disable_default_event_id_header` | `DESTINATIONS_WEBHOOK_DISABLE_DEFAULT_EVENT_ID_HEADER` | `false` |
| `disable_default_signature_header` | `DESTINATIONS_WEBHOOK_DISABLE_DEFAULT_SIGNATURE_HEADER` | `false` |
| `disable_default_timestamp_header` | `DESTINATIONS_WEBHOOK_DISABLE_DEFAULT_TIMESTAMP_HEADER` | `false` |
| `disable_default_topic_header` | `DESTINATIONS_WEBHOOK_DISABLE_DEFAULT_TOPIC_HEADER` | `false` |
| `signature_content_template` | `DESTINATIONS_WEBHOOK_SIGNATURE_CONTENT_TEMPLATE` | `{{.Body}}` |
| `signature_header_template` | `DESTINATIONS_WEBHOOK_SIGNATURE_HEADER_TEMPLATE` | `v0={{.Signatures \| join ","}}` |
| `signature_encoding` | `DESTINATIONS_WEBHOOK_SIGNATURE_ENCODING` | `hex` |
| `signature_algorithm` | `DESTINATIONS_WEBHOOK_SIGNATURE_ALGORITHM` | `hmac-sha256` |

### Migration Process

Expand Down
8 changes: 4 additions & 4 deletions docs/pages/references/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ Global configurations are provided through env variables or a YAML file. ConfigM
| `DESTINATIONS_WEBHOOK_MODE` | Webhook mode: 'default' for customizable webhooks or 'standard' for Standard Webhooks specification compliance. Defaults to 'default'. | `nil` | No |
| `DESTINATIONS_WEBHOOK_PROXY_URL` | Proxy URL for routing webhook requests through a proxy server. Supports HTTP and HTTPS proxies. When configured, all outgoing webhook traffic will be routed through the specified proxy. | `nil` | No |
| `DESTINATIONS_WEBHOOK_SIGNATURE_ALGORITHM` | Algorithm used for signing webhook requests (e.g., 'hmac-sha256'). Only applies to 'default' mode. | `hmac-sha256` | No |
| `DESTINATIONS_WEBHOOK_SIGNATURE_CONTENT_TEMPLATE` | Go template for constructing the content to be signed for webhook requests. Only applies to 'default' mode. | `{{.Timestamp.Unix}}.{{.Body}}` | No |
| `DESTINATIONS_WEBHOOK_SIGNATURE_CONTENT_TEMPLATE` | Go template for constructing the content to be signed for webhook requests. Only applies to 'default' mode. | `{{.Body}}` | No |
| `DESTINATIONS_WEBHOOK_SIGNATURE_ENCODING` | Encoding for the signature (e.g., 'hex', 'base64'). Only applies to 'default' mode. | `hex` | No |
| `DESTINATIONS_WEBHOOK_SIGNATURE_HEADER_TEMPLATE` | Go template for the value of the signature header. Only applies to 'default' mode. | `t={{.Timestamp.Unix}},v0={{.Signatures \| join ","}}` | No |
| `DESTINATIONS_WEBHOOK_SIGNATURE_HEADER_TEMPLATE` | Go template for the value of the signature header. Only applies to 'default' mode. | `v0={{.Signatures \| join ","}}` | No |
| `DESTINATION_METADATA_PATH` | Path to the directory containing custom destination type definitions. Overrides 'destinations.metadata_path' if set. | `nil` | No |
| `DISABLE_TELEMETRY` | Global flag to disable all telemetry (anonymous usage statistics to Hookdeck and error reporting to Sentry). If true, overrides 'telemetry.disabled'. | `false` | No |
| `GCP_PUBSUB_DELIVERY_SUBSCRIPTION` | Name of the GCP Pub/Sub subscription for delivery events. | `outpost-delivery-sub` | No |
Expand Down Expand Up @@ -227,13 +227,13 @@ destinations:
signature_algorithm: "hmac-sha256"

# Go template for constructing the content to be signed for webhook requests. Only applies to 'default' mode.
signature_content_template: "{{.Timestamp.Unix}}.{{.Body}}"
signature_content_template: "{{.Body}}"

# Encoding for the signature (e.g., 'hex', 'base64'). Only applies to 'default' mode.
signature_encoding: "hex"

# Go template for the value of the signature header. Only applies to 'default' mode.
signature_header_template: "t={{.Timestamp.Unix}},v0={{.Signatures | join \",\"}}"
signature_header_template: "v0={{.Signatures | join \",\"}}"



Expand Down
4 changes: 2 additions & 2 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ func (c *Config) InitDefaults() {
MetadataPath: "config/outpost/destinations",
Webhook: DestinationWebhookConfig{
HeaderPrefix: "x-outpost-",
SignatureContentTemplate: "{{.Timestamp.Unix}}.{{.Body}}",
SignatureHeaderTemplate: "t={{.Timestamp.Unix}},v0={{.Signatures | join \",\"}}",
SignatureContentTemplate: "{{.Body}}",
SignatureHeaderTemplate: "v0={{.Signatures | join \",\"}}",
SignatureEncoding: "hex",
SignatureAlgorithm: "hmac-sha256",
},
Expand Down
Loading