Skip to content

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

Address PR comments

Carlos Monastyrski5fec51ce7ffb
diff --git a/docs/documentation/platform/pki/applications/alerting/email-alerts.mdx b/docs/documentation/platform/pki/applications/alerting/email-alerts.mdx
index 3fc47e5c81..7787dbf83e 100644
--- a/docs/documentation/platform/pki/applications/alerting/email-alerts.mdx
+++ b/docs/documentation/platform/pki/applications/alerting/email-alerts.mdx
@@ -4,8 +4,8 @@ sidebarTitle: "Email"
description: "Send certificate alert notifications by email."
---
-import StartApplicationAlert from "/snippets/documentation/platform/pki/applications/alerting/start-application-alert.mdx";
-import StartCertManagementAlert from "/snippets/documentation/platform/pki/applications/alerting/start-cert-management-alert.mdx";
+import AlertApiFields from "/snippets/documentation/platform/pki/applications/alerting/alert-api-fields.mdx";
+import StartAlert from "/snippets/documentation/platform/pki/applications/alerting/start-alert.mdx";
An email channel on a certificate [alert](/documentation/platform/pki/applications/alerting/overview) emails the recipients you choose whenever the alert fires. Email channels are available on every plan.
@@ -15,116 +15,84 @@ An email channel on a certificate [alert](/documentation/platform/pki/applicatio
## Prerequisites
-- The Certificate Management **Admin** role to create a Certificate Management alert, or the **Admin** [application role](/documentation/platform/pki/applications/overview#application-roles) to create an application alert
+- The Certificate Management **Admin** role to create an organization-wide alert, or the **Admin** [application role](/documentation/platform/pki/applications/overview#application-roles) to create an application alert
- Recipients who are organization members, or addresses on one of your organization's [verified email domains](/documentation/platform/email-domain)
## Create the alert
<Tabs>
- <Tab title="Certificate Management">
- <Tabs>
- <Tab title="Infisical UI">
- <StartCertManagementAlert />
-
- On the **Channels** step, add the email channel:
-
- <Steps>
- <Step>
- Select **Add Channel** > **Email**.
- </Step>
- <Step>
- In **Recipients**, select organization members, or type an address on one of your organization's verified email domains and add it.
- </Step>
- <Step>
- Optionally, select **Send test** to send a test email to the recipients.
- </Step>
- <Step>
- Select **Continue**, check the **Review** step, and select **Create Alert**.
- </Step>
- </Steps>
- </Tab>
- <Tab title="API">
- Send a request to the create alert endpoint with an `email` channel. To choose the alert's event and settings, see [Create an alert through the API](/documentation/platform/pki/applications/alerting/overview#create-an-alert-through-the-api).
-
- Each entry in the channel's `recipients` array is one of these:
-
- - An organization member, with `principalType` set to `user` and `principalId` set to the member's `user.id` from [the get user memberships endpoint](/api-reference/endpoints/organizations/memberships)
- - An address on one of your organization's verified email domains, with `principalType` set to `email` and `principalId` set to the address
-
- ```bash Request
- curl --request POST \
- --url https://app.infisical.com/api/v1/alerts \
- --header 'Authorization: Bearer <access-token>' \
- --header 'Content-Type: application/json' \
- --data '{
- "name": "issued-certificates-expiring",
- "resourceType": "cert-manager",
- "eventType": "cert-manager.certificate.expiry",
- "condition": { "alertBefore": "30d", "sources": ["issued"] },
- "channels": [
- {
- "name": "platform-team",
- "channelType": "email",
- "recipients": [{ "principalType": "email", "principalId": "[email protected]" }]
- }
- ]
- }'
- ```
- </Tab>
- </Tabs>
+ <Tab title="Infisical UI">
+ <StartAlert />
+
+ On the **Channels** step, add the email channel:
+
+ <Steps>
+ <Step>
+ Select **Add Channel** > **Email**.
+ </Step>
+ <Step>
+ In **Recipients**, select organization members, or type an address on one of your organization's verified email domains and add it.
+ </Step>
+ <Step>
+ Optionally, select **Send test** to send a test email to the recipients.
+ </Step>
+ <Step>
+ Select **Continue**, check the **Review** step, and select **Create Alert**.
+ </Step>
+ </Steps>
</Tab>
- <Tab title="Application">
- <Tabs>
- <Tab title="Infisical UI">
- <StartApplicationAlert />
-
- On the **Channels** step, add the email channel:
-
- <Steps>
- <Step>
- Select **Add Channel** > **Email**.
- </Step>
- <Step>
- In **Recipients**, select organization members, or type an address on one of your organization's verified email domains and add it.
- </Step>
- <Step>
- Optionally, select **Send test** to send a test email to the recipients.
- </Step>
- <Step>
- Select **Continue**, check the **Review** step, and select **Create Alert**.
- </Step>
- </Steps>
- </Tab>
- <Tab title="API">
- Send a request to the create alert endpoint with an `email` channel. To choose the alert's event and settings, see [Create an alert through the API](/documentation/platform/pki/applications/alerting/overview#create-an-alert-through-the-api).
-
- Each entry in the channel's `recipients` array is one of these:
-
- - An organization member, with `principalType` set to `user` and `principalId` set to the member's `user.id` from [the get user memberships endpoint](/api-reference/endpoints/organizations/memberships)
- - An address on one of your organization's verified email domains, with `principalType` set to `email` and `principalId` set to the address
-
- ```bash Request
- curl --request POST \
- --url https://app.infisical.com/api/v1/alerts \
- --header 'Authorization: Bearer <access-token>' \
- --header 'Content-Type: application/json' \
- --data '{
- "name": "payments-api-expiring",
- "resourceType": "cert-manager.application",
- "resourceId": "<application-id>",
- "eventType": "cert-manager.application.certificate.expiry",
- "condition": { "alertBefore": "30d" },
- "channels": [
- {
- "name": "payments-team",
- "channelType": "email",
- "recipients": [{ "principalType": "email", "principalId": "[email protected]" }]
- }
- ]
- }'
- ```
- </Tab>
- </Tabs>
+ <Tab title="API">
+ Send a request to the create alert endpoint with an [access token](/api-reference/overview/authentication) and an `email` channel.
+
+ <AlertApiFields />
+
+ Each entry in the channel's `recipients` array is one of these:
+
+ - An organization member, with `principalType` set to `user` and `principalId` set to the member's `user.id` from [the get user memberships endpoint](/api-reference/endpoints/organizations/memberships)
+ - An address on one of your organization's verified email domains, with `principalType` set to `email` and `principalId` set to the address
+
+ <CodeGroup>
+ ```bash Organization-wide
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/alerts \
+ --header 'Authorization: Bearer <access-token>' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "issued-certificates-expiring",
+ "resourceType": "cert-manager",
+ "eventType": "cert-manager.certificate.expiry",
+ "condition": { "alertBefore": "30d", "sources": ["issued"] },
+ "channels": [
+ {
+ "name": "platform-team",
+ "channelType": "email",
+ "recipients": [{ "principalType": "email", "principalId": "[email protected]" }]
+ }
+ ]
+ }'
+ ```
+
+ ```bash Application
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/alerts \
+ --header 'Authorization: Bearer <access-token>' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "payments-api-expiring",
+ "resourceType": "cert-manager.application",
+ "resourceId": "<application-id>",
+ "eventType": "cert-manager.application.certificate.expiry",
+ "condition": { "alertBefore": "30d" },
+ "channels": [
+ {
+ "name": "payments-team",
+ "channelType": "email",
+ "recipients": [{ "principalType": "email", "principalId": "[email protected]" }]
+ }
+ ]
+ }'
+ ```
+ </CodeGroup>
</Tab>
</Tabs>
diff --git a/docs/documentation/platform/pki/applications/alerting/overview.mdx b/docs/documentation/platform/pki/applications/alerting/overview.mdx
index 3101540f38..e288f0f762 100644
--- a/docs/documentation/platform/pki/applications/alerting/overview.mdx
+++ b/docs/documentation/platform/pki/applications/alerting/overview.mdx
@@ -1,7 +1,7 @@
---
title: "Certificate alerts"
sidebarTitle: "Alerts"
-description: "Get notified when certificates expire, are issued, renewed, or revoked, across Certificate Management or in one application."
+description: "Get notified when certificates expire, are issued, renewed, or revoked, across your organization or in one application."
---
An alert notifies your team when a certificate is about to expire, or when a certificate is issued, renewed, or revoked. Each alert watches for one of these events and sends a notification to up to 10 channels. To create an alert, follow the guide for the channel you want to notify:
@@ -25,22 +25,22 @@ Infisical checks for expiring certificates once a day, and sends issuance, renew
## Choose where to create an alert
-You can create an alert for all of Infisical Certificate Management or for one [application](/documentation/platform/pki/applications/overview):
+You can create an organization-wide alert, which covers all of Infisical Certificate Management, or an alert for one [application](/documentation/platform/pki/applications/overview):
-| | Certificate Management alert | Application alert |
+| | Organization-wide alert | Application alert |
| --- | --- | --- |
-| Covers | Every certificate in Infisical Certificate Management, or the ones that match its [filters](#filter-a-certificate-management-alert) | Every certificate in the application |
+| Covers | Every certificate in Infisical Certificate Management, or the ones that match its [filters](#filter-an-organization-wide-alert) | Every certificate in the application |
| Created in | **Certificate Manager** > **Settings** > **Alerts** | The application's **Settings** tab |
| Who can create it | The Certificate Management **Admin** role | The **Admin** [application role](/documentation/platform/pki/applications/overview#application-roles) |
| Events | Certificate events, plus [signer certificate expiration](#signer-certificate-expiration) for code signing | Certificate events, with one alert for each event |
-Use an application alert when one team owns the certificates and wants its own notifications. Use a Certificate Management alert to cover several applications at once, or certificates that don't belong to an application, such as imported or discovered certificates.
+Use an application alert when one team owns the certificates and wants its own notifications. Use an organization-wide alert to cover several applications at once, or certificates that don't belong to an application, such as imported or discovered certificates.
If you delete an application, Infisical deletes its alerts too.
-## Filter a Certificate Management alert
+## Filter an organization-wide alert
-Without filters, a Certificate Management alert covers every certificate in Infisical Certificate Management. Each filter you add narrows the alert, and a certificate must match every filter:
+Without filters, an organization-wide alert covers every certificate in Infisical Certificate Management. Each filter you add narrows the alert, and a certificate must match every filter:
| Filter | Certificates covered |
|--------|----------------------|
@@ -65,7 +65,7 @@ An expiration alert keeps notifying you about the same certificate until the cer
## Signer certificate expiration
-A **Signer Certificate Expiration** alert, in the **Code Signing** group, warns you before a [signer's](/documentation/platform/pki/code-signing/signers) current certificate expires. You can only create it as a Certificate Management alert. Otherwise, it works like a certificate expiration alert.
+A **Signer Certificate Expiration** alert, in the **Code Signing** group, warns you before a [signer's](/documentation/platform/pki/code-signing/signers) current certificate expires. You can only create it as an organization-wide alert. Otherwise, it works like a certificate expiration alert.
Without filters, the alert covers every active signer under **Code Signing** > **Signers**. To cover only some signers, add a **Signers** filter in the **Filters** step and select up to 100 signers. Signer alerts also differ from certificate alerts in these ways:
@@ -73,32 +73,3 @@ Without filters, the alert covers every active signer under **Code Signing** > *
- When you reissue a signer's certificate, the alert follows the new certificate and stops alerting on the one it replaced
- If several signers share a certificate, the notification names only the ones the filter selects
- If you delete a signer that the filter lists, the **Filters** step shows it as **Unknown signer** when you edit the alert, so you can remove it
-
-## Create an alert through the API
-
-To create an alert from a script, send a request to the create alert endpoint with an [access token](/api-reference/overview/authentication). The request sets which certificates the alert covers and which event it watches:
-
-| Alert | `resourceType` | `resourceId` | `eventType` |
-| --- | --- | --- | --- |
-| Certificate Management | `cert-manager` | Leave out | `cert-manager.certificate.expiry`, `cert-manager.certificate.issuance`, `cert-manager.certificate.renewal`, or `cert-manager.certificate.revocation` |
-| Application | `cert-manager.application` | The application's ID | `cert-manager.application.certificate.expiry`, `cert-manager.application.certificate.issuance`, `cert-manager.application.certificate.renewal`, or `cert-manager.application.certificate.revocation` |
-| Signer certificate expiration | `cert-manager.signer` | Leave out | `cert-manager.signer.certificate.expiry` |
-
-To find an application's ID, call [the list applications endpoint](/api-reference/endpoints/pki/applications/configuration/list).
-
-For a full request, see the API tab in the [email](/documentation/platform/pki/applications/alerting/email-alerts), [Slack](/documentation/platform/pki/applications/alerting/slack-alerts), [PagerDuty](/documentation/platform/pki/applications/alerting/pagerduty-alerts), or [webhook](/documentation/platform/pki/applications/alerting/webhook-alerts) guide.
-
-### Expiration and filter settings
-
-The `condition` object holds the same settings as the **Alert Before** field, the **Repeat daily until expiry** toggle, and the **Filters** step in Infisical:
-
-| Field | Applies to | Value |
-| --- | --- | --- |
-| `alertBefore` | Expiration alerts (required) | A number and a unit, such as `30d` or `2w`, up to 365 days |
-| `dailyReminder` | Expiration alerts | `true` to [repeat the alert every day](#how-often-expiration-alerts-repeat) until the certificate expires |
-| `applicationIds` | Certificate Management alerts | Up to 100 application IDs |
-| `profileIds` | Certificate Management alerts | Up to 100 certificate profile IDs |
-| `sources` | Certificate Management alerts | Any of `issued` (**Managed** in Infisical), `imported`, and `discovered` |
-| `signerIds` | Signer certificate expiration alerts | Up to 100 signer IDs |
-
-For issuance, renewal, and revocation alerts on an application, leave out `condition`.
diff --git a/docs/documentation/platform/pki/applications/alerting/pagerduty-alerts.mdx b/docs/documentation/platform/pki/applications/alerting/pagerduty-alerts.mdx
index 3bce752871..1fca7a1e4d 100644
--- a/docs/documentation/platform/pki/applications/alerting/pagerduty-alerts.mdx
+++ b/docs/documentation/platform/pki/applications/alerting/pagerduty-alerts.mdx
@@ -4,8 +4,8 @@ sidebarTitle: "PagerDuty"
description: "Create PagerDuty incidents for certificate alerts."
---
-import StartApplicationAlert from "/snippets/documentation/platform/pki/applications/alerting/start-application-alert.mdx";
-import StartCertManagementAlert from "/snippets/documentation/platform/pki/applications/alerting/start-cert-management-alert.mdx";
+import AlertApiFields from "/snippets/documentation/platform/pki/applications/alerting/alert-api-fields.mdx";
+import StartAlert from "/snippets/documentation/platform/pki/applications/alerting/start-alert.mdx";
A PagerDuty channel on a certificate [alert](/documentation/platform/pki/applications/alerting/overview) creates PagerDuty incidents through the [Events API v2](https://developer.pagerduty.com/docs/events-api-v2-overview), so your on-call team gets paged when certificates are about to expire or are revoked.
@@ -15,7 +15,7 @@ A PagerDuty channel on a certificate [alert](/documentation/platform/pki/applica
## Prerequisites
-- The Certificate Management **Admin** role to create a Certificate Management alert, or the **Admin** [application role](/documentation/platform/pki/applications/overview#application-roles) to create an application alert
+- The Certificate Management **Admin** role to create an organization-wide alert, or the **Admin** [application role](/documentation/platform/pki/applications/overview#application-roles) to create an application alert
- A PagerDuty account that can create services or add integrations to an existing service
## Step 1: Get a PagerDuty integration key
@@ -43,93 +43,69 @@ A PagerDuty channel on a certificate [alert](/documentation/platform/pki/applica
## Step 2: Create the alert
<Tabs>
- <Tab title="Certificate Management">
- <Tabs>
- <Tab title="Infisical UI">
- <StartCertManagementAlert />
-
- On the **Channels** step, add the PagerDuty channel:
-
- <Steps>
- <Step>
- Select **Add Channel** > **PagerDuty** and paste the key from [step 1](#step-1-get-a-pagerduty-integration-key) into **Integration key**.
- </Step>
- <Step>
- Optionally, select **Send test** to send a test event to the PagerDuty service.
- </Step>
- <Step>
- Select **Continue**, check the **Review** step, and select **Create Alert**.
- </Step>
- </Steps>
- </Tab>
- <Tab title="API">
- Send a request to the create alert endpoint with a `pagerduty` channel, and set `integrationKey` in the channel's `config` to the key from [step 1](#step-1-get-a-pagerduty-integration-key). To choose the alert's event and settings, see [Create an alert through the API](/documentation/platform/pki/applications/alerting/overview#create-an-alert-through-the-api).
-
- ```bash Request
- curl --request POST \
- --url https://app.infisical.com/api/v1/alerts \
- --header 'Authorization: Bearer <access-token>' \
- --header 'Content-Type: application/json' \
- --data '{
- "name": "certificates-expiring-this-month",
- "resourceType": "cert-manager",
- "eventType": "cert-manager.certificate.expiry",
- "condition": { "alertBefore": "30d", "dailyReminder": true },
- "channels": [
- {
- "name": "pki-on-call",
- "channelType": "pagerduty",
- "config": { "integrationKey": "<integration-key>" }
- }
- ]
- }'
- ```
- </Tab>
- </Tabs>
+ <Tab title="Infisical UI">
+ <StartAlert />
+
+ On the **Channels** step, add the PagerDuty channel:
+
+ <Steps>
+ <Step>
+ Select **Add Channel** > **PagerDuty** and paste the key from [step 1](#step-1-get-a-pagerduty-integration-key) into **Integration key**.
+ </Step>
+ <Step>
+ Optionally, select **Send test** to send a test event to the PagerDuty service.
+ </Step>
+ <Step>
+ Select **Continue**, check the **Review** step, and select **Create Alert**.
+ </Step>
+ </Steps>
</Tab>
- <Tab title="Application">
- <Tabs>
- <Tab title="Infisical UI">
- <StartApplicationAlert />
-
- On the **Channels** step, add the PagerDuty channel:
-
- <Steps>
- <Step>
- Select **Add Channel** > **PagerDuty** and paste the key from [step 1](#step-1-get-a-pagerduty-integration-key) into **Integration key**.
- </Step>
- <Step>
- Optionally, select **Send test** to send a test event to the PagerDuty service.
- </Step>
- <Step>
- Select **Continue**, check the **Review** step, and select **Create Alert**.
- </Step>
- </Steps>
- </Tab>
- <Tab title="API">
- Send a request to the create alert endpoint with a `pagerduty` channel, and set `integrationKey` in the channel's `config` to the key from [step 1](#step-1-get-a-pagerduty-integration-key). To choose the alert's event and settings, see [Create an alert through the API](/documentation/platform/pki/applications/alerting/overview#create-an-alert-through-the-api).
-
- ```bash Request
- curl --request POST \
- --url https://app.infisical.com/api/v1/alerts \
- --header 'Authorization: Bearer <access-token>' \
- --header 'Content-Type: application/json' \
- --data '{
- "name": "payments-api-revocations",
- "resourceType": "cert-manager.application",
- "resourceId": "<application-id>",
- "eventType": "cert-manager.application.certificate.revocation",
- "channels": [
- {
- "name": "payments-on-call",
- "channelType": "pagerduty",
- "config": { "integrationKey": "<integration-key>" }
- }
- ]
- }'
- ```
- </Tab>
- </Tabs>
+ <Tab title="API">
+ Send a request to the create alert endpoint with an [access token](/api-reference/overview/authentication) and a `pagerduty` channel, and set `integrationKey` in the channel's `config` to the key from [step 1](#step-1-get-a-pagerduty-integration-key).
+
+ <AlertApiFields />
+
+ <CodeGroup>
+ ```bash Organization-wide
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/alerts \
+ --header 'Authorization: Bearer <access-token>' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "certificates-expiring-this-month",
+ "resourceType": "cert-manager",
+ "eventType": "cert-manager.certificate.expiry",
+ "condition": { "alertBefore": "30d", "dailyReminder": true },
+ "channels": [
+ {
+ "name": "pki-on-call",
+ "channelType": "pagerduty",
+ "config": { "integrationKey": "<integration-key>" }
+ }
+ ]
+ }'
+ ```
+
+ ```bash Application
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/alerts \
+ --header 'Authorization: Bearer <access-token>' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "payments-api-revocations",
+ "resourceType": "cert-manager.application",
+ "resourceId": "<application-id>",
+ "eventType": "cert-manager.application.certificate.revocation",
+ "channels": [
+ {
+ "name": "payments-on-call",
+ "channelType": "pagerduty",
+ "config": { "integrationKey": "<integration-key>" }
+ }
+ ]
+ }'
+ ```
+ </CodeGroup>
</Tab>
</Tabs>
diff --git a/docs/documentation/platform/pki/applications/alerting/slack-alerts.mdx b/docs/documentation/platform/pki/applications/alerting/slack-alerts.mdx
index 79c76191b7..65ed59a833 100644
--- a/docs/documentation/platform/pki/applications/alerting/slack-alerts.mdx
+++ b/docs/documentation/platform/pki/applications/alerting/slack-alerts.mdx
@@ -4,8 +4,8 @@ sidebarTitle: "Slack"
description: "Send certificate alert notifications to a Slack channel."
---
-import StartApplicationAlert from "/snippets/documentation/platform/pki/applications/alerting/start-application-alert.mdx";
-import StartCertManagementAlert from "/snippets/documentation/platform/pki/applications/alerting/start-cert-management-alert.mdx";
+import AlertApiFields from "/snippets/documentation/platform/pki/applications/alerting/alert-api-fields.mdx";
+import StartAlert from "/snippets/documentation/platform/pki/applications/alerting/start-alert.mdx";
A Slack channel on a certificate [alert](/documentation/platform/pki/applications/alerting/overview) posts to a Slack channel through an [Incoming Webhook](https://api.slack.com/messaging/webhooks) whenever the alert fires.
@@ -15,7 +15,7 @@ A Slack channel on a certificate [alert](/documentation/platform/pki/application
## Prerequisites
-- The Certificate Management **Admin** role to create a Certificate Management alert, or the **Admin** [application role](/documentation/platform/pki/applications/overview#application-roles) to create an application alert
+- The Certificate Management **Admin** role to create an organization-wide alert, or the **Admin** [application role](/documentation/platform/pki/applications/overview#application-roles) to create an application alert
- A Slack workspace where you can create apps
## Step 1: Create a Slack incoming webhook
@@ -45,93 +45,69 @@ A Slack channel on a certificate [alert](/documentation/platform/pki/application
## Step 2: Create the alert
<Tabs>
- <Tab title="Certificate Management">
- <Tabs>
- <Tab title="Infisical UI">
- <StartCertManagementAlert />
-
- On the **Channels** step, add the Slack channel:
-
- <Steps>
- <Step>
- Select **Add Channel** > **Slack** and paste the URL from [step 1](#step-1-create-a-slack-incoming-webhook) into **Webhook URL**. The URL must start with `https://hooks.slack.com`.
- </Step>
- <Step>
- Optionally, select **Send test** to send a test message to the Slack channel.
- </Step>
- <Step>
- Select **Continue**, check the **Review** step, and select **Create Alert**.
- </Step>
- </Steps>
- </Tab>
- <Tab title="API">
- Send a request to the create alert endpoint with a `slack` channel, and set `webhookUrl` in the channel's `config` to the URL from [step 1](#step-1-create-a-slack-incoming-webhook). To choose the alert's event and settings, see [Create an alert through the API](/documentation/platform/pki/applications/alerting/overview#create-an-alert-through-the-api).
-
- ```bash Request
- curl --request POST \
- --url https://app.infisical.com/api/v1/alerts \
- --header 'Authorization: Bearer <access-token>' \
- --header 'Content-Type: application/json' \
- --data '{
- "name": "certificate-revocations",
- "resourceType": "cert-manager",
- "eventType": "cert-manager.certificate.revocation",
- "channels": [
- {
- "name": "pki-alerts",
- "channelType": "slack",
- "config": { "webhookUrl": "<slack-webhook-url>" }
- }
- ]
- }'
- ```
- </Tab>
- </Tabs>
+ <Tab title="Infisical UI">
+ <StartAlert />
+
+ On the **Channels** step, add the Slack channel:
+
+ <Steps>
+ <Step>
+ Select **Add Channel** > **Slack** and paste the URL from [step 1](#step-1-create-a-slack-incoming-webhook) into **Webhook URL**. The URL must start with `https://hooks.slack.com`.
+ </Step>
+ <Step>
+ Optionally, select **Send test** to send a test message to the Slack channel.
+ </Step>
+ <Step>
+ Select **Continue**, check the **Review** step, and select **Create Alert**.
+ </Step>
+ </Steps>
</Tab>
- <Tab title="Application">
- <Tabs>
- <Tab title="Infisical UI">
- <StartApplicationAlert />
-
- On the **Channels** step, add the Slack channel:
-
- <Steps>
- <Step>
- Select **Add Channel** > **Slack** and paste the URL from [step 1](#step-1-create-a-slack-incoming-webhook) into **Webhook URL**. The URL must start with `https://hooks.slack.com`.
- </Step>
- <Step>
- Optionally, select **Send test** to send a test message to the Slack channel.
- </Step>
- <Step>
- Select **Continue**, check the **Review** step, and select **Create Alert**.
- </Step>
- </Steps>
- </Tab>
- <Tab title="API">
- Send a request to the create alert endpoint with a `slack` channel, and set `webhookUrl` in the channel's `config` to the URL from [step 1](#step-1-create-a-slack-incoming-webhook). To choose the alert's event and settings, see [Create an alert through the API](/documentation/platform/pki/applications/alerting/overview#create-an-alert-through-the-api).
-
- ```bash Request
- curl --request POST \
- --url https://app.infisical.com/api/v1/alerts \
- --header 'Authorization: Bearer <access-token>' \
- --header 'Content-Type: application/json' \
- --data '{
- "name": "payments-api-expiring",
- "resourceType": "cert-manager.application",
- "resourceId": "<application-id>",
- "eventType": "cert-manager.application.certificate.expiry",
- "condition": { "alertBefore": "30d" },
- "channels": [
- {
- "name": "payments-alerts",
- "channelType": "slack",
- "config": { "webhookUrl": "<slack-webhook-url>" }
- }
- ]
- }'
- ```
- </Tab>
- </Tabs>
+ <Tab title="API">
+ Send a request to the create alert endpoint with an [access token](/api-reference/overview/authentication) and a `slack` channel, and set `webhookUrl` in the channel's `config` to the URL from [step 1](#step-1-create-a-slack-incoming-webhook).
+
+ <AlertApiFields />
+
+ <CodeGroup>
+ ```bash Organization-wide
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/alerts \
+ --header 'Authorization: Bearer <access-token>' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "certificate-revocations",
+ "resourceType": "cert-manager",
+ "eventType": "cert-manager.certificate.revocation",
+ "channels": [
+ {
+ "name": "pki-alerts",
+ "channelType": "slack",
+ "config": { "webhookUrl": "<slack-webhook-url>" }
+ }
+ ]
+ }'
+ ```
+
+ ```bash Application
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/alerts \
+ --header 'Authorization: Bearer <access-token>' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "payments-api-expiring",
+ "resourceType": "cert-manager.application",
+ "resourceId": "<application-id>",
+ "eventType": "cert-manager.application.certificate.expiry",
+ "condition": { "alertBefore": "30d" },
+ "channels": [
+ {
+ "name": "payments-alerts",
+ "channelType": "slack",
+ "config": { "webhookUrl": "<slack-webhook-url>" }
+ }
+ ]
+ }'
+ ```
+ </CodeGroup>
</Tab>
</Tabs>
@@ -141,7 +117,7 @@ A Slack channel on a certificate [alert](/documentation/platform/pki/application
## Message format
-Each Slack message includes the alert's summary, up to two certificates, and a **View in Infisical** button. For an application alert, the button opens the application. For a Certificate Management alert, it opens the **Inventory** page, or the **Signers** page for a signer certificate expiration alert. The message color shows the alert's severity:
+Each Slack message includes the alert's summary, up to two certificates, and a **View in Infisical** button. For an application alert, the button opens the application. For an organization-wide alert, it opens the **Inventory** page, or the **Signers** page for a signer certificate expiration alert. The message color shows the alert's severity:
| Color | Severity | When |
|-------|----------|------|
diff --git a/docs/documentation/platform/pki/applications/alerting/webhook-alerts.mdx b/docs/documentation/platform/pki/applications/alerting/webhook-alerts.mdx
index b3a90eefc1..90419cd112 100644
--- a/docs/documentation/platform/pki/applications/alerting/webhook-alerts.mdx
+++ b/docs/documentation/platform/pki/applications/alerting/webhook-alerts.mdx
@@ -4,8 +4,8 @@ sidebarTitle: "Webhook"
description: "Send certificate alert notifications to a webhook URL."
---
-import StartApplicationAlert from "/snippets/documentation/platform/pki/applications/alerting/start-application-alert.mdx";
-import StartCertManagementAlert from "/snippets/documentation/platform/pki/applications/alerting/start-cert-management-alert.mdx";
+import AlertApiFields from "/snippets/documentation/platform/pki/applications/alerting/alert-api-fields.mdx";
+import StartAlert from "/snippets/documentation/platform/pki/applications/alerting/start-alert.mdx";
A webhook channel on a certificate [alert](/documentation/platform/pki/applications/alerting/overview) sends an HTTP POST request to your endpoint whenever the alert fires. Use a webhook to connect certificate alerts to your own systems or to services Infisical doesn't support directly.
@@ -15,146 +15,105 @@ A webhook channel on a certificate [alert](/documentation/platform/pki/applicati
## Prerequisites
-- The Certificate Management **Admin** role to create a Certificate Management alert, or the **Admin** [application role](/documentation/platform/pki/applications/overview#application-roles) to create an application alert
+- The Certificate Management **Admin** role to create an organization-wide alert, or the **Admin** [application role](/documentation/platform/pki/applications/overview#application-roles) to create an application alert
- An HTTPS endpoint that accepts POST requests
## Create the alert
<Tabs>
- <Tab title="Certificate Management">
- <Tabs>
- <Tab title="Infisical UI">
- <StartCertManagementAlert />
-
- On the **Channels** step, add the webhook channel:
-
- <Steps>
- <Step>
- Select **Add Channel** > **Webhook** and enter your endpoint's **URL**. The URL must use HTTPS.
- </Step>
- <Step>
- 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 request to your endpoint.
- </Step>
- <Step>
- Select **Continue**, check the **Review** step, and select **Create Alert**.
- </Step>
- </Steps>
- </Tab>
- <Tab title="API">
- Send a request to the create alert endpoint with a `webhook` channel. To choose the alert's event and settings, see [Create an alert through the API](/documentation/platform/pki/applications/alerting/overview#create-an-alert-through-the-api). The channel's `config` takes these fields:
-
- | Field | Value |
- | --- | --- |
- | `url` (required) | Your endpoint's HTTPS URL |
- | `authType` | `bearer` (**Bearer Token**), `basic` (**Basic Auth**), or `header` (**API Key**), for [authentication](#authentication) |
- | `authCredentials` | The token, if `authType` is `bearer` |
- | `basicUsername`, `basicPassword` | The username and password, if `authType` is `basic` |
- | `authHeaderName`, `authHeaderValue` | The header name and the API key, if `authType` is `header` |
- | `signingSecret` | A secret to [sign each request](#verify-the-signature) with |
- | `headers` | [Custom headers](#custom-headers), as an array of `{ "key": "<name>", "value": "<value>" }` objects |
-
- ```bash Request
- curl --request POST \
- --url https://app.infisical.com/api/v1/alerts \
- --header 'Authorization: Bearer <access-token>' \
- --header 'Content-Type: application/json' \
- --data '{
- "name": "imported-certificates-expiring",
- "resourceType": "cert-manager",
- "eventType": "cert-manager.certificate.expiry",
- "condition": { "alertBefore": "30d", "sources": ["imported"] },
- "channels": [
- {
- "name": "certificate-inventory",
- "channelType": "webhook",
- "config": {
- "url": "https://alerts.example.com/infisical",
- "authType": "bearer",
- "authCredentials": "<token>",
- "signingSecret": "<signing-secret>"
- }
- }
- ]
- }'
- ```
- </Tab>
- </Tabs>
+ <Tab title="Infisical UI">
+ <StartAlert />
+
+ On the **Channels** step, add the webhook channel:
+
+ <Steps>
+ <Step>
+ Select **Add Channel** > **Webhook** and enter your endpoint's **URL**. The URL must use HTTPS.
+ </Step>
+ <Step>
+ 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 request to your endpoint.
+ </Step>
+ <Step>
+ Select **Continue**, check the **Review** step, and select **Create Alert**.
+ </Step>
+ </Steps>
</Tab>
- <Tab title="Application">
- <Tabs>
- <Tab title="Infisical UI">
- <StartApplicationAlert />
-
- On the **Channels** step, add the webhook channel:
-
- <Steps>
- <Step>
- Select **Add Channel** > **Webhook** and enter your endpoint's **URL**. The URL must use HTTPS.
- </Step>
- <Step>
- 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 request to your endpoint.
- </Step>
- <Step>
- Select **Continue**, check the **Review** step, and select **Create Alert**.
- </Step>
- </Steps>
- </Tab>
- <Tab title="API">
- Send a request to the create alert endpoint with a `webhook` channel. To choose the alert's event and settings, see [Create an alert through the API](/documentation/platform/pki/applications/alerting/overview#create-an-alert-through-the-api). The channel's `config` takes these fields:
-
- | Field | Value |
- | --- | --- |
- | `url` (required) | Your endpoint's HTTPS URL |
- | `authType` | `bearer` (**Bearer Token**), `basic` (**Basic Auth**), or `header` (**API Key**), for [authentication](#authentication) |
- | `authCredentials` | The token, if `authType` is `bearer` |
- | `basicUsername`, `basicPassword` | The username and password, if `authType` is `basic` |
- | `authHeaderName`, `authHeaderValue` | The header name and the API key, if `authType` is `header` |
- | `signingSecret` | A secret to [sign each request](#verify-the-signature) with |
- | `headers` | [Custom headers](#custom-headers), as an array of `{ "key": "<name>", "value": "<value>" }` objects |
-
- ```bash Request
- curl --request POST \
- --url https://app.infisical.com/api/v1/alerts \
- --header 'Authorization: Bearer <access-token>' \
- --header 'Content-Type: application/json' \
- --data '{
- "name": "payments-api-renewals",
- "resourceType": "cert-manager.application",
- "resourceId": "<application-id>",
- "eventType": "cert-manager.application.certificate.renewal",
- "channels": [
- {
- "name": "payments-deploy-hook",
- "channelType": "webhook",
- "config": {
- "url": "https://deploy.example.com/hooks/certificate-renewed",
- "signingSecret": "<signing-secret>",
- "headers": [{ "key": "X-Env", "value": "production" }]
- }
- }
- ]
- }'
- ```
- </Tab>
- </Tabs>
+ <Tab title="API">
+ Send a request to the create alert endpoint with an [access token](/api-reference/overview/authentication) and a `webhook` channel.
+
+ <AlertApiFields />
+
+ The channel's `config` takes these fields:
+
+ | Field | Value |
+ | --- | --- |
+ | `url` (required) | Your endpoint's HTTPS URL |
+ | `authType` | `bearer` (**Bearer Token**), `basic` (**Basic Auth**), or `header` (**API Key**), for [authentication](#authentication) |
+ | `authCredentials` | The token, if `authType` is `bearer` |
+ | `basicUsername`, `basicPassword` | The username and password, if `authType` is `basic` |
+ | `authHeaderName`, `authHeaderValue` | The header name and the API key, if `authType` is `header` |
+ | `signingSecret` | A secret to [sign each request](#verify-the-signature) with |
+ | `headers` | [Custom headers](#custom-headers), as an array of `{ "key": "<name>", "value": "<value>" }` objects |
+
+ <CodeGroup>
+ ```bash Organization-wide
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/alerts \
+ --header 'Authorization: Bearer <access-token>' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "imported-certificates-expiring",
+ "resourceType": "cert-manager",
+ "eventType": "cert-manager.certificate.expiry",
+ "condition": { "alertBefore": "30d", "sources": ["imported"] },
+ "channels": [
+ {
+ "name": "certificate-inventory",
+ "channelType": "webhook",
+ "config": {
+ "url": "https://alerts.example.com/infisical",
+ "authType": "bearer",
+ "authCredentials": "<token>",
+ "signingSecret": "<signing-secret>"
+ }
+ }
+ ]
+ }'
+ ```
+
+ ```bash Application
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/alerts \
+ --header 'Authorization: Bearer <access-token>' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "payments-api-renewals",
+ "resourceType": "cert-manager.application",
+ "resourceId": "<application-id>",
+ "eventType": "cert-manager.application.certificate.renewal",
+ "channels": [
+ {
+ "name": "payments-deploy-hook",
+ "channelType": "webhook",
+ "config": {
+ "url": "https://deploy.example.com/hooks/certificate-renewed",
+ "signingSecret": "<signing-secret>",
+ "headers": [{ "key": "X-Env", "value": "production" }]
+ }
+ }
+ ]
+ }'
+ ```
+ </CodeGroup>
</Tab>
</Tabs>
@@ -186,9 +145,9 @@ Infisical sends custom headers with each request, such as an `X-Env` header your
## Webhook event types
-Each request is a [CloudEvents](https://cloudevents.io/) JSON payload. The `type` field names the event, and application alerts and Certificate Management alerts use different values:
+Each request is a [CloudEvents](https://cloudevents.io/) JSON payload. The `type` field names the event, and application alerts and organization-wide alerts use different values:
-| Event | Application alert `type` | Certificate Management alert `type` |
+| Event | Application alert `type` | Organization-wide 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` |
@@ -205,7 +164,7 @@ The `subject` field is the same value without the `com.infisical.` prefix.
To find out which kind of alert sent a request, read `data.alert.resourceType`:
- `cert-manager.application`: an application alert, with the application's ID in `data.alert.resourceId`
-- `cert-manager`: a Certificate Management alert
+- `cert-manager`: an organization-wide alert
- `cert-manager.signer`: a signer certificate expiration alert, whose items list the signers in `resource.signerIds` and `resource.signerNames` (only the selected signers, if the alert has a **Signers** filter)
<Note>
@@ -324,8 +283,8 @@ To find out which kind of alert sent a request, read `data.alert.resourceType`:
}
```
</Tab>
- <Tab title="Certificate Management alert">
- A Certificate Management alert sends the same payload as an application alert, with `resourceType` set to `cert-manager`. This example shows a revocation:
+ <Tab title="Organization-wide alert">
+ An organization-wide alert sends the same payload as an application alert, with `resourceType` set to `cert-manager`. This example shows a revocation:
```json expandable
{
diff --git a/docs/snippets/documentation/platform/pki/applications/alerting/alert-api-fields.mdx b/docs/snippets/documentation/platform/pki/applications/alerting/alert-api-fields.mdx
new file mode 100644
index 0000000000..378cae8d6c
--- /dev/null
+++ b/docs/snippets/documentation/platform/pki/applications/alerting/alert-api-fields.mdx
@@ -0,0 +1,30 @@
+Set `resourceType` and `resourceId` to the certificates the alert covers:
+
+| Alert | `resourceType` | `resourceId` |
+| --- | --- | --- |
+| Organization-wide | `cert-manager` | Leave out |
+| Application | `cert-manager.application` | The application's ID, from [the list applications endpoint](/api-reference/endpoints/pki/applications/configuration/list) |
+| Signer certificate expiration | `cert-manager.signer` | Leave out |
+
+Set `eventType` to the event the alert watches:
+
+| Event | Organization-wide alert | Application alert |
+| --- | --- | --- |
+| Expiration | `cert-manager.certificate.expiry` | `cert-manager.application.certificate.expiry` |
+| Issuance | `cert-manager.certificate.issuance` | `cert-manager.application.certificate.issuance` |
+| Renewal | `cert-manager.certificate.renewal` | `cert-manager.application.certificate.renewal` |
+| Revocation | `cert-manager.certificate.revocation` | `cert-manager.application.certificate.revocation` |
+| Signer certificate expiration | `cert-manager.signer.certificate.expiry` | Not available |
+
+Set `condition` to the same settings as the **Alert Before** field, the **Repeat daily until expiry** toggle, and the **Filters** step in Infisical:
+
+| Field | Applies to | Value |
+| --- | --- | --- |
+| `alertBefore` | Expiration alerts (required) | A number and a unit, such as `30d` or `2w`, up to 365 days |
+| `dailyReminder` | Expiration alerts | `true` to [repeat the alert every day](/documentation/platform/pki/applications/alerting/overview#how-often-expiration-alerts-repeat) until the certificate expires |
+| `applicationIds` | Organization-wide alerts | Up to 100 application IDs |
+| `profileIds` | Organization-wide alerts | Up to 100 certificate profile IDs |
+| `sources` | Organization-wide alerts | Any of `issued` (**Managed** in Infisical), `imported`, and `discovered` |
+| `signerIds` | Signer certificate expiration alerts | Up to 100 signer IDs |
+
+For issuance, renewal, and revocation alerts on an application, leave out `condition`.
diff --git a/docs/snippets/documentation/platform/pki/applications/alerting/start-alert.mdx b/docs/snippets/documentation/platform/pki/applications/alerting/start-alert.mdx
new file mode 100644
index 0000000000..98480ea7fe
--- /dev/null
+++ b/docs/snippets/documentation/platform/pki/applications/alerting/start-alert.mdx
@@ -0,0 +1,27 @@
+<Steps>
+ <Step>
+ Open the alert form:
+
+ - For an organization-wide alert, go to **Certificate Manager** > **Settings**, select the **Alerts** tab, then select **Create Alert**
+ - For an application alert, go to **Certificate Manager** > **Applications** and select your application, then select the **Settings** tab and select **Create Alert** in the **Alerts** section
+ </Step>
+ <Step>
+ Select the **Alert Type**, then enter an **Alert Name** and an optional **Description**. An application can have one alert for each event, so to notify more places about the same event, add more channels to that alert.
+ </Step>
+ <Step>
+ For an expiration alert, enter **Alert Before** as a number and a unit. For example: `30d` or `2w`, up to 365 days.
+
+ <Note>
+ To get a reminder every day, turn on **Repeat daily until expiry**. Otherwise, the alert repeats on a [schedule based on **Alert Before**](/documentation/platform/pki/applications/alerting/overview#how-often-expiration-alerts-repeat).
+ </Note>
+
+ Select **Continue**.
+ </Step>
+ <Step>
+ For an organization-wide alert, on the **Filters** step, optionally select **Add Filter** to [narrow the certificates the alert covers](/documentation/platform/pki/applications/alerting/overview#filter-an-organization-wide-alert), then select **Continue**. Application alerts and signer certificate expiration alerts skip this step.
+ </Step>
+</Steps>
+
+<Tip>
+To add this channel to an existing alert instead, edit the alert and go to its **Channels** step.
+</Tip>
diff --git a/docs/snippets/documentation/platform/pki/applications/alerting/start-application-alert.mdx b/docs/snippets/documentation/platform/pki/applications/alerting/start-application-alert.mdx
deleted file mode 100644
index 07f6fb90ed..0000000000
--- a/docs/snippets/documentation/platform/pki/applications/alerting/start-application-alert.mdx
+++ /dev/null
@@ -1,26 +0,0 @@
-<Steps>
- <Step>
- Go to **Certificate Manager** > **Applications** and select your application.
- </Step>
- <Step>
- Select the **Settings** tab, then select **Create Alert** in the **Alerts** section.
- </Step>
- <Step>
- Select the **Alert Type**, then enter an **Alert Name** and an optional **Description**.
- </Step>
- <Step>
- For an expiration alert, enter **Alert Before** as a number and a unit. For example: `30d` or `2w`, up to 365 days.
-
- <Note>
- To get a reminder every day, turn on **Repeat daily until expiry**. Otherwise, the alert repeats on a [schedule based on **Alert Before**](/documentation/platform/pki/applications/alerting/overview#how-often-expiration-alerts-repeat).
- </Note>
-
- Select **Continue** to go to the **Channels** step.
- </Step>
-</Steps>
-
-An application can have one alert for each event. To notify more places about the same event, add more channels to that alert.
-
-<Tip>
-To add this channel to an existing alert instead, edit the alert and go to its **Channels** step.
-</Tip>
diff --git a/docs/snippets/documentation/platform/pki/applications/alerting/start-cert-management-alert.mdx b/docs/snippets/documentation/platform/pki/applications/alerting/start-cert-management-alert.mdx
deleted file mode 100644
index 6d9840e9cf..0000000000
--- a/docs/snippets/documentation/platform/pki/applications/alerting/start-cert-management-alert.mdx
+++ /dev/null
@@ -1,26 +0,0 @@
-<Steps>
- <Step>
- Go to **Certificate Manager** > **Settings** and select the **Alerts** tab, then select **Create Alert**.
- </Step>
- <Step>
- Select the **Alert Type** from the **Certificate Lifecycle** or **Code Signing** group, then enter an **Alert Name** and an optional **Description**.
- </Step>
- <Step>
- For an expiration alert, enter **Alert Before** as a number and a unit. For example: `30d` or `2w`, up to 365 days.
-
- <Note>
- To get a reminder every day, turn on **Repeat daily until expiry**. Otherwise, the alert repeats on a [schedule based on **Alert Before**](/documentation/platform/pki/applications/alerting/overview#how-often-expiration-alerts-repeat).
- </Note>
-
- Select **Continue**.
- </Step>
- <Step>
- On the **Filters** step, optionally select **Add Filter** to [narrow the certificates the alert covers](/documentation/platform/pki/applications/alerting/overview#filter-a-certificate-management-alert). A signer certificate expiration alert skips this step.
-
- Select **Continue** to go to the **Channels** step.
- </Step>
-</Steps>
-
-<Tip>
-To add this channel to an existing alert instead, edit the alert and go to its **Channels** step.
-</Tip>