Google Drive Plugin - Habitat

Support forums for the Habitat Automate plugin
Post Reply
joesnecs
Posts: 6
Joined: Fri Sep 13, 2019 12:24 pm
4

Google Drive Plugin - Habitat

Post by joesnecs »

I need to change the API / Client ID information for Google Drive. I can change it and it reflects the change in the plugin, however, it still uploads files to my old account. Additionally the plugin will not list files when refreshing.

User avatar
Cubert
Posts: 2456
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Google Drive Plugin - Habitat

Post by Cubert »

That's an issue we saw with having Google Chrome installed on our tech systems.


The Google API dlls use your browser caching during the key exchanges that take place when using the file manager. So if you are logged in as yourself and not the user for which the API keys where created it opens your google drive and not the user for which you created for this purpose.

So how to fix/work around?

We found 3 possible methods to work around this issue. None are a total %100 fix but if you know what not to try then it solves the issue at hand. We recommend that you create a user for the google drive integration and then using a independent user or host to manage the google drive files. This will be explained in the 3 options below.


#1 If RMM is OnPrem, use the Automate host as the system to manage Google Drive for Automate. When refreshing the file list in the plugin it uses the cached information to access Google Drive via the GoogleDriveApi_dll provided by Google. This can cause it to be confused and will access if available the current/last logged in Google Users drive data. So if you only log in with the google user you created on the Automate host itt will cache this user and the files refresh button will poll for this drive. You still can log in to the users account from any other source and upload files to google drive but use the Automate host to refresh the file list in the plugin.

#2 Use a host system that does not use another google account. Follow the same method as #1

#3 Use a 2nd user account on your tech system. Create a new user on your PC and login with that user. Open plugin and run through uploading a file signing in as the google user you created as described in forum docs. Then anytime you need to refresh the list switch users.



We are trying to use google drive in a way it was not directly designed for so there are a few quarks we are working on as we expand on it.


There is a known issue that if any tech that has a google account and is actively logged in selects to refresh the file list, if not presented with a google login and giving the correct account will in fact log into the wrong account and the drive data uploaded to plugin will be their accounts drive data. If Google Drive not active then a soft fail and no data is returned clearing the file list.

So Google drive management in plugin should be handled by a single person or persons to limit possible file list wipes. Anyone can upload files from anywhere to Google Drive but only the proper user should refresh the files list in the plugin.

We may need to place some permissions around the refresh action so that it requires a particular user class to operate. The you assign the user class to one person and only they can refresh your file lists in plugin.

Post Reply

Return to “Habitat”