Skip to content

feat: [Google connector] use Cloud Identity API for fetching groups #4169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

midu-git
Copy link

@midu-git midu-git commented Jun 4, 2025

A new Google connector option, useCloudIdentityApi, has been introduced.
If the value is true, dex will use cloud identity api to fetch
groups. In particular, no user impersonation happens. The logic to
obtain the credentials is based on Application Default Credentials.
Alternatively, the user is allowed to pass a path to a credentials JSON
file using serviceAccountFilePath. In both cases, the principal
linked to the credentials requires group read rights. In case
of a Service Account, a custom admin role with this right need to be
created in Google Workspace, and the Service Account needs to be
assigned to this role.

Moreover, Workload Identity Federation is supported as Application Default
Credentials supports this use case. Make sure to include
Service Account Token Creator for the linked service account in that
case.

Overview

What this PR does / why we need it

Until now, user impersonation was required to fetch groups for a certain user. In this PR, the user is allowed to opt-in for using cloud identity api which doesn't require user impersonation. Moreover, as Application Default Credentials are being used, Workload Identity Federation is supported with this PR, allowing interactions with Google Services from external sources, e.g. AWS, without requiring to provide any sensitive credential data on the caller side, c.f. here.

Special notes for your reviewer

Does this PR introduce a user-facing change?

A new Google connector option, `useCloudIdentityApi`, has been introduced.
If the value is `true`, dex will use cloud identity api to fetch
groups. In particular, no user impersonation happens. The logic to
obtain the credentials is based on Application Default Credentials.
Alternatively, the user is allowed to pass a path to a credentials JSON
file using `serviceAccountFilePath`. In both cases, the principal
described linked to the credentials requires group read rights. In case
of a Service Account, a custom admin role with this right need to be
created in Google Workspace, and the Service Account needs to be
assigned to this role.

Moreover, Workload Identity Federation is supported as Application Default
Credentials supports this use case. Make sure to include
`Service Account Token Creator` for the linked service account in that
case.

A new Google connector option, `useCloudIdentityApi`, has been introduced.
If the value is `true`, dex will use cloud identity api to fetch
groups. In particular, no user impersonation happens. The logic to
obtain the credentials is based on Application Default Credentials.
Alternatively, the user is allowed to pass a path to a credentials JSON
file using `serviceAccountFilePath`. In both cases, the principal
described linked to the credentials requires group read rights. In case
of a Service Account, a custom admin role with this right need to be
created in Google Workspace, and the Service Account needs to be
assigned to this role.
Moreover, Workload Identity Federation is supported as Application Default
Credentials supports this use case. Make sure to include
`Service Account Token Creator` for the linked service account in that
case.

Signed-off-by: Michael Dudzinski <[email protected]>
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.

1 participant