Audit
Category: Security
Node id: audit
Standards: HIPAA, SOC2
Records audit log entries for compliance and security tracking across multiple destinations
What it does
- Five audit destinations: stdout, file, database, syslog, webhook
- Nine event types: access, modification, deletion, creation, auth, etc.
- Five severity levels: debug, info, warning, error, critical
- Correlation via request_id and session_id
- Static metadata injection for consistent audit context
Use cases
- Log PHI access events for HIPAA audit trail compliance
- Record data modification events to a database audit table
- Send security alerts to a webhook for real-time monitoring
- Maintain syslog-compatible audit records for SOC2
Runtime
- Performance tier:
variable
Input ports
| Name | Type | Required | Description |
|---|---|---|---|
actor | text | No | User or system performing the action |
action | text | No | Action being audited |
resource | text | No | Resource being accessed or modified |
metadata | json | No | Additional metadata for the audit entry |
error | text | No | Error message if the action failed |
request_id | text | No | Request identifier for correlation |
session_id | text | No | Session identifier |
ip_address | text | No | IP address of the requester |
Output ports
| Name | Type | Required | Description |
|---|---|---|---|
result | json | No | Audit log result with audit_logged, audit_entry, and audit_destination details |
success | boolean | No | Whether the audit entry was logged successfully |
Settings
Basic
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Event Type | event_type | enum | No | access | access, modification, deletion, creation, authentication, authorization, system, security, compliance | Type of audit event |
| Severity | severity | enum | No | info | debug, info, warning, error, critical | Severity level of the audit event |
| Actor | actor | string | No | system | Default actor if not provided via input | |
| Action | action | string | No | Default action being audited | ||
| Resource | resource | string | No | Default resource being accessed | ||
| Destination | destination | enum | No | stdout | stdout, file, database, syslog, webhook | Where to send the audit log |
Auth
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Database URL | database_url | secret | No | Connection string (for database destination) |
Advanced
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| File Path | file_path | string | No | /var/log/hydra/audit.log | Log file path (for file destination) | |
| Table Name | table_name | string | No | audit_logs | Database table for audit logs | |
| Syslog Server | syslog_server | string | No | localhost:514 | Syslog server address (for syslog destination) | |
| Syslog Protocol | syslog_protocol | enum | No | udp | udp, tcp | Syslog transport protocol |
| Webhook URL | webhook_url | string | No | Webhook endpoint (for webhook destination) | ||
| Metadata | metadata | json | No | Static metadata to include in every audit entry |
Errors
| Code | Description |
|---|---|
DESTINATION_FAILED | Failed to write audit log to the configured destination |
INVALID_EVENT_TYPE | The specified event_type is not recognized |
DATABASE_CONNECTION_FAILED | Could not connect to the audit database |
Runtime notes
- action is required — it can come from the input port or config, but at least one must provide a non-empty value
- If the error input is provided, audit_entry.status is automatically set to 'failure' instead of 'success'
- Input metadata and config metadata are merged; input keys take precedence over config keys on collision
- The audit_destination field in the output confirms which backend was used — useful for pipeline debugging
See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.
¿Algo no está claro? Envíe sus comentarios sobre la documentación por correo electrónico..