docs(audit): record the read/write split evidence and the pre-split purge #67

Merged
sirius merged 1 commit from t_d1275a3a-secret-read-metadata into master 2026-11-27 05:58:40 +00:00
Owner

Follow-up to #60 (policy split, merged 9f07d333). Documentation only — records the live evidence and
the purge so the next reader does not have to re-derive either.

Verified live on siriussec after the reload

Policy installed with the repo's install-audit.sh (--check → OK: audit policy installed and manifest patched), then crictl stop on the apiserver container so the new process re-read the policy.
audit.log was moved aside first (the old process keeps its fd, so no bytes are lost), so the restarted
apiserver created a fresh audit.log instead of appending to a file full of read bodies.

Over the first 339 secret events of the fresh log:

READ verbs (get/list/watch):  263   all level=Metadata, 0 with responseObject, 0 with `data`
WRITE verbs:                   76   all level=RequestResponse, all carrying requestObject

The throwaway ladder (audit-probe/throwaway-probe, namespace and secret since deleted):

get    Metadata         code 200   objectRef + user + sourceIPs + responseStatus, no body at all
create RequestResponse  code 201   requestObject.data = {key}
patch  RequestResponse  code 200   requestObject = {"stringData":{"added":…}}   <- the patch document
update RequestResponse  code 200   requestObject.data = {added, key, replaced}
delete RequestResponse  code 200   DeleteOptions
get    Metadata         code 404   still recorded after the secret was gone

pods/exec, tokenreviews/serviceaccounts/token, RBAC + certificate writes, impersonate and the
proxies are untouched.

Purge

truncate is the wrong tool (the apiserver keeps writing at its own offset), so the superseded files
were deleted after the restart:

before: audit-2026-11-27T05-45-22.804.log.gz      39,423,475
        audit-pre-readfix-20261127T055416Z.log    15,037,570   (the moved live file)
        audit.log                                  7,440,332   (fresh)
after:  audit.log                                  7,440,332   age ~1 min

What those files held, extracted before deletion: 3,527 secret events, 2,574 with responseObject.data,
readers kubernetes-admin, kustomize-controller, source-controller, kube-prometheus-stack-grafana,
sirius-growth:portal, cert-manager, cnpg-manager and the kubelet identities.

Retention is unchanged (100 MiB × 48, 7 days) and no rule was weakened.

Follow-up to #60 (policy split, merged `9f07d333`). Documentation only — records the live evidence and the purge so the next reader does not have to re-derive either. ## Verified live on siriussec after the reload Policy installed with the repo's `install-audit.sh` (`--check` → `OK: audit policy installed and manifest patched`), then `crictl stop` on the apiserver container so the new process re-read the policy. `audit.log` was moved aside first (the old process keeps its fd, so no bytes are lost), so the restarted apiserver created a **fresh** `audit.log` instead of appending to a file full of read bodies. Over the first 339 secret events of the fresh log: ``` READ verbs (get/list/watch): 263 all level=Metadata, 0 with responseObject, 0 with `data` WRITE verbs: 76 all level=RequestResponse, all carrying requestObject ``` The throwaway ladder (`audit-probe/throwaway-probe`, namespace and secret since deleted): ``` get Metadata code 200 objectRef + user + sourceIPs + responseStatus, no body at all create RequestResponse code 201 requestObject.data = {key} patch RequestResponse code 200 requestObject = {"stringData":{"added":…}} <- the patch document update RequestResponse code 200 requestObject.data = {added, key, replaced} delete RequestResponse code 200 DeleteOptions get Metadata code 404 still recorded after the secret was gone ``` `pods/exec`, `tokenreviews`/`serviceaccounts/token`, RBAC + certificate writes, `impersonate` and the proxies are untouched. ## Purge `truncate` is the wrong tool (the apiserver keeps writing at its own offset), so the superseded files were deleted after the restart: ``` before: audit-2026-11-27T05-45-22.804.log.gz 39,423,475 audit-pre-readfix-20261127T055416Z.log 15,037,570 (the moved live file) audit.log 7,440,332 (fresh) after: audit.log 7,440,332 age ~1 min ``` What those files held, extracted before deletion: 3,527 secret events, 2,574 with `responseObject.data`, readers `kubernetes-admin`, `kustomize-controller`, `source-controller`, `kube-prometheus-stack-grafana`, `sirius-growth:portal`, `cert-manager`, `cnpg-manager` and the kubelet identities. Retention is unchanged (`100 MiB × 48`, 7 days) and no rule was weakened.
Live proof from the fresh audit.log after the apiserver reload (policy 9f07d333):
263 read verbs all Metadata with 0 responseObject/0 data, 76 write verbs all
RequestResponse with requestObject; plus the throwaway-probe create/patch/update/
delete ladder. Documents the purge: pre-split files (39 MB .gz + 15 MB moved live
file) deleted, oldest remaining file is the fresh audit.log.
sirius merged commit 3241eaba1c into master 2026-11-27 05:58:40 +00:00
sirius deleted branch t_d1275a3a-secret-read-metadata 2026-11-27 05:58:40 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sirius/homek8s!67
No description provided.