Skip to content

connector: add gcloud-iap connector for Google Cloud IAP#4751

Open
alessandro-verzicco wants to merge 1 commit intodexidp:masterfrom
alessandro-verzicco:feat/gcloud-iap-connector
Open

connector: add gcloud-iap connector for Google Cloud IAP#4751
alessandro-verzicco wants to merge 1 commit intodexidp:masterfrom
alessandro-verzicco:feat/gcloud-iap-connector

Conversation

@alessandro-verzicco
Copy link
Copy Markdown

@alessandro-verzicco alessandro-verzicco commented Apr 17, 2026

Summary

Adds a new gcloud-iap connector that validates Google Cloud Identity-Aware Proxy (IAP) JWTs and optionally resolves Google Workspace group membership.

What it does

  • Cryptographic JWT verification — validates the ES256 X-Goog-IAP-JWT-Assertion header against Google's public JWKS, checking issuer, audience, and expiry.
  • Identity extraction — maps the verified JWT claims (sub, email) to a Dex identity.
  • Optional group resolution — fetches Google Workspace group membership via the Admin Directory API using workload identity (Application Default Credentials). No domain-wide delegation required — only the Groups Reader admin role.
  • Glob-based group filtering — supports patterns like *@example.com, platform-*@example.com, or exact matches. Case-insensitive. Multiple patterns are OR-ed.
  • Transitive group membership — optionally resolves nested groups recursively.
  • Single-domain and multi-domain — supports both domain and customerID scoping.

Files changed

  • connector/gcloudiap/gcloudiap.go — connector implementation
  • connector/gcloudiap/gcloudiap_test.go — unit tests
  • server/server.go — register gcloud-iap type in ConnectorsConfig
  • docs/connectors/gcloud-iap.md — documentation

How to test

  1. Deploy Dex behind a Google Cloud IAP-protected load balancer.
  2. Configure the connector with the backend service audience string.
  3. Optionally enable group resolution by setting groupsFilter and domain/customerID.
    Unit tests cover JWT verification (valid, expired, wrong audience, missing header), config validation, glob filtering logic, and URL construction.

Refs #4567

Add a new connector that validates Google Cloud Identity-Aware Proxy (IAP)
ES256 JWTs from the X-Goog-IAP-JWT-Assertion header. The connector:
- Cryptographically verifies the IAP JWT signature via Google's public JWKS
- Extracts user identity (email, subject) from verified JWT claims
- Optionally resolves Google Workspace group membership via the Admin
  Directory API using workload identity (no domain-wide delegation required)
- Supports glob-based group filtering with case-insensitive matching
- Supports transitive (nested) group membership resolution
- Works with both single-domain (domain) and multi-domain (customerID) setups
Refs dexidp#4567

Signed-off-by: Alessandro Verzicco <alessandro.verzicco@truecaller.com>
@nabokihms
Copy link
Copy Markdown
Member

Hello, thank you for opening the PR. We are currently not accepting new connectors to upstream - we are figuring out the way to implement external connectors #4578

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants