Bird
Raised Fist0
GCPcloud~20 mins

Access Context Manager in GCP - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Access Context Manager Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Access Context Manager Perimeter Behavior

You have created an Access Context Manager service perimeter around your Google Cloud projects to restrict data access. What happens if a user tries to access a resource inside the perimeter from a device that is not compliant with the defined access level?

AThe access request is allowed but logged for auditing purposes only.
BThe access request is denied because the device does not meet the access level requirements.
CThe access request is allowed without any restrictions since the user is authenticated.
DThe access request is redirected to a VPN to meet compliance requirements.
Attempts:
2 left
💡 Hint

Think about how Access Context Manager enforces security policies based on device compliance.

❓ Configuration
intermediate
2:00remaining
Configuring an Access Level with Device Policy

You want to create an Access Level that only allows access from devices that are encrypted and have a screen lock enabled. Which JSON snippet correctly defines this device policy in Access Context Manager?

A{ "devicePolicy": { "encryptionStatus": "ENCRYPTED", "screenLockRequired": true } }
B{ "devicePolicy": { "encryptionStatus": "UNENCRYPTED", "screenLockRequired": false } }
C{ "devicePolicy": { "encryptionStatus": "ENCRYPTED", "screenLockRequired": false } }
D{ "devicePolicy": { "encryptionStatus": "UNENCRYPTED", "screenLockRequired": true } }
Attempts:
2 left
💡 Hint

Encryption and screen lock are key device security features to enforce.

❓ Architecture
advanced
2:30remaining
Designing a Secure Access Perimeter for Multiple Projects

You manage three Google Cloud projects with sensitive data. You want to create a single service perimeter that includes all three projects and restricts access to only users from your corporate network and compliant devices. Which architecture best achieves this?

ACreate a service perimeter including only one project and use VPN to connect the other projects securely.
BCreate separate service perimeters for each project with different access levels for each corporate subnet and device policy.
CUse firewall rules on each project to restrict IP ranges and rely on IAM roles for device compliance.
DCreate one service perimeter including all three projects and define an access level that combines IP subnet restrictions for the corporate network and device compliance policies.
Attempts:
2 left
💡 Hint

Think about how Access Context Manager service perimeters can group projects and enforce combined access levels.

❓ security
advanced
2:00remaining
Evaluating Access Context Manager's Response to Unauthorized Access

When a user outside the defined access levels tries to access a resource inside a service perimeter, what is the default behavior of Access Context Manager?

AThe request is blocked and the user receives a 403 Forbidden error.
BThe request is redirected to a login page for additional authentication.
CThe request is allowed but triggers an alert to the security team.
DThe request is queued until an administrator approves it.
Attempts:
2 left
💡 Hint

Consider how strict perimeter enforcement works in cloud security.

❓ service_behavior
expert
3:00remaining
Analyzing Access Context Manager Behavior with Nested Service Perimeters

You have two service perimeters: Perimeter A includes Project 1 and Perimeter B includes Project 1 and Project 2. Both perimeters have different access levels. A user tries to access Project 1 resources. Which access level is enforced?

AThe access level of Perimeter B is enforced because it includes more projects.
BThe access level of Perimeter A is enforced because it is the smaller perimeter.
CThe more restrictive access level between Perimeter A and Perimeter B is enforced.
DNo access level is enforced due to overlapping perimeters causing conflict.
Attempts:
2 left
💡 Hint

Think about how Access Context Manager handles overlapping perimeters and access levels.

Practice

(1/5)
1. What is the main purpose of Access Context Manager in Google Cloud?
easy
A. To manage billing accounts and payments
B. To monitor network traffic in real-time
C. To deploy virtual machines automatically
D. To control access to resources based on user context like location and device security

Solution

  1. Step 1: Understand Access Context Manager's role

    It controls access by considering user context such as location and device security, not just identity.
  2. Step 2: Compare with other options

    Billing, VM deployment, and network monitoring are unrelated to Access Context Manager's function.
  3. Final Answer:

    To control access to resources based on user context like location and device security -> Option D
  4. Quick Check:

    Access Context Manager controls access context = B [OK]
Hint: Access Context Manager controls access by context, not billing or VMs [OK]
Common Mistakes:
  • Confusing Access Context Manager with billing or VM services
  • Thinking it manages network traffic monitoring
  • Assuming it only uses usernames and passwords
2. Which of the following is the correct way to define an Access Level in Access Context Manager using YAML?
easy
A. accessLevels: - name: 'accessPolicies/123/accessLevels/level1' title: 'Office Access' basic: conditions: - ipSubnetworks: ['192.168.1.0/24'] devicePolicy: osConstraints: - osType: 'DESKTOP_MAC' minimumVersion: '10.15'
B. accessLevels: - id: 'level1' description: 'Office Access' conditions: ipRanges: ['192.168.1.0/24'] device: 'MAC'
C. accessLevel: - name: 'level1' title: 'Office Access' conditions: ipSubnet: ['192.168.1.0/24'] devicePolicy: osType: 'MAC'
D. accessLevels: - name: 'accessPolicies/123/accessLevels/level1' title: 'Office Access' conditions: ipSubnetworks: ['192.168.1.0/24'] devicePolicy: osConstraints: - osType: 'DESKTOP_MAC' minimumVersion: '10.15'

