Configure Webhooks
Configure Webhooks
Configure a global firewall quarantine webhook so Nexus Repository Firewall sends an HTTP notification to your endpoint when a component download is blocked or quarantined.
Prerequisites
The following prerequisites are necessary for enabling webhooks:
- Nexus Repository Pro with version 3.91.0 or later
- Repository Firewall (IQ Server) enabled and configured
- At least one repository with Firewall enabled and Quarantine enabled. For more details, refer to Repository Firewall Getting Started documentation
- An external webhook endpoint
- Administrator access or
nx-capabilities-allprivilege
Create Webhook Capability
Take the following steps to configure webhooks:
- Log in to Nexus Repository Manager as an Administrator.
- Go to Settings → System → Capabilities.
- Select Create capability button.
- In Select Type, choose Webhook: Global.
- In Event Types, select firewall_quarantine.
- In URL, enter the HTTP endpoint that receives webhook requests.
The endpoint can be any HTTP service that receives and processes the webhook payload. See the Webhook Payload to understand the JSON payload sent by Firewall and ensure that your receiving endpoint can process it. If the receiving endpoint expects a different request format, use an intermediary service to transform the payload before forwarding it.
- Optional: In Secret Key, enter the token for HMAC payload digest.
- Select Save.
Note
If you configure a secret, verify webhook signatures using the raw request body before you process the payload. Sonatype recommends using the secret key.