question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support impersonated_service_account for application default credentials

See original GitHub issue

I am able to run my application in development as myself using:

gcloud auth application-default login

However, I’d prefer to run as a service account:

gcloud auth application-default login --impersonate-service-account=service-account-name

I can successfully log in, but when using Google.Cloud.Diagnostics.Common version 5.0.0, I encounter the following error when using the service account:

Error creating credential from JSON or JSON parameters. Unrecognized credential type impersonated_service_account.

Describe the solution you’d like I’d like to be able to impersonate a service account in development.

Describe alternatives you’ve considered The alternative is to use the less secure approach of using my own credentials when running the application. This also means the code running in development is running under a different user from its normal situation.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
amanda-tarafacommented, Apr 22, 2023

@nzbart I’ve removed this issue from the backlog as we’ve added support for this in #2394.

I’m keeping it closed as a duplicate of #2363 which is currently open. Please follow #2363 if you want to get notified when the PR is merged etc.

1reaction
amanda-tarafacommented, Oct 4, 2022

The Auth team has included this feature request on their backlog as a low priority item. I’ll move this issue to our backlog as well, and we’ll reopen once the Auth team has prioritized. Thank you for the request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use service account impersonation | Authentication
You can use service account impersonation to set up a local Application Default Credentials (ADC) file. Client libraries that support impersonation can use ......
Read more >
How to impersonate Service Accounts in Google Cloud
To Change the permissions assigned to service account , use IAM as shown below. Step 2: Let's assign a actual end user basic...
Read more >
GCP: ADC + Impersonating Service account
gcloud auth application-default login --impersonate-service-account=<sa_email>. The user I am authenticating with has the Service Account ...
Read more >
impersonated_service_account do not take into account
When you set up you user Application Default Credential with the gcloud SDK and you add a impersonated service account (command line gcloud ......
Read more >
Doing service account things without a service account key
To help ensure that your application supports both personal credentials and service account credentials, use the Cloud Client Libraries to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found