-
Notifications
You must be signed in to change notification settings - Fork 33
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
Firestore: using listDocuments() requires EmulatorCredentials when running with dev services #554
Comments
Example implementation based on the reference docs. Running this example results in an error when dev services are enabled.
|
Branch with implemented testcase: https://github.com/jfbenckhuijsen/quarkus-google-cloud-services/tree/firestore-admin-queries |
I see the following issues with the current implementation:
It might be possible to hard-code (or make it configurable) to inject the EmulatorCredentials in the
Given the above, do we want to inject the EmulatorCredentials based on I think I can probably create a PR for the above, but would first like some discussion on where to take this. |
Anyone able to respond to this? |
Hi, I think we can switch to As you said, this is not the case for FirebaseAdmin, people that uses FirebaseAdmin must provide an object of type GoogleCredentials. This PR did exactly that: #579 As you said, we should be able, when using emulator, to automatically create such overridden bean, if you're willing to do this (ideally for all supported service that provides emulator configuration) a PR would be highly welcome. |
On it! |
#602 created |
As far as I could tell, only Firestore has specific EmulatorCredentials to use. Spanner has a setEmulatorHost, but that has already been implemented. So AFAIK this should complete this issue |
@loicmathieu tested a local SNAPSHOT version of the code vs my own setup, seems to work nicely, so looks like we can close this issue? |
Yes, thanks for reporting! Fixed by #602 |
Operations like Firestore.listDocuments() require specific Admin credentials. In the production environment this is ensured by the default GCP credentials, however, when connecting to an emulator (i.e. via Dev Services) specific credentials need to be provided, for which the EmulatorCredentials class can be used.
The current integration logic does not provide this functionality, therefore these operations cannot be used in an emulator environment.
The text was updated successfully, but these errors were encountered: