Zum Inhalt springen
Skillpedia
Branding35k · #7758

configuring-identity-aware-proxy-with-google-iap

Was er macht

Diese Funktion hilft dir, Google Cloud Identity-Aware Proxy (IAP) einzurichten. Damit kontrollierst du, wer auf deine Anwendungen und Dienste in der Google Cloud zugreifen darf, indem sich jede Person ausweisen muss, bevor sie sie nutzt.

Wann du ihn nutzt

  • ✓Wenn du Anwendungen in der Google Cloud schĂŒtzen willst, zum Beispiel Websites und APIs.
  • ✓Wenn du VPN-Zugriffe durch sicherere, identitĂ€tsbasierte Zugriffe ersetzen willst.
  • ✓Wenn nur autorisierte Personen mit sicheren GerĂ€ten auf deine Dienste zugreifen sollen.

Link zum Skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/configuring-identity-aware-proxy-with-google-iap/SKILL.md

Kopiere ihn und fĂŒge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und fĂŒge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum EinfĂŒgen

Nutze diesen Skill, um mir zu helfen: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/configuring-identity-aware-proxy-with-google-iap/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen fĂŒr meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Richte IAP ein, um meine Webanwendung in App Engine zu schĂŒtzen.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

DafĂŒr aktivierst du IAP fĂŒr deine Dienste und legst dann fest, wer darauf zugreifen darf. Das geschieht ĂŒber Befehle im Terminal.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Configuring Identity-Aware Proxy with Google IAP

When to Use

  • When protecting Google Cloud applications (App Engine, Cloud Run, GKE, Compute Engine) with identity-based access
  • When implementing context-aware access requiring device posture and location verification
  • When providing secure access to internal tools without VPN or public IP exposure
  • When needing per-request authentication and authorization for web applications and TCP services
  • When configuring programmatic access to IAP-protected resources using service accounts

Do not use for non-HTTP applications that cannot be placed behind an HTTPS load balancer, for public-facing applications that need unauthenticated access, or when applications handle their own authentication and IAP would conflict with existing auth flows.

Prerequisites

  • Google Cloud project with billing enabled
  • IAP API enabled (gcloud services enable iap.googleapis.com)
  • Application deployed behind HTTPS Load Balancer, App Engine, or Cloud Run
  • Cloud Identity or Google Workspace for user management
  • Access Context Manager API enabled for access levels
  • OAuth consent screen configured for the project

Workflow

Step 1: Enable IAP on Backend Services

Configure IAP for different GCP compute platforms.

# Enable required APIs
gcloud services enable iap.googleapis.com
gcloud services enable accesscontextmanager.googleapis.com

# Create OAuth consent screen
gcloud iap oauth-brands create \
  --application_title="Internal Applications" \
  --support_email=security@company.com

# Create OAuth client
gcloud iap oauth-clients create \
  projects/PROJECT_ID/brands/BRAND_ID \
  --display_name="IAP Web Client"

# === Enable IAP on Compute Engine Backend Service ===
gcloud compute backend-services update my-backend-service \
  --iap=enabled,oauth2-client-id=CLIENT_ID,oauth2-client-secret=CLIENT_SECRET \
  --global

# === Enable IAP on App Engine ===
gcloud iap web enable \
  --resource-type=app-engine \
  --oauth2-client-id=CLIENT_ID \
  --oauth2-client-secret=CLIENT_SECRET

# === Enable IAP on Cloud Run ===
# First grant IAP service account the Cloud Run Invoker role
gcloud run services add-iam-policy-binding my-service \
  --member="serviceAccount:service-PROJECT_NUM@gcp-sa-iap.iam.gserviceaccount.com" \
  --role="roles/run.invoker" \
  --region=us-central1

# Enable IAP on the Cloud Run backend service
gcloud compute backend-services update my-cloud-run-backend \
  --iap=enabled,oauth2-client-id=CLIENT_ID,oauth2-client-secret=CLIENT_SECRET \
  --global

# === Enable IAP TCP Forwarding for SSH/RDP ===
# No load balancer needed - uses IAP tunnel
gcloud compute instances add-iam-policy-binding my-vm \
  --member="group:developers@company.com" \
  --role="roles/iap.tunnelResourceAccessor" \
  --zone=us-central1-a

# SSH through IAP tunnel
gcloud compute ssh my-vm --zone=us-central1-a --tunnel-through-iap

# RDP through IAP tunnel
gcloud compute start-iap-tunnel my-windows-vm 3389 \
  --local-host-port=localhost:3390 \
  --zone=us-central1-a

Step 2: Configure IAM Bindings for Access Control

Grant access to specific users and groups with optional access level conditions.

# Grant basic access to a group
gcloud iap web add-iam-policy-binding \
  --resource-type=backend-services \
  --service=my-backend-service \
  --member="group:engineering@company.com" \
  --role="roles/iap.httpsResourceAccessor"

# Grant access with access level condition
gcloud iap web add-iam-policy-binding \
  --resource-type=backend-services \
  --service=finance-app \
  --member="group:finance@company.com" \
  --role="roles/iap.httpsResourceAccessor" \
  --condition='expression=request.auth.access_levels.exists(x, x == "accessPolicies/POLICY_ID/accessLevels/corporate-device"),title=RequireCorporateDevice,description=Requires managed corporate device'

# Grant access only during business hours
gcloud iap web add-iam-policy-binding \
  --resource-type=backend-services \
  --service=admin-console \
  --member="group:admins@company.com" \
  --role="roles/iap.httpsResourceAccessor" \
  --condition='expression=request.time.getHours("America/New_York") >= 8 && request.time.getHours("America/New_York") <= 18 && request.time.getDayOfWeek("America/New_York") >= 1 && request.time.getDayOfWeek("America/New_York") <= 5,title=BusinessHoursOnly'

# Grant access to a specific URL path
gcloud iap web add-iam-policy-binding \
  --resource-type=backend-services \
  --service=internal-api \



HĂ€ufige Fragen

Was ist Google Cloud Identity-Aware Proxy (IAP)?

Es ist ein Google-Cloud-Dienst, der wie ein Sicherheits-Gate funktioniert. Er prĂŒft die IdentitĂ€t jeder Person, die auf deine Anwendungen zugreifen will, bevor er sie hineinlĂ€sst.

Brauche ich ein VPN, um IAP zu nutzen?

Nein, IAP ist eine Alternative zu VPNs. Der Fokus liegt auf der IdentitÀt des Nutzers und nicht auf dem Netzwerk, aus dem er zugreift.

Kann ich mit IAP jede Art von Anwendung schĂŒtzen?

IAP eignet sich ideal fĂŒr Webanwendungen und Dienste, die hinter einem HTTPS-Load-Balancer platziert werden können. FĂŒr Anwendungen, die kein HTTPS verwenden oder ihre eigene Authentifizierung auf widersprĂŒchliche Weise verwalten, ist es nicht geeignet.

Details

Originalbeschreibung des Autors

Configures Google Cloud Identity-Aware Proxy (IAP) via gcloud to enforce per-request identity verification on Compute Engine, App Engine, Cloud Run, and GKE, including IAM bindings, Access Context Manager access levels, session/reauth settings, and service-account programmatic access. Use when replacing VPN access with identity-based access to GCP backends or configuring context-aware, zero-trust

repo: mukul975/Anthropic-Cybersecurity-Skills

Beliebtheit

GitHub-Sterne
35k
Platz im Ranking
#7758
Lizenz
Apache-2.0
Aktualisiert
31.8.2026

Ist dieser Skill nĂŒtzlich?

0

Anmelden um abzustimmen.

Kommentare

  • 


Weitere Skills aus diesem Repository

Ähnliche Skills