Complete the code to specify the condition title in an IAM policy binding.
"condition": {"title": "[1]"}
The title field names the condition. Here, 'AccessTimeRestriction' clearly describes a time-based access control.
Complete the code to specify the expression that restricts access to requests from a specific IP range.
"expression": "request.remoteAddress [1] ip_range(\"192.168.1.0/24\")"
The in operator checks if the request IP is within the specified IP range.
Fix the error in the IAM condition expression to correctly restrict access to requests made before 6 PM UTC.
"expression": "request.time [1] timestamp(\"2024-01-01T18:00:00Z\")"
To allow access only before 6 PM UTC, the request time must be less than the timestamp.
Fill both blanks to create a condition that allows access only if the request is from a specific service account and during business hours.
"expression": "request.auth.principalEmail == \"[1]\" && request.time [2] timestamp(\"2024-01-01T17:00:00Z\")"
The condition checks if the request is from the specified service account and the time is before 5 PM UTC.
Fill all three blanks to write a condition that grants access if the request is from a specific IP range, made by a user with a certain email domain, and during weekdays.
"expression": "request.remoteAddress [1] ip_range(\"10.0.0.0/16\") && request.auth.principalEmail.endsWith(\"[2]\") && (request.time.date().day_of_week() [3] 1 || request.time.date().day_of_week() [3] 5)"
The condition checks if the IP is in the range, the email ends with '@example.com', and the day is Friday or earlier (weekday).