Skip to content

CWCOW: Logging enforcement#2728

Draft
MahatiC wants to merge 2 commits into
microsoft:mainfrom
MahatiC:logging-enforcement
Draft

CWCOW: Logging enforcement#2728
MahatiC wants to merge 2 commits into
microsoft:mainfrom
MahatiC:logging-enforcement

Conversation

@MahatiC
Copy link
Copy Markdown
Member

@MahatiC MahatiC commented May 8, 2026

This commit adds guest-side enforcement: each requested ETW provider is validated against allowed_log_providers declared in the security policy (case-insensitive match).
Providers not in the allowlist are silently dropped. The filtered config is re-encoded and forwarded to GCS with GUIDs resolved.

Also removes the hostedSystemConfig dead code path from createContainer — the sidecar only runs for confidential containers, which always use CWCOWHostedSystem.

MahatiC added 2 commits May 7, 2026 22:36
Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
This commit adds guest-side enforcement: each requested ETW provider is validated against allowed_log_providers declared in the security policy (case-insensitive match).
Providers not in the allowlist are silently dropped. The filtered config is re-encoded and forwarded to GCS with GUIDs resolved.

Also removes the hostedSystemConfig dead code path from createContainer — the sidecar only runs for confidential containers, which always use CWCOWHostedSystem.

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Copy link
Copy Markdown
Collaborator

@KenGordon KenGordon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you see if there are any other missing enforcement points we should know about?

defer span.End()
defer func() { oc.SetSpanStatus(span, err) }()

// Todo: Add policy enforcement for modifying service settings
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this safe? It doesn't sound like it from the comment here or the log at line 609.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I don't think we need to do that (I didn't write that comment, so not sure what was the intention for this)

@MahatiC
Copy link
Copy Markdown
Member Author

MahatiC commented May 12, 2026

Can you see if there are any other missing enforcement points we should know about?

I've addressed the ones that I had noted before (and the one pointed by Tingmao). I don't think anything else is missing. I responded the the allowStdio question on the PR and linked to the commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants