Skip to content

Support WIF Impersonation on GCP workloads#2496

Merged
sfc-gh-eqin merged 15 commits intomainfrom
eqin-wif-impersonation-poc
Sep 3, 2025
Merged

Support WIF Impersonation on GCP workloads#2496
sfc-gh-eqin merged 15 commits intomainfrom
eqin-wif-impersonation-poc

Conversation

@sfc-gh-eqin
Copy link
Contributor

@sfc-gh-eqin sfc-gh-eqin commented Aug 21, 2025

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    SNOW-2183347

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency
  3. Please describe how your code solves the related issue.

    Please write a short description of how your code change solves the related issue.

The issue is that some use cases have a CSP account that maps to multiple other CSP accounts, each of which may map to a Snowflake user.

The code does the following on GCP workloads:

  • Allows users to specify a workload_identity_impersonation_path of impersonated accounts
  • Uses the impersonations and the IAM credentials API to get the identity token for the last service account in the impersonation path
  • Uses the same verification procedure with the Snowflake backend to get a session token with the user corresponding to the last service account in the impersonation path
  1. (Optional) PR for stored-proc connector:

Manual Testing

Verified that this works on GCP (see private doc)

@github-actions
Copy link

github-actions bot commented Aug 21, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Contributor Author

sfc-gh-eqin commented Aug 21, 2025

@sfc-gh-eqin sfc-gh-eqin changed the title initial changes WIF Impersonation POC Aug 21, 2025
Copy link
Contributor

@sfc-gh-pmansour sfc-gh-pmansour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is broadly the right direction! Let's clean up the code, validate it on a real GCP environment, add tests, then expand to other CSPs

@sfc-gh-eqin sfc-gh-eqin changed the title WIF Impersonation POC Support WIF Impersonation on GCP workloads Aug 25, 2025
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@sfc-gh-eqin sfc-gh-eqin changed the base branch from main to graphite-base/2496 August 27, 2025 18:25
@sfc-gh-eqin sfc-gh-eqin force-pushed the eqin-wif-impersonation-poc branch 2 times, most recently from 61b6f2e to ba7308c Compare August 27, 2025 19:59
@sfc-gh-eqin sfc-gh-eqin changed the base branch from graphite-base/2496 to pmansour/verify-users-in-wif-integration-test August 27, 2025 19:59
@sfc-gh-eqin sfc-gh-eqin force-pushed the eqin-wif-impersonation-poc branch from e4cf2ed to 4c804ff Compare August 29, 2025 05:38
Base automatically changed from pmansour/verify-users-in-wif-integration-test to main August 29, 2025 07:37
Copy link
Contributor

@sfc-gh-pmansour sfc-gh-pmansour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just rebase + fix a few minor comments, and I think you're ready to merge today :)

@sfc-gh-eqin sfc-gh-eqin force-pushed the eqin-wif-impersonation-poc branch from ec794b4 to c70fed8 Compare September 3, 2025 15:35
@sfc-gh-pmansour
Copy link
Contributor

@sfc-gh-eqin you may need to update the release notes to add a new section for vNext, and add a bullet point saying impersonation for workload identity federation is now supported.

sfc-gh-eqin and others added 2 commits September 3, 2025 09:07
Co-authored-by: Peter Mansour <peter.mansour@snowflake.com>
Co-authored-by: Peter Mansour <peter.mansour@snowflake.com>
@sfc-gh-eqin sfc-gh-eqin merged commit 53e0165 into main Sep 3, 2025
95 of 99 checks passed
@sfc-gh-eqin sfc-gh-eqin deleted the eqin-wif-impersonation-poc branch September 3, 2025 17:54
@github-actions github-actions bot locked and limited conversation to collaborators Sep 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants