Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-826"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
One batch, one release (v0.6.312). Two commits per issue (code, docs), review per commit if you like.
#823 — audit log and marks on s3 (recommendation 1–6 from the issue)
internal/segments: sealer that turns the local month files into immutable, age-encrypted objects.cairn-state/{audit,marks}/<seq>.<YYYY-MM>.<offset>.<length>.jsonl, every 5 min / 1,000 events / shutdown (sealed before the instance lock is released). First line of each segment = header with the SHA-256 of the previous segment (CloudTrail-style chain). Boot: names alone give next seq + sealed bytes per month; a month whose local file is shorter (lost volume) is rebuilt from the segments. Retention deletes whole months.cairnd audit-verify -config <file>: read-only; checks chain, sequence, header-vs-name, byte coverage per month; exit 0/1/2.marks-secret), adopted once from the old file (statestore.MigrateFileAs), so old marks keep verifying after a volume loss.audit.Loggercounts write failures (Health()); metricscairn_audit_write_failures_total,cairn_audit_seal_failures_total,cairn_audit_unsealed_bytes,cairn_audit_last_seal_timestamp_seconds; admin-only, mutable bell itemaudit-failingafter 15 min, landing on Administration › Audit log (i18n ×4, existing bell styling, guarded "undefined reason" line).audit.stdout/CAIRN_AUDIT_STDOUT=true: JSON line per event on stdout, follows the toggle.#826 — unfinished uploads expire
Upload-Expireson create and every PATCH (sliding deadline),expirationadvertised, HEAD/PATCH past the deadline → 410 + cleanup (web client already treats 410 as "start over").tusExpiry/CAIRN_TUS_EXPIRY, default24h,0= old behaviour.DirBlobs.Sweepremoves bodies older than 24 × transferTTL, at boot and hourly.Tests
segments (seal + lost-volume rebuild + chain continuation, tamper detection: deleted and edited segment, retention prune keeps the chain verifiable, failure visible); statestore
Backend.List; audit stdout/OnAppend/failure counting (root-skip for CI); end-to-end on a real posix driver: lost volume → audit back, old mark still verifies, both chains intact; posix = no sealing; bell item admin-only after the 15-min grace; web pin qa823; tus expiry advertise/stamp, sweep + 410, strays + legacy sidecars on restart; peering staging sweep.go vet, fullgo test ./...and all web tests green locally.Docs
admin-policy (Audit logging: storage per driver, sealing, verify, failure behaviour, stdout), leak-tracing (ledger + secret), deployment (local table, ops, tusExpiry), account (new pref row), ARCHITECTURE (§5.4 audit, §7 TUS, §11 local list), README, CHANGELOG v0.6.312.
- internal/segments: immutable, age-encrypted, hash-chained segments (<seq>.<month>.<offset>.<length>.jsonl) sealed every 5 min / 1000 events / shutdown; boot rebuilds months a lost volume took; Verify checks chain, sequence and byte coverage - marks HMAC secret becomes state (marks-secret), adopted once from disk - audit Append failures counted (no longer silent); metrics cairn_audit_{write,seal}_failures_total, _unsealed_bytes, _last_seal_timestamp_seconds; admin bell item audit-failing after 15 min, mutable, lands on Audit log (i18n x4) - cairnd audit-verify subcommand - audit.stdout / CAIRN_AUDIT_STDOUT mirrors events to stdout - docs: admin-policy, leak-tracing, deployment, account, ARCHITECTURE, README, CHANGELOG v0.6.312