Skip to content

[Dataform CLI] Error when using service account impersonation through ADC #2056

Description

@i-kounakis

According to the documentation, it should be possible to use service account impersonation through ADC
https://docs.cloud.google.com/dataform/docs/authentication#sa-impersonation

However, when I setup impersonation and try to run dataform init-creds I get the following error

Running connection test...
Dataform encountered an error: Credentials test query failed: Error: The incoming JSON object does not contain a client_email field
Error: Credentials test query failed: Error: The incoming JSON object does not contain a client_email field
    at JWT.fromJSON (/opt/homebrew/lib/node_modules/@dataform/cli/node_modules/google-auth-library/build/src/auth/jwtclient.js:208:19)
    at GoogleAuth._cacheClientFromJSON (/opt/homebrew/lib/node_modules/@dataform/cli/node_modules/google-auth-library/build/src/auth/googleauth.js:340:20)
    at ReadStream.<anonymous> (/opt/homebrew/lib/node_modules/@dataform/cli/node_modules/google-auth-library/build/src/auth/googleauth.js:376:40)
    at ReadStream.emit (node:events:508:28)
    at endReadableNT (node:internal/streams/readable:1701:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:89:21)
    at Object.processFn (/opt/homebrew/lib/node_modules/@dataform/cli/bundle.js:28096:39)
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
    at async Object.handler (/opt/homebrew/lib/node_modules/@dataform/cli/bundle.js:27147:30)

Steps to reproduce:

gcloud auth application-default login --impersonate-service-account=SERVICE_ACCT_EMAIL
dataform init-creds

dataform: v3.0.39
node: v25.2.1

Please let me know if you need more information to reproduce this. 🙏

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions