Saltar al contenido principal

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​

NameTypeRequiredDescription
actortextNoUser or system performing the action
actiontextNoAction being audited
resourcetextNoResource being accessed or modified
metadatajsonNoAdditional metadata for the audit entry
errortextNoError message if the action failed
request_idtextNoRequest identifier for correlation
session_idtextNoSession identifier
ip_addresstextNoIP address of the requester

Output ports​

NameTypeRequiredDescription
resultjsonNoAudit log result with audit_logged, audit_entry, and audit_destination details
successbooleanNoWhether the audit entry was logged successfully

Settings​

Basic​

SettingNameTypeRequiredDefaultAllowed valuesDescription
Event Typeevent_typeenumNoaccessaccess, modification, deletion, creation, authentication, authorization, system, security, complianceType of audit event
SeverityseverityenumNoinfodebug, info, warning, error, criticalSeverity level of the audit event
ActoractorstringNosystemDefault actor if not provided via input
ActionactionstringNoDefault action being audited
ResourceresourcestringNoDefault resource being accessed
DestinationdestinationenumNostdoutstdout, file, database, syslog, webhookWhere to send the audit log

Auth​

SettingNameTypeRequiredDefaultAllowed valuesDescription
Database URLdatabase_urlsecretNoConnection string (for database destination)

Advanced​

SettingNameTypeRequiredDefaultAllowed valuesDescription
File Pathfile_pathstringNo/var/log/hydra/audit.logLog file path (for file destination)
Table Nametable_namestringNoaudit_logsDatabase table for audit logs
Syslog Serversyslog_serverstringNolocalhost:514Syslog server address (for syslog destination)
Syslog Protocolsyslog_protocolenumNoudpudp, tcpSyslog transport protocol
Webhook URLwebhook_urlstringNoWebhook endpoint (for webhook destination)
MetadatametadatajsonNoStatic metadata to include in every audit entry

Errors​

CodeDescription
DESTINATION_FAILEDFailed to write audit log to the configured destination
INVALID_EVENT_TYPEThe specified event_type is not recognized
DATABASE_CONNECTION_FAILEDCould 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..