Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud DevOps Engineer practice bank has 1,455 more like it. Try 10 free: instant score, no account.
An organization is running containerized microservices where application logs occasionally contain sensitive user data, such as jsonPayload.user_email and jsonPayload.tax_id.
DevOps engineers require continuous access to these logs in Logs Explorer to debug production incidents, inspect error codes, and verify request latency. However, security compliance requires that standard engineers cannot view the sensitive PII fields, while authorized compliance auditors must retain the ability to inspect the full, unredacted log entries.
Which native Cloud Logging strategy should you implement to meet these requirements?
jsonPayload.user_email and jsonPayload.tax_id.Log Views provide access control over a subset of log entries stored within a Cloud Logging bucket based on a Logging query language filter expression.
LogEntry. They cannot hide, mask, or redact individual fields within a log record.jsonPayload.You needed to segregate whole log entries by environment, resource type, or project (for example, allowing developers to view only resource.type="k8s_container" logs while restricting access to Compute Engine audit logs).
_Default log sink matching jsonPayload.user_email:* OR jsonPayload.tax_id:* so that sensitive fields are stripped before ingestion.Exclusion filters configured on a Cloud Logging sink prevent matching log entries from being ingested into a log bucket or routed to an export destination.
LogEntry objects, not individual fields within a payload. Setting a filter matching those fields will drop the entire log entry completely from the bucket.The goal was to discard high-volume, non-critical log records entirely to reduce ingestion and storage costs.
roles/logging.fieldAccessor IAM role exclusively to the compliance auditors.Field-level access control in Cloud Logging allows administrators to restrict access to specific leaf fields or nested paths within a LogEntry (such as specific fields inside jsonPayload, httpRequest, or labels) at the log bucket level without dropping or hiding the entire log message.
LogEntry in Logs Explorer to inspect metadata, error traces, and operational context; the restricted leaf fields are simply redacted and omitted from their query results.jsonPayload.user_email,jsonPayload.tax_id in --restricted-fields, non-privileged users cannot view these values or query them directly.roles/logging.fieldAccessor (optionally scoped via IAM conditions) to compliance auditors allows them to view and search the complete, unredacted log entries when necessary.Alternative solutions like exclusion filters or log views drop or hide the entire log entry, making it impossible for DevOps teams to debug operational issues. Field-level access control specifically targets sensitive fields while leaving all other telemetry intact.
Log Analytics allows querying log buckets using BigQuery SQL. However, Cloud Logging log buckets that have field-level access controls configured do not support Log Analytics.
The requirement was to build analytical dashboards across structured log data using standard SQL without relying on native Cloud Logging field-level ACLs.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated