-
Notifications
You must be signed in to change notification settings - Fork 174
RUN-3260-Review-and-Finalize-Audit-Webhooks-Plugin #1658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
fdevans
merged 5 commits into
5.13.0
from
RUN-3260-Review-and-Finalize-Audit-Webhooks-Plugin
May 21, 2025
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
daacc51
Created doc page for the Audit Stream Plugin
edbaltra f9aee8f
Some docs cleanup
fdevans f56c4de
Update docs/administration/security/audit-stream-plugin.md
fdevans 89057fd
Deleted screenshots, added properties and description to payload header
edbaltra f2f2bd2
deleted unnecesary lines
edbaltra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,226 @@ | ||
| # Audit Stream Plugin | ||
|
|
||
| :::enterprise | ||
| ::: | ||
|
|
||
| This plugin streams **Rundeck audit events** to external systems via secure, configurable webhooks. It's useful for sending logs to tools like **Datadog**, **New Relic**, **Sumo Logic**, or custom endpoints. | ||
|
|
||
| --- | ||
|
|
||
| ## 🚀 What It Does | ||
|
|
||
| - Sends audit events as JSON via HTTP POST requests | ||
| - Supports authentication methods required by major observability providers | ||
| - Offers advanced filtering to control which events are sent | ||
| - Can enrich payloads with contextual metadata (user, resource, request) | ||
|
|
||
| --- | ||
|
|
||
| ## ✅ Prerequisites | ||
|
|
||
| - Rundeck version **4.17.0 or higher** | ||
| - An external system that can receive and process HTTP webhooks | ||
| - HTTPS endpoint access from the Rundeck server | ||
|
|
||
| --- | ||
|
|
||
| ## 🔐 Supported Authentication Methods | ||
|
|
||
| | Type | Description | | ||
| |-------------|-------------------------------------------------------------------| | ||
| | `NONE` | No authentication headers | | ||
| | `BEARER` | Adds `Authorization: Bearer <token>` header | | ||
| | `AZURE_SAS` | Sends a custom header (e.g. `x-functions-key`) with a token | | ||
| | `AWS_SIGV4` | Signs the request with AWS Signature V4 credentials | | ||
|
|
||
| --- | ||
|
|
||
| ## 🔧 Configuration Guide | ||
|
|
||
| Access these properties via the System Configuration menu under Plugins → Audit Stream. | ||
| ⚠️ Rundeck must be restarted after applying changes. | ||
|
|
||
| ### AWS API Gateway Example | ||
|
|
||
| - Set the Webhook URL: | ||
|
|
||
|  | ||
|
|
||
| - Set the Security Type to AWS_SIGV4 | ||
|
|
||
|  | ||
|
|
||
| - Set the AWS Region: | ||
|
|
||
|  | ||
|
|
||
| - Set the AWS Service Name: | ||
|
|
||
|  | ||
|
|
||
| - Optional: If you haven’t configured credentials in Rundeck’s Key Storage, you can set them here: | ||
|
|
||
|  | ||
|  | ||
|
|
||
|
|
||
| ### Azure Function Example | ||
|
|
||
| - Set the Webhook URL: | ||
|
|
||
|  | ||
|
|
||
| - Set the Security Type to AZURE_SAS: | ||
|
|
||
|  | ||
|
|
||
| - Set the Azure SAS Header Name (e.g., x-functions-key): | ||
|
|
||
|  | ||
|
|
||
| - Set the Azure SAS Token | ||
|
|
||
|  | ||
|
|
||
| ### Bearer Token Example | ||
|
|
||
| - Set the Webhook URL: | ||
|
|
||
|  | ||
|
|
||
| - Set the Security Type to BEARER | ||
|
|
||
|  | ||
|
|
||
| - Set the Bearer Token | ||
|
|
||
|  | ||
|
|
||
|
|
||
| ### Custom Headers Example (Datadog, New Relic, etc.) | ||
|
|
||
| Datadog: | ||
|
|
||
| - Set the Webhook URL: | ||
|
|
||
|  | ||
|
|
||
|
|
||
| - Set the required custom headers | ||
|
|
||
|  | ||
|
|
||
|
|
||
| New Relic: | ||
|
|
||
| - Set the Webhook URL: | ||
|
|
||
|  | ||
|
|
||
|
|
||
| - Set the X-Insert-Key custom header(Ensure the key is of type INGEST – LICENSE): | ||
|
|
||
|  | ||
|
|
||
|
|
||
|
|
||
| ### 📥 Event Filtering | ||
|
|
||
| You can filter which audit events are sent by listing specific actionType values: | ||
|
|
||
|  | ||
|
|
||
| #### Common `actionType` Values | ||
|
|
||
| | Type | Meaning | | ||
| |-----------------|----------------------------------| | ||
| | `run` | Job or command executed | | ||
| | `create` | Job or resource created | | ||
| | `update` | Resource updated (e.g. job, ACL) | | ||
| | `delete` | Resource deleted | | ||
| | `login_success` | User logged in | | ||
| | `login_failed` | Failed login attempt | | ||
| | `logout` | User logged out | | ||
| | `view` | Resource viewed | | ||
|
|
||
| --- | ||
| ### Timeout | ||
|
|
||
| You can configure the HTTP connection timeout (in seconds). The default is 30: | ||
|
|
||
|  | ||
|
|
||
| ## 🧾 Sample JSON Payloads | ||
|
|
||
| ### Default (e.g. Azure, AWS, or custom) | ||
| ```json | ||
| { | ||
| "timestamp": "2025-03-03T22:27:48.281Z", | ||
| "actionType": "CREATE", | ||
| "userInfo": { | ||
| "username": "admin", | ||
| "userRoles": ["admin", "user"] | ||
| }, | ||
| "resourceInfo": { | ||
| "type": "job", | ||
| "name": "backup-database" | ||
| }, | ||
| "requestInfo": { | ||
| "serverUUID": "550e8400-e29b-41d4-a716-446655440000", | ||
| "userAgent": "Mozilla/5.0..." | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ### Datadog API v1 | ||
| ```json | ||
| { | ||
| "title": "Rundeck Audit Event: login_success", | ||
| "text": "{\"timestamp\":1746726668522,\"actionType\":\"login_success\",\"userInfo\":{\"username\":\"admin\",\"userRoles\":[\"admin\",\"user\"]},\"resourceInfo\":{\"type\":\"user\",\"name\":\"admin\"},\"requestInfo\":{\"serverUUID\":\"abc123\",\"userAgent\":\"Mozilla/5.0\"}}", | ||
| "alert_type": "info", | ||
| "tags": ["rundeck", "action:login_success"] | ||
| } | ||
| ``` | ||
|
|
||
| ### Datadog API v2 | ||
| ```json | ||
| { | ||
| "data": { | ||
| "type": "event", | ||
| "attributes": { | ||
| "title": "Rundeck Audit Event: login_success", | ||
| "text": "{\"timestamp\":1746726668522,\"actionType\":\"login_success\",\"userInfo\":{\"username\":\"admin\",\"userRoles\":[\"admin\",\"user\"]},\"resourceInfo\":{\"type\":\"user\",\"name\":\"admin\"},\"requestInfo\":{\"serverUUID\":\"abc123\",\"userAgent\":\"Mozilla/5.0\"}}", | ||
| "alert_type": "info", | ||
| "tags": ["rundeck", "action:login_success"] | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ### New Relic | ||
| ```json | ||
| { | ||
| "eventType": "RundeckAuditStreamPlugin", | ||
| "timestamp": 1746726668522, | ||
| "actionType": "login_success", | ||
| "userInfo.username": "admin", | ||
| "userInfo.userRoles": ["admin", "user"], | ||
| "resourceInfo.type": "user", | ||
| "resourceInfo.name": "admin", | ||
| "requestInfo.serverUUID": "abc123", | ||
| "requestInfo.userAgent": "Mozilla/5.0" | ||
| } | ||
| ``` | ||
|
|
||
|
|
||
| ## 🐛 Troubleshooting Tips | ||
|
|
||
| - Check that your webhook endpoint is reachable from the Rundeck host. | ||
| - Ensure HTTPS is used (the plugin logs a warning otherwise). | ||
| - Enable debug logging in Rundeck to see plugin output. | ||
| - If using AWS SIGV4, make sure the IAM role or access keys have permissions. | ||
|
|
||
|
|
||
| ## 📫 Need Help? | ||
|
|
||
| For setup support or questions, reach out in your team’s Rundeck support Slack channel or raise an internal ticket with the plugin maintainers. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.