-
Notifications
You must be signed in to change notification settings - Fork 389
[FR] Allow initializing app manually with impersonated service account #2692
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
Comments
I found a few problems with this issue:
|
Added PR #2695 to fix this. |
@dconeybe could someone please weigh in on this one if it is feasible or not? This is blocking us from using more secure way to develop software locally. |
Hey @swftvsn thanks for your contribution on this. We are migrating our internal credentials handling to I have reprioritized this issue and actively working on it again to include #2466 in an official release. In the meantime if you are interested, could you try the test build shared in #1377 (comment) and confirm if that works with your impersonated service account? |
@lahirumaramba I can confirm that the solution in #2466 works for impersonated service accounts. |
Thanks! Should be fixed in #2466 |
Is your feature request related to a problem? Please describe.
We have a need to instantiate multiple instances of firebase admin to access multiple projects at the same time. This works nicely in production using:
However, it seems to be impossible to supply the impersonated service account json from local ADC login (obtained using
gcloud auth application-default login --impersonate-service-account [email protected]
) asImpersonatedServiceAccountCredential
is not exported.We rolled our own, but it fails as
isApplicationDefault
uses instanceof to do the checking.Describe the solution you'd like
Add a way to initialize from ADC logins manually: add a method (like
refreshToken
andcert
) tosrc/app/credential-factory.ts
that takesimpersonatedServiceAccountPathOrObject
etc as parameter.The text was updated successfully, but these errors were encountered: