Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a service account with Google Drive access

I am trying to create a service account in Google Cloud Platform that has Google Drive API access only. However, I cannot find the role at all:

enter image description here

Furthermore, if I create a 'general service account', then that user can add instances, etc. This has been a terrible security issue in the past, as users with that key have actually created unauthorized instances (thus the above question).

How would I create a service account that has access to Google Drive API, but nothing else?

like image 245
David542 Avatar asked Aug 14 '18 02:08

David542


People also ask

What is service account in Google Drive?

A service account is a special type of Google account intended to represent a non-human user that needs to authenticate and be authorized to access data in Google APIs. Typically, service accounts are used in scenarios such as: Running workloads on virtual machines (VMs).

How do I set up a service account?

Navigate to Computer Management > Local Users and Groups > Users> Add a User. Next, navigate to Local Security Policies. Select Log on as Service > Properties. Then select Add User or Group and add the user.

How do I share Google Drive with service?

Share a Drive FolderGo to your Google Drive and create a new folder. Right-click the folder, choose Share and add the email address of the service account you created in step 3 as an editor to this folder. Thus your Node. js application will be able to access this folder and upload files to it.


1 Answers

If you want your service account should only access google drive, in admin.google.com panel,

Security >> Advanced Settings >> Manage API client access

Under type your service account ID and add google drive scope. You can find scopes here

like image 169
darkfolcer Avatar answered Sep 24 '22 10:09

darkfolcer