Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Merge remote-tracking branch 'origin/main' into PLATFOR-638

Calvinbd6e0b7541fa
diff --cc docs/documentation/platform/pki/applications/alerting/webhook-alerts.mdx
index 26393fe055,b73bdb4413..77321a4057
--- a/docs/documentation/platform/pki/applications/alerting/webhook-alerts.mdx
+++ b/docs/documentation/platform/pki/applications/alerting/webhook-alerts.mdx
@@@ -10,60 -25,36 +25,64 @@@ A webhook channel on a certificate [ale
<Steps>
<Step>
- [Create an alert](/documentation/platform/pki/applications/alerting/overview#create-an-alert) in your application, or edit an existing one.
- </Step>
- <Step>
- Select **Add Channel** > **Webhook** and enter the **URL** of your endpoint. The URL must use HTTPS.
+ Select **Add Channel** > **Webhook** and enter your endpoint's **URL**. The URL must use HTTPS.
</Step>
<Step>
- Optionally, enter a **Signing secret** so your endpoint can [verify the signature](#verify-the-signature) of each request.
+ If your endpoint requires authentication, under **Authentication**, select **Bearer Token**, **Basic Auth**, or **API Key**, and enter the [credentials](#authentication) it expects.
+ </Step>
+ <Step>
+ Optionally, select **Add Signing Secret** and enter a secret, so your endpoint can [verify the signature](#verify-the-signature) of each request.
+ </Step>
+ <Step>
+ Optionally, select **Add Header** to send [custom headers](#custom-headers) with each request.
</Step>
<Step>
- Optionally, select **Send test** to send a test notification to the channel.
+ Optionally, select **Send test** to send a test request to your endpoint.
</Step>
<Step>
Select **Continue**, check the **Review** step, and select **Create Alert**.
</Step>
</Steps>
+ <Check>
+ Your alert is set up. Infisical sends a POST request to your endpoint whenever the alert fires.
+ </Check>
+
+## Authentication
+
+A channel can have one authentication method, which Infisical sends as a header on each request:
+
+| Type | What you enter | Header that Infisical sends |
+|------|----------------|-----------------------------|
+| **Bearer Token** | A token | `Authorization: Bearer <token>` |
+| **Basic Auth** | A username and a password | `Authorization: Basic <base64 of username:password>` |
+| **API Key** | A header name, such as `X-API-Key`, and the key | `<header name>: <key>` |
+
+For an `Authorization` scheme other than `Bearer`, such as `GenieKey <key>`, select **API Key**, enter `Authorization` as the header name, and enter the full value, including the scheme.
+
+Infisical doesn't show saved credentials again. When you edit the channel, leave a field blank to keep its saved value. If you change the URL, enter the credentials again, because Infisical only sends them to the URL they were saved with.
+
+## Custom headers
+
+Infisical sends custom headers with each request, such as an `X-Env` header your endpoint uses to route alerts:
+
+- Anyone who can view the alert can see header values, so put credentials, including any `Authorization` header, in [authentication](#authentication)
+- A channel can have up to 20 custom headers, and header names, values, and authentication credentials can total up to 4,096 characters
+- Infisical sets `Content-Type`, `Content-Length`, `Transfer-Encoding`, `Connection`, `Host`, and `x-infisical-signature` itself, so you can't add them
+
## Webhook event types
- Each request is a [CloudEvents](https://cloudevents.io/) JSON payload. The `type` and `subject` fields name the event:
+ Each request is a [CloudEvents](https://cloudevents.io/) JSON payload. The `type` field names the event, and application alerts and Certificate Manager alerts use different values:
- | Event | `type` | `subject` |
- |-------|--------|-----------|
- | Expiration | `com.infisical.cert-manager.application.certificate.expiry` | `cert-manager.application.certificate.expiry` |
- | Issuance | `com.infisical.cert-manager.application.certificate.issuance` | `cert-manager.application.certificate.issuance` |
- | Renewal | `com.infisical.cert-manager.application.certificate.renewal` | `cert-manager.application.certificate.renewal` |
- | Revocation | `com.infisical.cert-manager.application.certificate.revocation` | `cert-manager.application.certificate.revocation` |
+ | Event | Application alert `type` | Certificate Manager alert `type` |
+ |-------|--------------------------|----------------------------------|
+ | Expiration | `com.infisical.cert-manager.application.certificate.expiry` | `com.infisical.cert-manager.certificate.expiry` |
+ | Issuance | `com.infisical.cert-manager.application.certificate.issuance` | `com.infisical.cert-manager.certificate.issuance` |
+ | Renewal | `com.infisical.cert-manager.application.certificate.renewal` | `com.infisical.cert-manager.certificate.renewal` |
+ | Revocation | `com.infisical.cert-manager.application.certificate.revocation` | `com.infisical.cert-manager.certificate.revocation` |
+ | Signer certificate expiration | Not available | `com.infisical.cert-manager.signer.certificate.expiry` |
+
+ The `subject` field is the same value without the `com.infisical.` prefix.
## Webhook payload format