Skip to content

Embedding ETW Name-GUID Mapping for Log Forward Service#2617

Draft
marma-dev wants to merge 1 commit intomicrosoft:mainfrom
marma-dev:user/mmahanta/logsvc-shim-provider-map
Draft

Embedding ETW Name-GUID Mapping for Log Forward Service#2617
marma-dev wants to merge 1 commit intomicrosoft:mainfrom
marma-dev:user/mmahanta/logsvc-shim-provider-map

Conversation

@marma-dev
Copy link
Contributor

As per the updated design for CWCOW, Adding a ETW name-GUID map in hcsshim.
The user should only provide ETW Provider Name only for well-known GUIDs (in etw-map.json).
HCSShim will append the default list of providers (if the annotation is not set to disable default log sources) with or without GUID depending on whether its WCOW or CWCOW respectively.

For CWCOW, the sidecar GCS will intercept the message with the list of providers, check it against the policy and add the GUIDs by looking up the etw-map to the allowed providers before forwarding it to the inbox GCS within the UVM.

Annotations have been updated as per the design discussion

  • "io.microsoft.virtualmachine.forwardlogs.sources" : Customer defined log sources can be specified as base64 encoded json
  • "io.microsoft.virtualmachine.forwardlogs.disable"Annotation to disable forwarding logs to the host, Defaults to false for (non-confidential) WCOW, meaning logs will be forwarded to the host if LogSources is set. And true for confidential containers, meaning logs will not be forwarded to the host by default. "Master Switch for Enabling Log Forwarding"
  • "io.microsoft.virtualmachine.forwardlogs.defaultsources.disable" - Specifies whether to disable default providers or not. Defaults to true. (Valid only if io.microsoft.virtualmachine.forwardlogs.disable is false

Signed-off-by: Manish Ranjan Mahanta <mmahanta@microsoft.com>
Copy link
Member

Choose a reason for hiding this comment

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

The default log sources should live on the guest side so that they can be measured.

// Make a call to the GCS to set the ETW providers

var settings string
if uvm.disableDefaultLogSources {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this logic go into the gcs-sidecar as it's guest side validation?

We want to keep the shim layer as lean as possible and conformant across LCOW and WCOW.

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.

3 participants