implementing-zero-trust-with-beyondcorp skill (Anthropic-Cybersecurity-Skills)
- Install
- SKILL.md (verbatim)
- Overview
- When to Use
- Prerequisites
- Steps
- Step 1: Enable IAP on Target Resources
- Step 2: Define Access Levels
- Step 3: Bind Access Policies
- Step 4: Audit and Monitor
- Expected Output
- Other files in this skill
- references/api-reference.md (verbatim)
- gcloud IAP Commands
- Access Context Manager Commands
- Access Level Spec (YAML)
- IAP Roles
- Python SDK
- Audit Log Query (Cloud Logging)
- References
What it does. Configures Google BeyondCorp Enterprise Identity-Aware Proxy (IAP) as the access enforcement point for web applications, defining Access Context Manager access levels from device trust and network attributes, and auditing the resulting policies for compliance. Use when eliminating perimeter/VPN trust for GCP resources or internal apps, or when setting up identity- and device-posture-based access controls on Google Cloud. Part of mukul975/Anthropic-Cybersecurity-Skills (817 security skills) (mukul975/Anthropic-Cybersecurity-Skills).
| Upstream | mukul975/Anthropic-Cybersecurity-Skills |
| Skill file | skills/implementing-zero-trust-with-beyondcorp/SKILL.md |
| License | Apache-2.0 (skill folder LICENSE) |
| Author | mukul975 |
| Fetched | 2026-09-10 |
Install
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-zero-trust-with-beyondcorp, or copy the skill folder into~/.claude/skills/implementing-zero-trust-with-beyondcorp/.- Raw file:
curl -sL https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/HEAD/skills/implementing-zero-trust-with-beyondcorp/SKILL.md
SKILL.md (verbatim)
name: implementing-zero-trust-with-beyondcorp
description: Configures Google BeyondCorp Enterprise Identity-Aware Proxy (IAP) as the access enforcement point for web applications, defining Access Context Manager access levels from device trust and network attributes, and auditing the resulting policies for compliance. Use when eliminating perimeter/VPN trust for GCP resources or internal apps, or when setting up identity- and device-posture-based access controls on Google Cloud.
domain: cybersecurity
subdomain: zero-trust
tags:
- zero-trust
- beyondcorp
- google-cloud
- iap
- context-aware-access
- device-trust
- identity
version: '1.0'
author: mahipal
license: Apache-2.0
nist_csf:
- PR.AA-01
- PR.AA-05
- PR.IR-01
mitre_attack:
- T1078
- T1550
- T1021
- T1556
- T1078.004
Implementing Zero Trust with BeyondCorp
Overview
Google BeyondCorp Enterprise implements the zero trust security model by eliminating the concept of a trusted network perimeter. Instead of relying on VPNs and network location, BeyondCorp authenticates and authorizes every request based on user identity, device posture, and contextual attributes. Identity-Aware Proxy (IAP) serves as the enforcement point, intercepting all requests to protected resources and evaluating them against Access Context Manager policies. This skill covers configuring IAP for web applications, defining access levels based on device trust and network attributes, and auditing access policies for compliance.
When to Use
- When deploying or configuring implementing zero trust with beyondcorp capabilities in your environment
- When establishing security controls aligned to compliance requirements
- When building or improving security architecture for this domain
- When conducting security assessments that require this implementation
Prerequisites
- Google Cloud project with BeyondCorp Enterprise license
- IAP API enabled (iap.googleapis.com)
- Access Context Manager API enabled (accesscontextmanager.googleapis.com)
- GCP resources to protect (Compute Engine, App Engine, or GKE services)
- Endpoint Verification deployed on managed devices
- Python 3.9+ with google-cloud-iap library
Steps
Step 1: Enable IAP on Target Resources
Configure Identity-Aware Proxy on Compute Engine, App Engine, or HTTPS load balancer backends.
Step 2: Define Access Levels
Create Access Context Manager access levels based on IP ranges, device attributes (OS version, encryption, screen lock), and geographic location.
Step 3: Bind Access Policies
Apply access levels as IAP conditions to enforce context-aware access decisions on protected resources.
Step 4: Audit and Monitor
Query IAP audit logs, verify policy enforcement, and identify gaps in zero trust coverage.
Expected Output
JSON report containing IAP-protected resources, access level definitions, policy binding audit results, and zero trust coverage metrics.
Other files in this skill
references/api-reference.md (verbatim)
API Reference: Implementing Zero Trust with BeyondCorp
gcloud IAP Commands
# Enable IAP on backend service
gcloud iap web enable --resource-type=backend-services \
--service=my-backend --project=my-project
# Get IAP IAM policy
gcloud iap web get-iam-policy --project=my-project
# Grant IAP access with access level condition
gcloud iap web add-iam-policy-binding --project=my-project \
--member="group:team@example.com" \
--role="roles/iap.httpsResourceAccessor" \
--condition="expression=accessPolicies/123/accessLevels/corp_device,title=CorpDevice"
# Enable required APIs
gcloud services enable iap.googleapis.com
gcloud services enable accesscontextmanager.googleapis.com
gcloud services enable beyondcorp.googleapis.com
Access Context Manager Commands
# Create access policy
gcloud access-context-manager policies create --organization=ORG_ID --title="Corp Policy"
# Create access level (device + IP)
gcloud access-context-manager levels create corp_trusted \
--policy=POLICY_ID --title="Corporate Trusted" \
--basic-level-spec=level_spec.yaml
# List access levels
gcloud access-context-manager levels list --policy=POLICY_ID --format=json
Access Level Spec (YAML)
conditions:
- ipSubnetworks:
- "10.0.0.0/8"
- "172.16.0.0/12"
devicePolicy:
requireScreenlock: true
osConstraints:
- osType: DESKTOP_WINDOWS
minimumVersion: "10.0.19041"
- osType: DESKTOP_MAC
minimumVersion: "12.0.0"
allowedEncryptionStatuses:
- ENCRYPTED
regions:
- "US"
- "GB"
IAP Roles
| Role | Description |
|---|---|
| roles/iap.httpsResourceAccessor | Access IAP-protected resources |
| roles/iap.admin | Full IAP administration |
| roles/iap.settingsAdmin | Modify IAP settings |
| roles/iap.tunnelResourceAccessor | Access via IAP TCP tunneling |
Python SDK
from google.cloud import iap_v1
client = iap_v1.IdentityAwareProxyAdminServiceClient()
# List tunnel destinations
request = iap_v1.ListTunnelDestGroupsRequest(parent=f"projects/{project}/iap_tunnel/locations/-")
Audit Log Query (Cloud Logging)
resource.type="gce_backend_service"
logName="projects/PROJECT/logs/cloudaudit.googleapis.com%2Fdata_access"
protoPayload.methodName="AuthorizeUser"
protoPayload.authenticationInfo.principalEmail!=""
References
- BeyondCorp Enterprise: https://cloud.google.com/beyondcorp
- IAP Concepts: https://cloud.google.com/iap/docs/concepts-overview
- Access Context Manager: https://cloud.google.com/access-context-manager/docs
Back to mukul975/Anthropic-Cybersecurity-Skills (817 security skills) or Agent skills.