firebase-admin-node
firebase-admin-node copied to clipboard
fix: Fix impersonated service account parsing exception
Discussion
- related to #1861
Testing
- test for checking impersonated service account added.
API Changes
- no change on public API
Can I get any feedback on this? Or discussion on #1861 ?
@blue-hope thanks for the PR!
@lahirumaramba I notice you self-assigned the related issue https://github.com/firebase/firebase-admin-node/issues/1703 - would you be able provide any input on how to move this forward? Thanks very much!
@lahirumaramba I hope this feature will be dealt with soon. I would be so appreciated if you could give us a feedback or review.
Thank you everyone for your patience! Hey @blue-hope Thank you so much for the contribution! Just adding this note to let you know that I have started the review process. We also plan to migrate the credentials implementation to google-auth-library-nodejs (see https://github.com/firebase/firebase-admin-node/issues/1377) and once that is done firebase-admin will reach feature parity with google-auth-library-nodejs. In the meantime, I think it is reasonable to merge this change.
Thank you so much for reviewing.
(+ Just curious, when will that google-auth-library-nodejs implementation be finished?)
@lahirumaramba just a side-note on the migration to google-auth-library-nodejs:
Right now, it's possible to do the following using a local service account:
Run: gcloud auth application-default login
initializeFirebase({project: 'project'});
getFirestore().doc('foo/bar').get();
However, trying to authenticate with Identity Toolkit / Firebase Auth would fail:
initializeFirebase({project: 'project'});
getAuth().getUser('uid'); // -> throws an error
Would the migration to google-auth-library-nodejs library fix this problem?
Thank you so much for reviewing. (+ Just curious, when will that
google-auth-library-nodejsimplementation be finished?)
I can't promise a timeline for this, but we are starting the initial work this year. It will be a bit complex migration so we plan to perform it in multiple stages. We will use #1377 to track any progress.
@lahirumaramba just a side-note on the migration to
google-auth-library-nodejs: Right now, it's possible to do the following using a local service account:Run:
gcloud auth application-default logininitializeFirebase({project: 'project'}); getFirestore().doc('foo/bar').get();However, trying to authenticate with Identity Toolkit / Firebase Auth would fail:
initializeFirebase({project: 'project'}); getAuth().getUser('uid'); // -> throws an errorWould the migration to
google-auth-library-nodejslibrary fix this problem?
Hi @IchordeDionysos, This looks a bit strange. gcloud auth application-default login should set GCLOUD_CREDENTIAL_PATH and load ADC. If this is reproducible, please file a new issue with a code sample and any error logs. Thanks!
@lahirumaramba I'll add missing tests and notice to you before merge, thanks!
@lahirumaramba New test added. I missed checking implicit discovered credential, thanks a lot.
@lahirumaramba When this will be released? 😄
Definitively need this
Thank you @blue-hope for your contribution. This feature is now included in the v11.5.0 release.
Thanks folks for your patience on this! Try out the new feature if you get a chance and let us know what you think. If you encounter any issues, please open a new issue on Github. Thank you!