Webhooks
Common Fate can send webhook events based on audit log and authorization events to a HTTP destination. You can use webhook events to build your own alerts or integrations with Common Fate, or to push events to a monitoring platform.
Prerequisites
To configure a webhook integration you’ll need to use version 2.14 or later of our Terraform Provider.
If you’re running a BYOC (“Bring-Your-Own-Cloud”) deployment of Common Fate in your own AWS account, you’ll need to be on v1.36.0
or later of the common-fate/common-fate-deployment/aws
Terraform module.
Setting up
You can configure a webhook by adding a Terraform resource similar to the below:
Common Fate can send Audit Log events and/or Authorization events to a webhook.
Event Type | Description |
---|---|
Audit Log | Emitted when a Grant to an entitlement is updated |
Authorization | Emitted when an authorization decision is made. Authorization events are emitted each time a Common Fate API is called. |
You can set HTTP headers by specifying them in the headers
variable.
Common Fate will make a POST
request to the specified HTTP endpoint each time a matching event occurs.
Audit Log actions
Audit log events contain an action
field indicating the particular action which occurred in Common Fate:
Action | Emitted when |
---|---|
grant.requested | A Grant was requested. |
grant.approved | Access was approved. |
grant.activated | Access was activated. |
grant.provisioned | Access was provisioned into the integration. For example, an AWS account assignment was successfully created. |
grant.provisioning_attempted | Access provisioning was attempted. |
grant.extended | Access was extended. |
grant.deprovisioned | Access was deprovisioned in the integration. |
grant.cancelled | Pending access was cancelled |
grant.revoked | Active access was revoked |
grant.provisioning_error | Common Fate encountered an error when provisioning access. |
grant.deprovisioning_error | Common Fate encountered an error when deprovisioning access. |
grant.breakglass_activated | Access was activated using breakglass access. |
Example events
Examples of Audit Log and Authorization events are shown below.
Authorization event
Audit log event
The index
field is currently used internally for sorting audit logs emitted concurrently.
The caller_identity_chain
includes the specific OIDC token and subject used by the caller to authenticate to Common Fate.
The targets
field includes resources which are affected by the action.
The context.request.client_addr
field contains the IP address of the actor that performed the action.
The context.authz.eval
field contains the authorization evaluation associated with a particular action. You can inspect the authorization event in Common Fate.
Filtering for actions
You can configure a webhook to filter for specific actions by updating your Terraform config.
For example, to send only the events for grant.approved
use the following configuration: