Skip to main content

Logging and Monitoring Policy (A.8.15, A.8.16)

Document ID: logging-monitoring-policy
Version: 1.0
Effective from: 2025-01-01
Owner: ISMS owner
Review cycle: Annual

note

This document is aligned to ISO/IEC 27001:2022 Annex A as a self-assessment. SigmaShake holds no ISO 27001 certification.


Purpose​

Define what events are logged, how logs are protected, and how anomalous behaviour is detected and alerted.

Events to log​

Event categorySystemLog destination
Authentication attempts (success + failure)sigmashake-ssoD1 audit_events (hash-chained) + nightly R2 export. Worker observability is enabled in sigmashake-sso/wrangler.toml. No Logpush job is configured in code.
API key usageCloudflare API GatewayCloudflare audit log
Evidence collection outcomessigmashake-complianceD1 evidence_runs + R2
Compliance gaps opened/closedsigmashake-complianceD1 gaps
Deployment eventsCloudflare WorkersWrangler deploy audit + deployments collector
Staff portal accesssigmashake-complianceD1 audit trail
Webhook events (Stripe, GitHub)sigmashake-complianceevidence_runs

Log retention​

Log typeRetentionStorage
Evidence objects90-day Object Lock is a target set by hand in the Cloudflare dashboard. Verification is an open ISMS-owner action. The weekly r2-object-lock-verify collector checks the bucket rules. Objects are kept indefinite in practice.R2 EVIDENCE
Audit packagesAt least 90 days Object Lock (checked by the r2-object-lock-verify collector). No longer period is set in code.R2 AUDIT_PACKAGES
D1 evidence_runsIndefinite (D1 is durable)D1
Cloudflare analytics30 days (free plan) / longer with paidCloudflare
SSO audit eventsD1 rows are not pruned by code. A nightly export writes them to R2. The code and sigmashake-sso/wrangler.toml target 7-year retention for the export. The 7-year R2 Object Lock is an operator target set in the Cloudflare dashboard, not in code, and no code checks it. The D1 rows are never deleted.D1 audit_events + R2 AUDIT_BUCKET

Log protection​

  • Evidence blobs are signed (Ed25519) and stored in R2. The target is Object Lock in Compliance mode (a hand-set dashboard rule; the r2-object-lock-verify collector checks the rules, and verification is an open ISMS-owner action)
  • Daily Merkle roots make log tampering cryptographically detectable
  • D1 evidence_runs is append-only by design; no DELETE or UPDATE operations on evidence rows

Monitoring​

WhatHowCadence
Collector stalenesscron-health opens gap if collector > 1.5× cadenceDaily
Anomalous SSO activitysso-audit-sync mirrors SigmaShake SSO audit events and checks the hash chain (no anomaly detection)Daily
Worker tail consumerstail-consumer-coverage verifies log tail is activeWeekly
WAF rule statewaf-state verifies WAF is active and rules unchangedWeekly

Alerting​

Discord webhook (COMPLIANCE_DISCORD_WEBHOOK) receives:

  • Evidence collection errors (collector failures)
  • Manifest seal failures
  • Hub anchor failures
  • Break-glass CIDR matches

The Worker sends no Discord alert for new gap rows in general and no signing key rotation reminder. A person must read each alert; no paging vendor exists.

Evidence​

CollectorCadenceControl
sso-audit-syncDailyA.5.16, A.8.15, A.8.16
cron-healthDailyA.5.36, A.8.16
tail-consumer-coverageWeeklyA.8.15, A.8.16
waf-stateWeeklyA.8.20, A.8.21, A.8.23