Skip to content
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

Feature: Add "User Service Account Impersonation" auth mode for GCP #7223

Open
harrismendell opened this issue Sep 27, 2023 · 0 comments
Open

Comments

@harrismendell
Copy link

harrismendell commented Sep 27, 2023

PR: #7224

Idea: Add an auth mode for GCP that allows Cromwell to impersonate a service account and use short-lived credentials for calls to GCP.

Context: Service account impersonation is now the defacto recommendation when choosing an authentication mechanism that relies on service accounts. Some teams (such as Verily) might prefer this approach over the current option to rely on downloaded service account keys.

How it works
Users would specify an auth block in the .conf file with one of the following formats. The first specifies

  • Application default credentials used for source service account
{
  name = "user-service-account"
  scheme = "user_service_account_impersonation"
}
  • A specified JSON file used for source service account
{
  name = "user-service-account"
  scheme = "user_service_account_impersonation"
  json-file= "path/to/file.json"
}

Users would then add the following option when making workflow requests:

{
  "user_service_account_email": "someemail@domain.com
}

Cromwell would use the source service account to impersonate the target service account from the workflowOptions. It would then mint and refresh access tokens from this target service account for all GCP requests.

In order for this to work, the source service account would need the IAM role roles/iam.serviceAccountTokenCreator.

If the team would prefer a smaller PR
We could change this to only ever use applicationDefaultCredentials, in which case we could remove parts of the code that are altering ServiceAccountMode

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

No branches or pull requests

1 participant