Solution

  1. Step 1: Review correct YAML structure for Access Level

    The correct syntax uses 'accessLevels' list with 'name', 'title', and 'basic' containing 'conditions' with 'ipSubnetworks' and 'devicePolicy' including 'osConstraints'.
  2. Step 2: Identify errors in other options

    accessLevels: - id: 'level1' description: 'Office Access' conditions: ipRanges: ['192.168.1.0/24'] device: 'MAC' uses wrong keys like 'ipRanges' and 'device'. accessLevel: - name: 'level1' title: 'Office Access' conditions: ipSubnet: ['192.168.1.0/24'] devicePolicy: osType: 'MAC' uses 'accessLevel' singular and wrong keys. accessLevels: - name: 'accessPolicies/123/accessLevels/level1' title: 'Office Access' conditions: ipSubnetworks: ['192.168.1.0/24'] devicePolicy: osConstraints: - osType: 'DESKTOP_MAC' minimumVersion: '10.15' misses 'basic' wrapper around 'conditions'.
  3. Final Answer:

    accessLevels: - name: 'accessPolicies/123/accessLevels/level1' title: 'Office Access' basic: conditions: - ipSubnetworks: ['192.168.1.0/24'] devicePolicy: osConstraints: - osType: 'DESKTOP_MAC' minimumVersion: '10.15' -> Option A
  4. Quick Check:

    Correct YAML keys and structure = A [OK]
Hint: Look for 'basic' and 'conditions' keys in YAML for Access Level [OK]
Common Mistakes:
  • Using singular 'accessLevel' instead of 'accessLevels'
  • Missing 'basic' wrapper for conditions
  • Incorrect keys like 'ipRanges' or 'device' instead of 'ipSubnetworks' and 'devicePolicy'
3. Given this Access Context Manager policy snippet, what will happen if a user tries to access a resource from IP 203.0.113.5?
accessLevels:
- name: 'accessPolicies/456/accessLevels/levelA'
  basic:
    conditions:
    - ipSubnetworks: ['192.168.0.0/16']
      devicePolicy:
        osConstraints:
        - osType: 'DESKTOP_WINDOWS'
          minimumVersion: '10'
medium
A. Access will be denied because the IP is outside the allowed subnet
B. Access will be allowed because device OS matches
C. Access will be allowed because IP is public
D. Access will be denied because OS version is too low

Solution

  1. Step 1: Check IP subnet condition

    The allowed IP subnet is '192.168.0.0/16', which covers private IPs only. The user's IP '203.0.113.5' is public and outside this range.
  2. Step 2: Evaluate access decision

    Since IP does not match allowed subnet, access is denied regardless of device OS.
  3. Final Answer:

    Access will be denied because the IP is outside the allowed subnet -> Option A
  4. Quick Check:

    IP outside allowed subnet = Access denied [OK]
Hint: Check IP subnet first; outside means deny access [OK]
Common Mistakes:
  • Ignoring IP subnet and trusting device OS alone
  • Assuming public IPs are always allowed
  • Confusing IP ranges with device policies
4. You created an Access Level but users report they cannot access resources even when meeting conditions. Which is the most likely error in your Access Context Manager configuration?
medium
A. The device OS version is set too low
B. The Access Level is not attached to any Access Policy
C. The IP subnet range is too broad
D. The Access Level name is missing

Solution

  1. Step 1: Understand Access Level usage

    Access Levels must be part of an Access Policy to enforce rules on resources.
  2. Step 2: Analyze impact of missing Access Policy attachment

    If Access Level is not attached to any Access Policy, it has no effect, so users cannot access resources despite meeting conditions.
  3. Final Answer:

    The Access Level is not attached to any Access Policy -> Option B
  4. Quick Check:

    Access Level without policy attachment = no access enforced [OK]
Hint: Access Levels must be linked to Access Policies to work [OK]
Common Mistakes:
  • Assuming broad IP ranges cause denial
  • Thinking device OS version too low blocks access
  • Ignoring the need to attach Access Levels to Policies
5. You want to create a service perimeter that restricts access to a Google Cloud Storage bucket only to users accessing from your corporate network and using compliant devices. Which combination of Access Context Manager components should you configure?
hard
A. Use only IAM roles to restrict access based on user identity and device type
B. Create a firewall rule blocking all external IPs and enable device compliance in IAM roles
C. Create an Access Policy with an Access Level defining IP subnet and device compliance, then apply it in a Service Perimeter around the bucket
D. Configure VPC Service Controls without Access Context Manager components

Solution

  1. Step 1: Understand components needed

    Access Context Manager uses Access Policies and Access Levels to define conditions like IP subnet and device compliance.
  2. Step 2: Apply conditions with Service Perimeter

    Service Perimeters enforce these Access Levels around resources like Cloud Storage buckets to restrict access accordingly.
  3. Final Answer:

    Create an Access Policy with an Access Level defining IP subnet and device compliance, then apply it in a Service Perimeter around the bucket -> Option C
  4. Quick Check:

    Access Policy + Access Level + Service Perimeter = A [OK]
Hint: Combine Access Policy, Access Level, and Service Perimeter for resource protection [OK]
Common Mistakes:
  • Relying only on firewall or IAM roles without Access Context Manager
  • Using VPC Service Controls alone without Access Levels
  • Not defining device compliance in Access Levels
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard