configuring-identity-aware-proxy-with-google-iap
Fungsinya
Fitur ini membantu menyiapkan Google Cloud Identity-Aware Proxy (IAP). Dengan fitur ini, Anda dapat mengontrol siapa saja yang bisa mengakses aplikasi dan layanan Anda di Google Cloud, dengan mewajibkan setiap orang memverifikasi identitasnya sebelum menggunakannya.
Kapan dipakai
- ✓Saat Anda ingin melindungi aplikasi di Google Cloud (seperti website dan API).
- ✓Saat Anda ingin mengganti akses VPN dengan akses yang lebih aman berbasis identitas pengguna.
- ✓Saat Anda perlu memastikan hanya orang yang berwenang dengan perangkat aman yang bisa mengakses layanan Anda.
Link skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/configuring-identity-aware-proxy-with-google-iap/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Atur IAP untuk melindungi aplikasi web saya di App Engine.”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Cara kerjanya adalah dengan mengaktifkan IAP untuk layanan Anda, lalu menentukan siapa saja yang diizinkan mengaksesnya, menggunakan perintah di terminal.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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 \
…
Pertanyaan umum
Apa itu Google Cloud Identity-Aware Proxy (IAP)?
Ini adalah layanan Google Cloud yang berfungsi sebagai gerbang keamanan. Layanan ini memverifikasi identitas setiap orang yang mencoba mengakses aplikasi Anda sebelum mengizinkan mereka masuk.
Apakah saya perlu VPN untuk menggunakan IAP?
Tidak, IAP adalah alternatif dari VPN. IAP berfokus pada identitas pengguna, bukan pada jaringan tempat mereka mengakses.
Bisakah saya menggunakan IAP untuk melindungi semua jenis aplikasi?
IAP ideal untuk aplikasi web dan layanan yang dapat ditempatkan di belakang HTTPS load balancer. IAP tidak cocok untuk aplikasi yang tidak menggunakan HTTPS, atau yang sudah mengelola autentikasinya sendiri dengan cara yang bertentangan.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 35k
- Peringkat
- #7758
- Lisensi
- Apache-2.0
- Diperbarui
- 31/8/2026
Komentar
- …
Skill lain dari repositori ini
abusing-dpapi-for-credential-access
35kMemberi agent AI Anda instruksi siap pakai untuk tugas tertentu, sehingga hasilnya lebih baik dan pengerjaannya lebih cepat.
abusing-shadow-credentials-for-privesc
35kMengajarkan agent AI Anda menulis teks yang jelas dan terstruktur dengan baik.
achieving-cmmc-level-2-compliance
35kMembantu agent Anda menyiapkan lingkungan untuk kepatuhan CMMC Level 2. Skill ini menerapkan persyaratan keamanan dan mengelola dokumentasi yang diperlukan.
acquiring-disk-image-with-dd-and-dcfldd
35kMembantu agent Anda membuat salinan persis dari hard drive. Berguna untuk memastikan tidak ada informasi yang hilang atau berubah selama investigasi.
Skill serupa
brand-discovery
280kMembantu mendefinisikan identitas brand melalui wawancara terstruktur. Hasilnya berupa panduan lengkap berisi tujuan, audiens, dan kepribadian brand.
brand-voice
280kMembuat profil penulisan berdasarkan teks brand yang sebenarnya. Konten dan komunikasi tetap konsisten serta terasa autentik.
design-md
260kMengajari agent Anda menulis, memeriksa, dan mengekspor file DESIGN.md yang mencantumkan warna, font, dan gaya merek dalam bentuk yang bisa dibaca alat AI.