PROFESSIONAL-CLOUD-DEVOPS-ENGINEER practice question 16 of 25

[Managing service incidents] Your company runs an e-commerce business. The application responsible for payment processing has structured JSON logging…

Full set: 205 questions
[Managing service incidents] Your company runs an e-commerce business. The application responsible for payment processing has structured JSON logging with the following schema: Capture and access of logs from the payment processing application is mandatory for operations, but the jsonPayload.user_email field contains personally identifiable information (PII). Your security team does not want the entire engineering team to have access to PII. You need to stop exposing PII to the engineering team and restrict access to security team members only. What should you do?
Answer options
A: Apply a jsonPayload.user_email exclusion filter to the _Default bucket.
B: Apply the conditional role binding resource.name.extract("locations/global/buckets/(bucket)/") == "_Default" to the _Default bucket.
C: Apply a jsonPayload.user_email restricted field to the _Default bucket. Grant the Log Field Accessor role to the security team members. Correct answer
D: Modify the application to toggle inclusion of user_email when the log_user_email environment variable is set to true. Restrict the engineering team members who can change the production environment variable by using the CODEOWNERS file.
Correct Answer:
C. Apply a jsonPayload.user_email restricted field to the _Default bucket. Grant the Log Field Accessor role to the security team members.
Explanation

Google Cloud Logging's field-level access control is the feature specifically designed for this scenario. By configuring jsonPayload.useremail as a restricted field on the log bucket, you can deny access to it by default for all principals. You can then grant the roles/logging.fieldAccessor IAM role to the security team for that specific field and bucket. This allows the engineering team to see all log data except the PII, while the security team can view the complete log entry, fulfilling the principle of least privilege.

Why Incorrect

A. An exclusion filter would remove the entire log entry if it contains the PII field, preventing engineers from accessing necessary operational data.
B. Conditional role bindings control access to entire log entries or buckets, not specific fields within a log's payload.
D. Modifying the application couples security policy with application code and is less flexible than using a native cloud logging feature for access control.

References

1. Google Cloud Documentation, "Cloud Logging > Security and compliance > Field-level access control". "Field-level access control lets you hide individual LogEntry fields from users, letting you use a single log bucket for both your sensitive and your non-sensitive data... To grant a principal permission to view the restricted fields in a given log bucket, you must grant them the logging.fieldAccessor IAM role".

2. Google Cloud Documentation, "Cloud Logging > IAM and access control > Access control with IAM". This page details the roles/logging.fieldAccessor role: "Grants permission to read log fields that are restricted."

Scroll to Top