Google Drive Storage Provider Setup
The Google Drive Storage Provider allows end-users to map in their Google Drive storage into container-based sessions. Access is provided via Googles Drive's OAuth interface and leveraging the Rclone Docker volume plugin.
Reference Docs:
Creating a Google OAuth App
- Login to the Google Developer Console: https://console.developers.google.com.
- From the APIs & Services menu, Select OAuth consent screen.
- Select External then click Create.
warning
In this example, we walk through creating an integration where any Google user can auth with the Google Drive Storage Provider. This is ideal for a public facing deployment. Choose Internal if only users from your Google Workspace corporate account should be allowed to authenticate.
Extenal types will need to go through a validation process before being used in production systems.

- Provide values for the App Name , User support email, and Developer Contact email.
- In the Authorized Domains section, enter the Workspaces deployment's top private domain (e.g
example.com). - Click Save and Continue.

- Click Add or Remove Scopes.
- In the Update Selected Scopes window check
.../auth/drive, then click Update. If the option is not available, addhttps://www.googleapis.com/auth/driveto the Manually add scope field and click Add To Table.

- Click Save and Continue.
- Until the app is fully verified and published it can only be used to auth specific test accounts. Click Add Users to authorize several test google accounts.
- Click Save and Continue.
- In the APIs & Services menu, select Credentials.
- Select Create Credentials, then OAuth client ID.

- Select
Web Applicationas the Application type, then give the client a name (e.gKasm). - Click Add URI in the Authorized redirect URIs section, and
enter
https://<kasm deployment hostname>/api/cloud_storage_callback. - Click Create.

- A dialogue will display with a Client ID and Client Secret. Save these values for the next configuration steps. The JSON download will also include URLs needed for the next configuration steps.

- From the main menu of the Google Cloud Console , search for "Google Drive API". Navigate to the selected page, then click "Enable" if the option is available. No action is needed if the status is currently enabled.

Kasm Storage Provider Config
- Log into the Kasm UI as an administrator.
- Select Settings -> Storage -> Add.
- Update the form with the following entries, using the Client ID and Client Secret gathered in the previous section.
| Name | Google Drive |
|---|---|
| Storage Provider Type | Google Drive |
| Enabled | checked |
| Client ID | <client id> |
| Client Secret | <client secret> |
| Authorization URL | https://accounts.google.com/o/oauth2/auth |
| Authorization URL Options | {"include_granted_scopes" : "true", "prompt" : "select_account consent", "access_type" : "offline"} |
| Token URL | https://oauth2.googleapis.com/token |
| Redirect URL | https://<hostname>/api/cloud_storage_callback |
| Scope | https://www.googleapis.com/auth/drive |
| Default Target | /gdrive |
| Volume Config | { "driver" : "rclone", "driver_opts" : { "type" : "drive", "uid" : "1000", "gid" : "1000", "allow_other" : "true" } } |
| Mount Config | {} |
- Click Save to save the changes.
Google Drive storage mapping configuration
- From any page, select the profile icon at the top right.

- Select the Cloud Storage section, then Add Storage Mapping.

- Select Google Drive from the drop-down, then select Next.

- The Google login page appears. Log in with the desired account. This account must be a test user from the OAuth app creation process.

- When the Google OAuth app is not yet approved, a warning appears. Click Continue.

- On success, Kasm redirects you to the Workspaces dashboard. The new storage mapping appears in the Cloud Storage section of the profile.

- Launch a new container-based session. Confirm that Google Drive is mapped inside the session at the
/gdrivelocation.
