Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Artikel ini menunjukkan cara mengonfigurasi Identity-Aware Proxy
(IAP) untuk menggunakan identitas eksternal. Dengan menggabungkan
IAP dan Identity Platform, Anda dapat mengautentikasi pengguna dengan
berbagai penyedia identitas (seperti OAuth, SAML, OIDC, dan lainnya),
bukan hanya akun Google.
Mengaktifkan dan mengonfigurasi Identity Platform
IAP menggunakan Identity Platform untuk mengautentikasi identitas eksternal.
Lihat Panduan Memulai untuk Identity Platform
untuk mempelajari cara mengaktifkannya.
Jika ingin menggunakan beberapa tenant, Anda juga harus mengikuti langkah-langkah di artikel Memulai multi-tenancy.
Jika tidak perlu mengisolasi resource, Anda dapat melewati langkah ini dan mengonfigurasi semua penyedia di tingkat project. Lihat
ringkasan tentang identitas eksternal jika Anda tidak yakin apakah
harus mengaktifkan multi-tenancy.
Terakhir, Anda harus mengaktifkan penyedia. Panduan memulai menunjukkan cara menggunakan autentikasi nama pengguna dan sandi sederhana, tetapi Identity Platform mendukung berbagai jenis penyedia, termasuk:
Email dan sandi
OAuth (seperti Google, Facebook, Twitter, dan lainnya)
SAML
OIDC
Nomor telepon
Anonim
Lihat dokumentasi Identity Platform lainnya untuk mempelajari cara mengonfigurasi penyedia lain. Perhatikan bahwa nomor telepon dan autentikasi anonim tidak didukung untuk digunakan dengan multi-tenancy.
Login tanpa sandi menggunakan link email tidak didukung dengan
IAP.
Mengaktifkan IAP untuk menggunakan identitas eksternal
Setelah menyiapkan Identity Platform, Anda dapat mengonfigurasi IAP untuk menggunakannya dalam autentikasi.
Pilih project yang sama dengan project yang Anda gunakan untuk mengonfigurasi Identity Platform. Penggunaan
project yang berbeda tidak didukung.
Pilih tab Aplikasi.
Temukan layanan yang aksesnya ingin Anda batasi menggunakan
IAP.
Alihkan tombol di kolom IAP ke Aktif.
Di panel samping, klik Mulai di kotak berlabel
Gunakan identitas eksternal untuk otorisasi.
Konfirmasi pilihan Anda.
Di panel samping Identity Platform:
Pilih apakah akan membuat halaman login Anda sendiri, atau meminta
IAP membuatkan halaman login untuk Anda.
Mengizinkan IAP membuat halaman login adalah cara
tercepat untuk memulai. Anda tidak perlu men-deploy layanan tambahan atau
menulis kode baru, dan dapat menentukan penyesuaian kecil menggunakan JSON.
Lihat Menghosting UI autentikasi di Cloud Run untuk mempelajari lebih lanjut.
Berbagi yang dibatasi domain:
Jika project tunduk pada batasan berbagi yang dibatasi domain dalam
kebijakan organisasi,
Anda tidak akan dapat membuat layanan publik secara
default. Anda dapat menggunakan tag dan kebijakan kondisional untuk mengecualikan layanan tertentu dari batasan ini.
Untuk informasi selengkapnya, lihat postingan blog tentang
membuat layanan Cloud Run publik
saat fitur berbagi yang dibatasi domain diterapkan.
Jika Anda memilih untuk membuat UI sendiri, masukkan URL Autentikasi.
IAP akan mengalihkan permintaan yang tidak diautentikasi yang
diterimanya ke URL ini.
Menyertakan kunci API dalam URL bersifat opsional. Jika Anda tidak memberikan kunci, konsol Google Cloud akan menambahkan kunci default secara otomatis.
Pilih apakah akan menggunakan penyedia project atau tenant.
Centang kotak penyedia atau tenant yang akan diaktifkan. Pilih
Konfigurasikan penyedia jika Anda perlu mengubah penyedia atau tenant.
Klik Simpan.
Selamat! IAP dikonfigurasi untuk mengautentikasi pengguna
dengan identitas eksternal.
Beralih kembali ke identitas Google
Anda tidak dapat menggunakan IAM untuk otorisasi saat menggunakan identitas eksternal. Jika Anda ingin beralih kembali ke identitas Google agar dapat
memanfaatkan IAM, ikuti langkah-langkah berikut:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-18 UTC."],[[["\u003cp\u003eThis guide outlines how to configure Identity-Aware Proxy (IAP) to authenticate users using external identity providers like OAuth, SAML, OIDC, and others, beyond just Google accounts, by integrating with Identity Platform.\u003c/p\u003e\n"],["\u003cp\u003eIdentity Platform must be enabled and configured in the same project as IAP, and multi-tenancy setup may be necessary for resource isolation, depending on specific requirements.\u003c/p\u003e\n"],["\u003cp\u003eOnce Identity Platform is set up, IAP can be enabled for external identity authentication through the Google Cloud console, allowing users to choose between using a default IAP sign-in page or building a custom one.\u003c/p\u003e\n"],["\u003cp\u003eUsers can choose to use project providers or tenants and select which providers or tenants to enable within the IAP configuration settings to tailor the authentication experience.\u003c/p\u003e\n"],["\u003cp\u003eSwitching back from external identities to Google identities for IAP authentication is possible, but note that doing so will clear the authentication URL and any project or tenants settings.\u003c/p\u003e\n"]]],[],null,["# Enabling external identities\n\nThis article shows you how to configure Identity-Aware Proxy\n(IAP) to use external identities. By combining\nIAP and Identity Platform, you can authenticate users with a\nwide range of identity providers (such as OAuth, SAML, OIDC, and more),\ninstead of just Google accounts.\n\nEnabling and configuring Identity Platform\n------------------------------------------\n\nIAP uses Identity Platform to authenticate external identities.\nSee the [Quickstart for Identity Platform](/identity-platform/docs/quickstart-cicp)\nto learn how to enable it.\n\nIf you want to utilize multiple tenants, you'll also need to follow the steps in\n[Getting started with multi-tenancy](/identity-platform/docs/multi-tenancy-quickstart).\nIf you don't need to isolate resources, you can skip this step and configure\nall your providers at the project level. Consult the\n[overview on external identities](/iap/docs/external-identities) if you're unsure if you\nshould turn on multi-tenancy.\n\nFinally, you'll need to enable providers. The\n[quickstart](/identity-platform/docs/quickstart-cicp) shows how to use simple\nusername and password authentication, but Identity Platform supports a wide\nrange of provider types, including:\n\n- Email and password\n- OAuth (such as Google, Facebook, Twitter, and more)\n- SAML\n- OIDC\n- Phone number\n- Anonymous\n\nSee the rest of the [Identity Platform documentation](/identity-platform/docs)\nto learn how to configure other providers. Note that phone number and anonymous\nauthentication are not supported for use with multi-tenancy.\nPasswordless sign-in using an email link is not supported with\nIAP.\n\nEnabling IAP to use external identities\n---------------------------------------\n\nOnce you've set up Identity Platform, you can configure IAP\nto use it for authentication.\n\n1. Open the IAP page in the Google Cloud console. \n\n [Open the IAP page](https://console.cloud.google.com/security/iap)\n\n2. Select the same project that you configured Identity Platform with. Using\n different projects is not supported.\n\n3. Select the **Applications** tab.\n\n4. Locate the service you want to restrict access to by using\n IAP.\n\n5. Toggle the switch in the IAP column to **On**.\n\n6. In the side panel, click **Start** in the box labeled\n **Use external identities for authorization**.\n\n7. Confirm your selection.\n\n8. In the Identity Platform side panel:\n\n 1. Choose whether to build your own sign-in page, or have\n IAP create one for you.\n\n Letting IAP create the sign-in page is the fastest\n way to get started. You don't need to deploy additional services or\n write any new code, and can specify minor customizations using JSON.\n See [Hosting an authentication UI on Cloud Run](/iap/docs/cloud-run-sign-in)\n to learn more.\n\n **Domain restricted sharing:**\n If the project is subject to the [domain restricted sharing constraint in\n an organization policy](/resource-manager/docs/organization-policy/restricting-domains),\n you will be unable to create public services by\n default. You can use [tags](/run/docs/configuring/tags)\n and a conditional policy to exempt specific services from this constraint.\n For more information, see the blog post about\n [creating public Cloud Run services](https://cloud.google.com/blog/topics/developers-practitioners/how-create-public-cloud-run-services-when-domain-restricted-sharing-enforced)\n when domain restricted sharing is enforced.\n\n Building your own page is more complex, but gives you full control of\n the authentication flow and experience. See\n [Creating an authentication UI with FirebaseUI](/iap/docs/using-firebaseui) and\n [Creating a custom authentication UI](/iap/docs/create-custom-auth-ui)\n for more information.\n 2. If you chose to build your own UI, enter an **Authentication URL**.\n IAP will redirect unauthenticated requests it\n receives to this URL.\n\n Including your API key in the URL is optional. If you don't provide a\n key, the Google Cloud console will append your default key\n automatically.\n 3. Select whether to use **project providers** or **tenants**.\n\n 4. Check the boxes of the providers or tenants to enable. Select\n **Configure providers** if you need to modify your providers or tenants.\n\n9. Click **Save**.\n\nCongratulations! IAP is configured to authenticate users\nwith external identities.\n\nSwitching back to Google identities\n-----------------------------------\n\nYou cannot use IAM for authorization when using external\nidentities. If you want to switch back to Google identities so you can\nleverage IAM, follow these steps:\n\n1. Return to the IAP page in the Google Cloud console. \n\n [Open the IAP page](https://console.cloud.google.com/security/iap)\n\n2. Select the resource configured to use IAP.\n\n3. Open the Identity Platform information panel.\n\n4. Select **Use IAM to manage this resource**.\n\nNote that switching back to Google identities will clear your authentication URL\nand associated project and tenants.\n\nWhat's next\n-----------\n\n- [Host a sign-in page on Cloud Run](/iap/docs/cloud-run-sign-in).\n- [Create a sign-in page with FirebaseUI](/iap/docs/using-firebaseui).\n- [Create a custom sign-in page](/iap/docs/create-custom-auth-ui).\n- Gain a deeper understanding of how [external identities work with IAP](/iap/docs/external-identities)."]]