Skip to content

feat: allow Workload Identity Federation for Google connector#2

Open
midu-git wants to merge 1 commit intomasterfrom
CLOUD-1304
Open

feat: allow Workload Identity Federation for Google connector#2
midu-git wants to merge 1 commit intomasterfrom
CLOUD-1304

Conversation

@midu-git
Copy link
Collaborator

@midu-git midu-git commented Jun 3, 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
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.

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.

@midu-git midu-git force-pushed the CLOUD-1304 branch 3 times, most recently from 3a5dfa3 to 3a25deb Compare June 4, 2025 06:35
@midu-git midu-git force-pushed the CLOUD-1304 branch 4 times, most recently from b6b991d to 8a52fa5 Compare June 4, 2025 09:00
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 <michael.dudzinski@aetherize.com>
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