Identity Providers
Daftar Identity Provider yang didukung AlurKerja via Keycloak, pola umum konfigurasi, dan petunjuk per-IdP (OIDC/SAML generic, social provider, enterprise).
AlurKerja memakai Keycloak sebagai Identity & Access Management (IAM) gateway. Setiap Identity Provider (IdP) yang didukung Keycloak — protokol standar maupun social/enterprise — dapat dipasang untuk meng-otentikasi user ke AlurKerja. Halaman ini berisi daftar lengkap, pola konfigurasi yang sama untuk semua IdP, dan catatan spesifik per provider.
Konsep
Browser user
│
▼
AlurKerja ──► Keycloak ──► Identity Provider eksternal
◄────────── token ◄────────── (Google / GitHub / Azure / dst.)- Keycloak menjadi broker — user login lewat Keycloak, Keycloak yang meneruskan ke IdP eksternal.
- Setelah berhasil di IdP, Keycloak menerbitkan token yang dipakai AlurKerja.
- Mapper di Keycloak menerjemahkan atribut user IdP (email, nama, role) ke format AlurKerja.
Daftar Identity Provider yang Didukung
| Provider | Tipe | Protokol | Status di Docs |
|---|---|---|---|
| OpenID Connect v1.0 (generic) | Standard | OIDC | Pola generic di bawah |
| SAML v2.0 (generic) | Standard | SAML 2.0 | Pola generic di bawah |
| Social | OAuth 2.0 / OIDC | Petunjuk di bawah | |
| Microsoft | Social / Enterprise | OAuth 2.0 / OIDC | Petunjuk di bawah; untuk Azure Entra ID lihat Integrasi Azure Entra ID ke Keycloak |
| GitHub | Social | OAuth 2.0 | Petunjuk di bawah |
| GitLab | Social / Self-hosted | OAuth 2.0 / OIDC | Petunjuk di bawah |
| Bitbucket | Social | OAuth 2.0 | Petunjuk di bawah |
| Social | OAuth 2.0 | Petunjuk di bawah | |
| Social | OAuth 2.0 | Petunjuk di bawah | |
| Social | OAuth 2.0 | Petunjuk di bawah | |
| X (Twitter) | Social | OAuth 2.0 | Petunjuk di bawah |
| Slack | Social | OAuth 2.0 | Petunjuk di bawah |
| PayPal | Social | OAuth 2.0 | Petunjuk di bawah |
| Stack Overflow | Social | OAuth 2.0 | Petunjuk di bawah |
| OpenShift v3 | Enterprise | OAuth 2.0 | Petunjuk di bawah |
| OpenShift v4 | Enterprise | OAuth 2.0 | Petunjuk di bawah |
Daftar di atas mencerminkan IdP yang built-in di Keycloak. Bila environment Anda memakai versi Keycloak lebih baru, IdP lain (mis. Apple, Discord) bisa muncul sebagai opsi tambahan.
Pola Umum Konfigurasi
Pola enam langkah ini berlaku untuk semua IdP. Detail spesifik diatur di section tiap IdP di bawah.
1. Register aplikasi di IdP target
Login ke developer console / admin console IdP. Buat "OAuth Application" / "OAuth Client" / "App Registration" baru, sesuai nama yang dipakai IdP tersebut.
2. Catat Client ID dan Client Secret
Setelah register, IdP akan menerbitkan Client ID dan Client Secret (atau API Key + Secret). Simpan keduanya — Client Secret seringkali hanya tampil satu kali.
3. Daftarkan Redirect URI di IdP
Setiap IdP butuh callback URL yang akan dipanggil setelah user berhasil login. Pola URL Keycloak:
https://<keycloak-host>/realms/<realm>/broker/<alias>/endpoint<keycloak-host>— host Keycloak Anda (mis.sso.alurkerja.com).<realm>— realm di Keycloak (mis.internal).<alias>— nama alias yang akan Anda set untuk IdP di Keycloak (mis.google,github).
4. Buat Identity Provider di Keycloak
- Login ke Keycloak Admin Console.
- Pilih realm target → menu Identity Providers → Add provider → pilih provider yang sesuai.
- Isi Alias (= bagian
<alias>di Redirect URI). - Tempel Client ID dan Client Secret dari Step 2.
- Sesuaikan opsi lain (Default Scopes, Sync Mode, Trust Email, dst.) bila perlu.
5. Atur Mapper (atribut user)
Di tab Mappers identity provider tersebut, tambahkan mapper untuk memetakan atribut IdP → user Keycloak. Yang umum:
| Atribut Keycloak | Atribut IdP (umum) |
|---|---|
email | email |
firstName | given_name / first_name |
lastName | family_name / last_name |
username | preferred_username / email |
6. Uji login
Buka halaman login AlurKerja → harus muncul tombol/opsi login dengan IdP yang baru ditambahkan. Selesaikan flow login dan pastikan user otomatis dibuat di Keycloak/AlurKerja.
Konfigurasi Generic Protocol
OpenID Connect v1.0 (generic)
Untuk IdP berbasis OIDC yang tidak punya integrasi khusus (mis. Auth0, Okta, Authentik, custom). Di Keycloak, pilih provider "OpenID Connect v1.0".
Yang perlu diisi:
| Field Keycloak | Sumber |
|---|---|
| Authorization URL | <issuer>/authorize (atau ambil dari discovery) |
| Token URL | <issuer>/token |
| Logout URL | <issuer>/logout (opsional) |
| Client ID | dari IdP |
| Client Secret | dari IdP |
| Default Scopes | openid profile email |
Discovery shortcut: Keycloak bisa otomatis mengambil endpoint dengan paste URL .well-known/openid-configuration dari IdP. Lebih cepat daripada isi manual.
SAML v2.0 (generic)
Untuk enterprise on-prem (ADFS, Shibboleth, OneLogin, dst.). Di Keycloak, pilih provider "SAML v2.0".
Yang perlu diisi:
| Field Keycloak | Sumber |
|---|---|
| Single Sign-On Service URL | dari IdP metadata |
| Single Logout Service URL | dari IdP metadata |
| NameID Policy Format | umumnya email |
| Validating X509 Certificate | sertifikat publik IdP |
| Want AuthnRequests Signed | sesuai kebijakan IdP |
Import metadata XML lebih praktis: di halaman Add SAML provider, gunakan tombol Import dan unggah metadata XML dari IdP. Keycloak akan mengisi semua field otomatis.
Konfigurasi Social Provider
| Item | Nilai |
|---|---|
| Developer console | console.cloud.google.com → APIs & Services → Credentials |
| Tipe aplikasi | OAuth client ID → Web application |
| Authorized redirect URI | Redirect URI Keycloak (lihat Step 3) |
| Scope yang umum | openid profile email |
| Keycloak provider alias | google |
Microsoft
Untuk akun Microsoft umum (consumer + work/school). Untuk Azure Entra ID enterprise, lihat halaman terpisah Integrasi Azure Entra ID ke Keycloak.
| Item | Nilai |
|---|---|
| Developer console | portal.azure.com → App Registrations |
| Supported account types | sesuaikan (Personal / Multitenant / Single tenant) |
| Redirect URI | tipe Web, isi Redirect URI Keycloak |
| Scope yang umum | openid profile email User.Read |
| Keycloak provider alias | microsoft |
GitHub
| Item | Nilai |
|---|---|
| Developer console | github.com/settings/developers → OAuth Apps → New OAuth App |
| Homepage URL | URL AlurKerja Anda |
| Authorization callback URL | Redirect URI Keycloak |
| Scope yang umum | read:user user:email |
| Keycloak provider alias | github |
GitLab
| Item | Nilai |
|---|---|
| Developer console | gitlab.com/-/user_settings/applications (atau Group/Instance Applications untuk GitLab self-hosted) |
| Redirect URI | Redirect URI Keycloak |
| Scope yang umum | openid read_user email |
| Keycloak provider alias | gitlab |
| GitLab self-hosted | ganti Authorization URL dan Token URL ke base URL GitLab Anda |
Bitbucket
| Item | Nilai |
|---|---|
| Developer console | Workspace settings → OAuth consumers → Add consumer |
| Callback URL | Redirect URI Keycloak |
| Permissions yang umum | Account: Email, Account: Read |
| Keycloak provider alias | bitbucket |
| Item | Nilai |
|---|---|
| Developer console | linkedin.com/developers/apps → Create app |
| Authorized redirect URLs | Redirect URI Keycloak |
| Product yang harus di-add | Sign In with LinkedIn using OpenID Connect |
| Scope yang umum | openid profile email |
| Keycloak provider alias | linkedin |
| Item | Nilai |
|---|---|
| Developer console | developers.facebook.com → My Apps → Create App (tipe Consumer) |
| Product yang harus di-add | Facebook Login |
| Valid OAuth Redirect URIs | Redirect URI Keycloak |
| Scope yang umum | email public_profile |
| Keycloak provider alias | facebook |
Instagram berada di bawah Meta Developer Platform — registrasinya mirip Facebook.
| Item | Nilai |
|---|---|
| Developer console | developers.facebook.com → app → Instagram Basic Display / Instagram Login |
| Valid OAuth Redirect URIs | Redirect URI Keycloak |
| Keycloak provider alias | instagram |
Instagram Basic Display API memiliki keterbatasan signifikan (read-only profile, tidak ada email). Untuk login enterprise, Google atau Microsoft umumnya lebih praktis.
X (Twitter)
| Item | Nilai |
|---|---|
| Developer console | developer.x.com → Projects & Apps → buat app |
| OAuth setting | OAuth 2.0 enabled → set Callback URI ke Redirect URI Keycloak |
| Scope yang umum | tweet.read users.read offline.access |
| Keycloak provider alias | twitter (Keycloak masih pakai nama lama "Twitter") |
X API kini berbayar untuk tier tertentu. Pastikan kebutuhan login termasuk dalam tier yang Anda gunakan.
Slack
| Item | Nilai |
|---|---|
| Developer console | api.slack.com/apps → Create New App → From scratch |
| Section | OAuth & Permissions → Redirect URLs |
| Scope yang umum (User Token Scopes) | identity.basic identity.email identity.avatar |
| Keycloak provider alias | slack |
PayPal
| Item | Nilai |
|---|---|
| Developer console | developer.paypal.com → My Apps & Credentials |
| App type | REST API app |
| Return URL | Redirect URI Keycloak |
| Keycloak provider alias | paypal |
Integrasi PayPal di sini untuk login identity (Log In With PayPal), bukan untuk transaksi pembayaran.
Stack Overflow
| Item | Nilai |
|---|---|
| Developer console | stackapps.com/apps/oauth/register |
| OAuth Domain | host Keycloak Anda |
| Application Website | URL AlurKerja |
| Keycloak provider alias | stackoverflow |
Konfigurasi Enterprise / Container Platform
OpenShift v3
| Item | Nilai |
|---|---|
| Tipe register | OAuth client di OpenShift |
| Konfigurasi | edit OpenShift master config (master-config.yaml) atau via oc create -f oauthclient.yaml |
| Redirect URI | Redirect URI Keycloak |
| Keycloak provider alias | openshift-v3 |
OpenShift v4
Mirip v3 dengan API resource yang berbeda.
| Item | Nilai |
|---|---|
| Tipe register | OAuthClient (cluster-scoped resource) |
| Konfigurasi | oc apply -f oauthclient.yaml (manifest berisi redirectURIs dan secret) |
| Redirect URI | Redirect URI Keycloak |
| Keycloak provider alias | openshift-v4 |
Penyesuaian Mapper
Setelah identity provider aktif, tambahkan Mappers di tab Mappers identity provider Anda untuk memetakan atribut user. Mapper type yang umum dipakai:
| Mapper type | Kegunaan |
|---|---|
| Attribute Importer (OIDC) / Attribute Importer (SAML) | Salin atribut IdP ke user attribute Keycloak. |
| Hardcoded User Attribute | Set atribut tetap (mis. tag tenant). |
| Hardcoded Role | Tetapkan role realm otomatis ke user IdP. |
| Username Template Importer | Bentuk username dari beberapa atribut IdP. |
Untuk contoh konkret mapper di IdP enterprise, lihat section Mappers di Integrasi Azure Entra ID ke Keycloak.
Troubleshooting
| Gejala | Penyebab & Solusi |
|---|---|
Invalid redirect URI di IdP | Redirect URI yang didaftarkan di IdP tidak sama persis dengan yang dipanggil Keycloak. Cek <keycloak-host>, <realm>, dan <alias> — termasuk trailing slash. |
| Login balik ke halaman login Keycloak tanpa error | Mapper email kosong / username conflict. Cek tab Mappers, pastikan email ter-import. |
| User tercipta tetapi tidak punya email | IdP tidak menyertakan email di scope default. Tambah scope email (openid profile email, atau IdP-specific) dan tambahkan Attribute Importer mapper untuk email. |
| Login berhasil tapi user tidak masuk AlurKerja | Token Keycloak valid tapi mapping role belum jalan. Cek Default Roles realm dan mapper role. |
| Tombol IdP tidak muncul di halaman login | Identity provider non-aktif, atau First Login Flow salah set. Aktifkan di Keycloak Admin Console. |
| SAML — error tanda tangan | Sertifikat IdP yang ditempel di Keycloak salah/expired. Re-import metadata XML IdP. |
Lihat Juga
- Integrasi Azure Entra ID ke Keycloak — walkthrough lengkap dengan screenshot untuk Azure Entra ID.
- Membuat User Baru — administrasi user di Keycloak.
- Impersonate User — login sebagai user lain untuk QA/troubleshooting.
