Short answer
• Identity Platform has no direct, “out-of-the-box” connector for LDAP or on-prem Active Directory.
• You can, however, federate with AD (or any system that can speak SAML 2.0 / OIDC) and you can mint custom tokens that contain the roles you read from LDAP.
• If you must pull group/role data straight from LDAP, you’ll need a thin service layer of your own.
Below are the practical ways teams solve this on GCP, with pros/cons and setup pointers.
────────────────────────────────────────────────────────
- Federate AD through SAML or OpenID Connect
────────────────────────────────────────────────────────
What it is
Expose your customer’s AD (or LDAP-backed IdM) as a SAML 2.0 or OIDC Identity Provider (IdP)—for example with ADFS, Azure AD, Okta, Ping, Keycloak.
Identity Platform then acts as the Service Provider / RP.
High-level flow
Browser ─────▶ Identity Platform (SP)
│
└───▶ SAML / OIDC redirect
(AD FS / Azure AD / Keycloak / …)
│
└──▶ AD/LDAP
Where do the roles go?
• In the SAML assertion / ID-token you can include group membership or any LDAP attribute.
• Identity Platform does not automatically map those attributes to Firebase custom claims, but your backend (Cloud Functions / Cloud Run / App Engine, etc.) can read the X-Goog-Authenticated-User-JWT header, parse the assertion, and set custom claims the first time the user signs in.
Pros
✓ No code needed for password validation; customers keep the credentials.
✓ Works with MFA / smartcards / conditional access policies already configured in AD.
Cons
✗ Requires customers to expose a SAML/OIDC endpoint.
✗ You still need a tiny bit of glue code if you want the roles to live in the Identity Platform ID-token (custom claims).
Docs
• Identity Platform SAML how-to: https://cloud.google.com/identity-platform/docs/web/saml
• Identity Platform OIDC how-to: https://cloud.google.com/identity-platform/docs/web/oidc
────────────────────────────────────────────────────────
2. Custom authentication with LDAP look-ups
────────────────────────────────────────────────────────
What it is
Write a small service (Cloud Run / Cloud Functions) that binds to the customer’s LDAP directory, validates the user’s credentials, fetches groups/roles, mints a Firebase custom token, and hands it back to the client.
High-level call sequence
App → /auth/login (your service)
• Bind to LDAP (LDAPS preferred)
• DN search + password check
• Read "memberOf" / role attributes
• Mint Firebase custom token with claims { roles: [...] }
• Return token to client
Client → Identity Platform signInWithCustomToken(token)
Pros
✓ Works even when customers cannot expose SAML/OIDC.
✓ Complete control over how you map LDAP data ⇒ claims.
Cons
✗ You are now responsible for credential handling, password security, rate limiting, etc.
✗ Initial engineering effort.
Docs
• Custom token flow: https://cloud.google.com/identity-platform/docs/use-custom-auth-tokens
• Firebase Admin SDK mintToken(): https://firebase.google.com/docs/auth/admin/create-custom-tokens
────────────────────────────────────────────────────────
3. Sync AD → Google Cloud Identity and use Secure LDAP / IAP
────────────────────────────────────────────────────────
If you want a Google-managed directory that you can query, you can:
a. Use Google Cloud Directory Sync (GCDS) or AD Sync to mirror users & groups into Cloud Identity.
b. Enable Secure LDAP: Google then provides an LDAP-over-SSL endpoint you can point apps at.
c. Protect the web app with Identity-Aware Proxy (IAP) so users sign in with their synced Google identities.
d. Query group membership with the Cloud Identity Groups API inside your backend to perform RBAC.
This does not use Identity Platform at all, but sometimes matches enterprise requirements better.
────────────────────────────────────────────────────────
Which option should I pick?
────────────────────────────────────────────────────────
Decision matrix
| Requirement | Recommended path |
|---|
| Customer already has SAML / OIDC IdP | Option 1 (Federate) |
| Customer exposes only raw LDAP | Option 2 (Custom token) |
| You prefer Google-hosted directory + IAP | Option 3 (Cloud Identity / IAP) |
| Need very quick PoC | Option 1 if possible; Option 2 otherwise |
| Need tokens containing roles/groups | Any option, but you must map attributes → custom claims manually |
────────────────────────────────────────────────────────
Implementation tips for roles / groups
────────────────────────────────────────────────────────
- Size limits: Firebase/Identity Platform custom claims are limited to ~1000 bytes. If a user belongs to many groups push only the needed ones (or a single “role” claim and keep a lookup in Firestore/Datastore).
- Refresh strategy: Custom claims are cached in the ID-token for up to 1 hour. If group membership changes often, add a short TTL inside the claim and force token refresh on the client.
- Authorization middleware: In Cloud Run or Cloud Functions, use the Firebase Admin SDK to verify the ID-token and read
decodedToken.roles before calling business logic.
────────────────────────────────────────────────────────
Key take-aways
────────────────────────────────────────────────────────
• Identity Platform ≠ LDAP server; think of it as “Firebase Auth + enterprise extras.”
• Direct LDAP/AD hooks aren’t built-in, but SAML/OIDC federation or minting custom tokens covers the same use-case.
• Loading roles/groups requires you to map them into custom claims or call the directory directly—Identity Platform won’t do that for you automatically.
Happy building! If you need sample code or Terraform snippets for any of these setups, just let me know.