Skip to content
SHC Docs

Audit reference

Generated file — do not edit by hand. Regenerate from the repo root with CGO_ENABLED=0 go run scripts/gen-audit-md.go.

Every audited action SHC records to the tamper-evident audit chain. An event is audited iff its code begins with A — the one rule log.Event and the daemon’s audit bridge apply (core/log/typed.go). Before an A-prefix event reaches the bus it appends a scoped row (tenant / stack / environment) to the hash-chained audit table via the wired AuditWriter, so the audit log survives even when best-effort event delivery does not.

Codes follow A<CLASS><SEQ><MNEMONIC>. The Outcome column is the code’s 3-digit class: 2xx records a successful action, 4xx a denied attempt (auth / authz / validation), 5xx a failed operation. Action is the canonical message template a module publishes (AuditMessageTemplates) or the payload type it emits. The Payload column lists the JSON fields of the registered payload struct — the exact shape written to the audit row’s payload column; a trailing ? marks a field omitted when empty.

This doc is the audit-focused view of the event reference: a code appears here iff a module registers it with an A-prefix name.

Total: 54 audit codes across 11 modules.

Count: 12

CodeOutcomeActionPayload (JSON fields)
A200100STKINSsuccessinstalled stack {stack_name}name, stack_name?, environment?, tenant_name?, service?, replicas?, old_status?, error?, index?, total?, version?, success_count?, total_count?
A200101STKUNIsuccessuninstalled stack {stack_name}name, stack_name?, environment?, tenant_name?, service?, replicas?, old_status?, error?, index?, total?, version?, success_count?, total_count?
A200102STKUPDsuccessupdated stack {stack_name}name, stack_name?, environment?, tenant_name?, service?, replicas?, old_status?, error?, index?, total?, version?, success_count?, total_count?
A200110STKLSEsuccesslease expired for stack {stack_name}, reapingname, stack_name?, environment?, tenant_name?, service?, replicas?, old_status?, error?, index?, total?, version?, success_count?, total_count?
A200400STKSCLsuccessscaled service {service} in stack {stack_name} to {replicas} replicasname, stack_name?, environment?, tenant_name?, service?, replicas?, old_status?, error?, index?, total?, version?, success_count?, total_count?
A200401STKUNOsuccessStackname, stack_name?, environment?, tenant_name?, service?, replicas?, old_status?, error?, index?, total?, version?, success_count?, total_count?
A200402STKUOCsuccessStackname, stack_name?, environment?, tenant_name?, service?, replicas?, old_status?, error?, index?, total?, version?, success_count?, total_count?
A400401STKUOFdeniedStackname, stack_name?, environment?, tenant_name?, service?, replicas?, old_status?, error?, index?, total?, version?, success_count?, total_count?
A500100STKINFfailurefailed to install stack {stack_name}: {error}name, stack_name?, environment?, tenant_name?, service?, replicas?, old_status?, error?, index?, total?, version?, success_count?, total_count?
A500101STKUNFfailurefailed to uninstall stack {stack_name}: {error}name, stack_name?, environment?, tenant_name?, service?, replicas?, old_status?, error?, index?, total?, version?, success_count?, total_count?
A500102STKUPFfailurefailed to update stack {stack_name}: {error}name, stack_name?, environment?, tenant_name?, service?, replicas?, old_status?, error?, index?, total?, version?, success_count?, total_count?
A500400STKSCFfailurefailed to scale service {service} in stack {stack_name}: {error}name, stack_name?, environment?, tenant_name?, service?, replicas?, old_status?, error?, index?, total?, version?, success_count?, total_count?

Count: 6

CodeOutcomeActionPayload (JSON fields)
A401000AUTHFLdeniedAuth failedreason, user?
A401001TOKEXPdeniedToken expireduser
A401002TOKINVdeniedToken invalidreason?
A403000AUTHZFdeniedAuthz failedreason, user?
A403001PERMDNYdeniedPermission denieduser, scopes, resource
A403002TENTDNYdeniedTenant deniedtenant_name, user

Count: 7

