-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
GDrive: Fix fieldNotWritable, Add SupportSharedDrive, Add service_account method #512
Open
DoyunShin
wants to merge
17
commits into
dutchcoders:main
Choose a base branch
from
DoyunShin:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
106609d
GDrive: Support service_account
DoyunShin 9cd6e4f
GDrive: *FIX* fieldNotWritable
DoyunShin f4f04b9
GDrive: Support Shared drive
DoyunShin f318207
GDrive: jwt import
DoyunShin 2675350
GDrive: credential type logging
DoyunShin cd9c56e
GDrive: Check gdrive-local-config-path on Oauth2
DoyunShin 73ac766
Revert "GDrive: Check gdrive-local-config-path on Oauth2"
DoyunShin fb87a5b
Update getGDriveClientFromServiceAccount
DoyunShin f096300
GDrive: getGDriveClientFromToken
DoyunShin 71d8858
GDrive: SupportsAllDrives on download
DoyunShin f73922d
GDrive: authType on GDrive struct
DoyunShin f517bdc
GDrive: JWT to google.JWTConfigFromJSON
DoyunShin 0327122
GDrive: Token Redirecturl to urn:ietf:wg:oauth:2.0:oob
DoyunShin be00bb8
GDrive: basedir as rootID
DoyunShin 91492e1
GDrive: Add gdrive-auth-type
DoyunShin 478341c
GDrive: service to service_account
DoyunShin c96cf41
GDrive: README.md
DoyunShin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's have a separate cli param for service account file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
param like --gdrive-type=service / oauth2?
or we can actually check in json.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oauth2
{ "installed": { "client_id": "clientid", "project_id": "projectname", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_secret": "clientsecret" } }
Service Account
{ "type": "service_account", "project_id": "projectname", "private_key_id": "keyid", "private_key": "-----BEGIN PRIVATE KEY-----\nKEYSECRET\n-----END PRIVATE KEY-----\n", "client_email": "[email protected]", "client_id": "clientid", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/transfersh%40projectname.iam.gserviceaccount.com" }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
param like
gdrive-client-json-filepath
:gdrive-service-account-json-filepath
only one of the two can be set
in the factory you can translate this to a single param with the path and a new param for the type (service account/oauth2): it is up to you