-
Notifications
You must be signed in to change notification settings - Fork 409
[WIP] Prototyping adding GCS support #14
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Change-Id: I5fa942e199b040743b3fc6b15c91f31a2b057418
Change-Id: I330e41d75bd3a1489242067e4bc5c79b1c9211ea
Change-Id: Icb631e1e67401d53d729632763d50819a41ea420
Change-Id: I709985ad3deabb56c92aa3744ad7e9d5eaa4a016
Change-Id: Ie6242994c7bfaa9a3c945250d7c95330bd8af09b
Change-Id: I6e2cf9eb7835d03764405693e3ad40658f946bb6
Change-Id: I48a6079a5b15bd814318f93b2656582ebf11b285
Change-Id: I2d135f556e1611ca05f17f7bc88784b3c6958105
Change-Id: I6c7b9524590e0a3ab95a1e27db52ae4d886cd28a
Change-Id: I49f701b3614a7c357c8499558bb177a7bc9fa580
Change-Id: Id807e9f5b71d330087b51e28f38fec9e324d3f4e
Change-Id: Iec2e8511431c9ed97d5165a76717f2669778c4ab
…ackend. Change-Id: I3f7ff0b5e3b08d5616509ec8266e28f0724f9074
…esponsible for deleting users. Implements the bulk of firebase.auth.Auth.prototype.getUser(), firebase.auth.Auth.prototype.getUserByEmail(), firebase.auth.Auth.prototype.deleteUser() as defined in the user management auth node.js API proposal: https://docs.google.com/document/d/1XY8O37rP9ySrZ5G3V4y3GELqKu1ZO9MtJga6135rcY0/ Change-Id: I14aa39e90416512eaf53e01318f21be817c79b41
…ndler responsible for deleting users. Implements the bulk of firebase.auth.Auth.prototype.getUser(), firebase.auth.Auth.prototype.getUserByEmail(), firebase.auth.Auth.prototype.deleteUser() as defined in the user management auth node.js API proposal: https://docs.google.com/document/d/1XY8O37rP9ySrZ5G3V4y3GELqKu1ZO9MtJga6135rcY0/"
Change-Id: I06cb29d5d3554e985ed3274bbdfa50d506bfb44f
…e user requests. Currently for update operations, setAccountInfo endpoint is to be used. For create operations, signupNewUser is used when no uid is provided whereas uploadAccount endpoint is used when a uid is provided. allowOverwrite: false is passed in request to throw an error when the user exists. A temporary validator utility file has been created as a placeholder for now to validate the properties in the request. It is recommended that we replace that with some other npm module like validator. Implementation is based on the specs defines in the API proposal: https://docs.google.com/document/d/1XY8O37rP9ySrZ5G3V4y3GELqKu1ZO9MtJga6135rcY0/ Change-Id: Ia7b1371135b8e814102740ace4b2bf2fb9564e8a
…d create user requests. Currently for update operations, setAccountInfo endpoint is to be used. For create operations, signupNewUser is used when no uid is provided whereas uploadAccount endpoint is used when a uid is provided. allowOverwrite: false is passed in request to throw an error when the user exists."
Change-Id: I256e732df81ef1004c435bd374dbd58874380414
…updateUser which call underlying auth request handler updateExistingAccount and createNewAccount. A user record is then populated from the user lookup of the uid returned and returned to the developer. In addition, adds the validators for Firebase auth uid and password. Finally, adds spy checks on isUid, isPassword, isURL, isEmail during request validation tests. Implementation is based on the specs defines in the API proposal: https://docs.google.com/document/d/1XY8O37rP9ySrZ5G3V4y3GELqKu1ZO9MtJga6135rcY0/ Change-Id: I128406922e6b69aa16bd0d50101f11ec294e13df
…er and updateUser which call underlying auth request handler updateExistingAccount and createNewAccount. A user record is then populated from the user lookup of the uid returned and returned to the developer."
Change-Id: Ia1d0f26b03d025bfd6d565bac849b05cdd4a9601
Change-Id: Ieaa772a1521c3b888e15de0fa7e74f9a34ee6391
It’s possible a user could provide a string type error (instead of an actual Error object) when defining a custom Credential.getAccessToken() method, and we should be able handle that case. Change-Id: Ib1d800584466a1b44093131d36a250ce2bc9a701
Change-Id: I4425cb87ebf903bbcc4c4194174f6be439602301
Change-Id: I75727865174d9c0c6523be932bffe678c216ba20
Testing Jenkins job
Change-Id: I1f6d47234ea2650409239d2fae07157da249a3dc
Change-Id: I0164e99969bc072512b568ddb9dfe425d83c184d
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Still very much a WIP, but this is a prototype which adds GCS support via
admin.storage()
.admin.storage().bucket
exports the standard GCSBucket
API.Initialization of the underlying
google-cloud
SDK is probably going to be a bit tricky since they don't provide a standard credential interface like our SDK does which allows you to provide your own Google OAuth2 access tokens. But we can make it work without too much effort via the certificate credential (which this PR does) and via the Application Default Credential (which this PR does not do). I'm still not sure how we will make it work using a refresh token credential since we don't have the right fields that thegoogle-cloud
SDK provides as initialization options (see the table in "Advanced Usage" here).I didn't do anything for multi-bucket support although it shouldn't be too bad to support.
cc/ @mcdonamp, @sphippen, @hiranya911, @depoll
Code sample