CodeOutcomeActionPayload (JSON fields)
A200400BKPCRTsuccesscreated backup {backup_id} for stack {stack_name}backup_id, stack_name
A200401BKPDELsuccessdeleted backup {backup_id}backup_id
A200402BKPRSTsuccessrestored backup {backup_id} to stack {stack_name}backup_id, stack_name
A200403BKPVFYsuccessverified backup {backup_id}backup_id
A200800RLBKSTsuccessrollback started for {stack_name} to backup {backup_id}stack_name, backup_id
A200801RLBKCPsuccessrollback completed for {stack_name}, {stacks} stacks rolled backstack_name, stacks
A500800RLBKFLfailurerollback failed for {stack_name} {error}stack_name, error

Count: 6

CodeOutcomeActionPayload (JSON fields)
A200600STKCLNsuccessStack operationsource, target?, stacks?, fast_path?, dry_run?, operation?, reason?, rollback?, backups?, recovered?, uninstalls?
A200601STKMOVsuccessStack operationsource, target?, stacks?, fast_path?, dry_run?, operation?, reason?, rollback?, backups?, recovered?, uninstalls?
A200602STKRNMsuccessStack operationsource, target?, stacks?, fast_path?, dry_run?, operation?, reason?, rollback?, backups?, recovered?, uninstalls?
A400600CLNFALdeniedStack operationsource, target?, stacks?, fast_path?, dry_run?, operation?, reason?, rollback?, backups?, recovered?, uninstalls?
A400601MOVFALdeniedStack operationsource, target?, stacks?, fast_path?, dry_run?, operation?, reason?, rollback?, backups?, recovered?, uninstalls?
A400602RNMFALdeniedStack operationsource, target?, stacks?, fast_path?, dry_run?, operation?, reason?, rollback?, backups?, recovered?, uninstalls?

Count: 4

CodeOutcomeActionPayload (JSON fields)
A200201CLSPROsuccessCluster role changenode, node_id, previous_role, new_role, actor?
A200202CLSDEMsuccessCluster role changenode, node_id, previous_role, new_role, actor?
A200400CLSDRNsuccessCluster drainnode, node_id, migrated_count, stopped_count?, failed_count?, duration_ms, reason?
A200400CLSFRCsuccessCluster force leadernode_id, removed_nodes?, actor?

Count: 3

CodeOutcomeActionPayload (JSON fields)
A200200NODCRTsuccessNode createdname
A200201NODUPDsuccessNode updatedname
A200202NODRMVsuccessNode removedname

Count: 1

CodeOutcomeActionPayload (JSON fields)
A200503QTASCAsuccessQuota scan triggeredtenant_name

Count: 3

CodeOutcomeActionPayload (JSON fields)
A200000REPCRTsuccessRepo createdname
A200001REPRMVsuccessRepo removedname
A200002REPSYNsuccessRepo sync triggeredname

Count: 4

CodeOutcomeActionPayload (JSON fields)
A200600SCHCRTsuccessSchedulejob, cron?, stack_name?, environment?, source?, actor?
A200601SCHENBsuccessSchedulejob, cron?, stack_name?, environment?, source?, actor?
A200602SCHDISsuccessSchedulejob, cron?, stack_name?, environment?, source?, actor?
A200603SCHRMVsuccessSchedulejob, cron?, stack_name?, environment?, source?, actor?

Count: 5

CodeOutcomeActionPayload (JSON fields)
A200100STKSTRsuccessstarted stack {stack_name}stack_name, tenant_name?, environment?, service?, services_affected?
A200101STKSTPsuccessstopped stack {stack_name}stack_name, tenant_name?, environment?, service?, services_affected?, force?
A200102STKRSTsuccessrestarted stack {stack_name}stack_name, tenant_name?, environment?, service?, services_affected?
A200103STKEXCsuccessexecuted command in stack {stack_name} service {service}stack_name, tenant_name?, environment?, service, command, exit_code
A200104PODRSTsuccessrestarted container {container_id} on node {node_id}container_id, node_id

Count: 3

CodeOutcomeActionPayload (JSON fields)
A200300VLTCRTsuccessSecretkey?, scope?, stack_name?, environment?, tenant_name?, actor?, error?
A200301VLTUPDsuccessSecretkey?, scope?, stack_name?, environment?, tenant_name?, actor?, error?
A200302VLTDELsuccessSecretkey?, scope?, stack_name?, environment?, tenant_name?, actor?, error?