PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #179
You are running an application on Compute Engine and collecting logs through Stackdriver. You discover that some personally identifiable information (PII) is leaking into certain log entry fields…
The correct answer is B. Use a Fluentd filter plugin with the Stackdriver Agent to remove log entries containing userinfo. To prevent PII from leaking into Stackdriver Logging, log entries containing sensitive information must be processed and filtered at the source before ingestion into the logging service.
Question
Options
- ACreate a basic log filter matching userinfo, and then configure a log export in the Stackdriver
- BUse a Fluentd filter plugin with the Stackdriver Agent to remove log entries containing userinfo,
- CCreate an advanced log filter matching userinfo, configure a log export in the Stackdriver console
- DUse a Fluentd filter plugin with the Stackdriver Agent to remove log entries containing userinfo,
How the community answered
(44 responses)- A16% (7)
- B73% (32)
- C5% (2)
- D7% (3)
Why each option
To prevent PII from leaking into Stackdriver Logging, log entries containing sensitive information must be processed and filtered at the source before ingestion into the logging service.
Creating a basic log filter in Stackdriver (Cloud Logging) operates on logs after they have already been ingested into the service, failing to prevent the PII from initially leaking.
The Cloud Logging agent on Compute Engine utilizes Fluentd for log collection. By configuring a Fluentd filter plugin on the VM, log entries containing 'userinfo' can be intercepted and removed or redirected directly on the instance, preventing them from ever being sent to Stackdriver Logging.
An advanced log filter in Stackdriver (Cloud Logging) also processes logs only after their ingestion, meaning the PII has already been recorded in the logging service before the filter can act.
Assuming the truncated option D is identical to B, it would technically achieve the same outcome, but since B is specified as the correct answer, B is the intended solution.
Concept tested: Log preprocessing and filtering at source agent
Source: https://cloud.google.com/logging/docs/agent/logging/configuration
Topics
Community Discussion
No community discussion yet for this question.