use fake "owner" credential when rtdb emulator env var is set#2029
use fake "owner" credential when rtdb emulator env var is set#2029
Conversation
|
Hrm... I guess I have several interrelated questions...
|
The use case we want to support here is to enable the emulators in environments where we can't get a production access token (e.g., CI). The issue I'm trying to work around in this PR is that we're using a single global application credential for all emulators. I just talked offline with @ryanpbrewster and @yuchenshi and I think one path forward is to enforce the following policy in the admin sdk: if either Apologies for the back-and-forth on this. |
|
Per chat discussion, if we move forward with this approach, I think the special handling for RTDB should probably live in a new EmulatorAuthTokenProvider class akin to that just returns "owner" or whatever and swap it in when the env var is set. |
|
When this is ready for another review, can you please assign it to me? |
mikelehen
left a comment
There was a problem hiding this comment.
I think this mostly LGTM but a couple minor suggestions. Let me know what you think.
mikelehen
left a comment
There was a problem hiding this comment.
LGTM with one final nit. Thanks!
Today, the RTDB emulator accepts any production access token. We would like to support fully-offline emulator interaction that doesn't require an external auth provider. Some questions to follow up on:
RepoInfoclass?nsquery parameter is needed (RepoInfo#needsQueryParam)?