Repository navigation
Add policy-gated ETW logging for sidecar GCS - #2982
Manish Ranjan Mahanta (marma-dev) merged 5 commits into
Conversation
Signed-off-by: Manish Ranjan Mahanta <mmahanta@microsoft.com>
Signed-off-by: Manish Ranjan Mahanta <mmahanta@microsoft.com>
06b5d20 to
03b8e51
Compare
Signed-off-by: Manish Ranjan Mahanta <mmahanta@microsoft.com>
|
Investigated the windows-2022 failure: GitHub reports "The self-hosted runner lost communication with the server." Rego policy, repo, LCOW/WCOW-tagged, non-functional, and parity test steps passed before the runner was lost during the shim-test step. The full job log blob is unavailable, so the underlying runner-disconnect cause could not be established. Pushed provider cleanup in 9f13693; a new CI run should validate it. |
|
Shouldn't early boot/init events of gcs side car be captured but relayed only when enabled? We could maintain a small, bounded in-memory buffer in the sidecar’s logging hook: record only startup diagnostics; flush them to ETW once the policy is validated and allows runtime logging; discard them if policy denies logging. |
Signed-off-by: Manish Ranjan Mahanta <mmahanta@microsoft.com>
|
apurv15 Implemented the startup-buffer suggestion in e6a6291. The sidecar buffers at most 128 pre-policy events / 256 KiB (16 KiB per event), and flushes only after both runtime-policy approval and ETW collector enablement. Policy denial discards pending events. Live VBS C-WCOW testing forwarded 14 pre-policy startup events; the denied-policy run forwarded zero sidecar events while other ETW providers continued. |
Signed-off-by: Manish Ranjan Mahanta <mmahanta@microsoft.com>
88c223c
into
microsoft:main
Summary
Validation performed
Compatibility and coverage notes
Startup event buffering
The sidecar now retains at most 128 pre-policy events / 256 KiB (16 KiB per event). Buffered events flush only after validated
allow_runtime_loggingapproval and ETW collector enablement; policy denial discards them. Oversized or unsupported startup records are dropped. No post-policy events are queued while collection is disabled.Final VBS C-WCOW test (Secure Boot enabled, private Rego sidecar): 14 pre-policy sidecar startup events were delivered after Log Forward Service enabled; host parsed all without timestamp errors. With runtime logging denied: zero sidecar events, while other ETW providers continued forwarding. Unit coverage includes both policy/collector orderings, denial, event and byte bounds, oversized fields, and concurrent state changes.