Setup of Google Sync Plugin for KeePass V.2.x
by neumanngregor in Circuits > Software
26513 Views, 24 Favorites, 0 Comments
Setup of Google Sync Plugin for KeePass V.2.x
Q: Why a password manager ?
A: Look at the upper image, if you got not a passwords like dKeDjupfS22ykVSyzAmo and you can memorize them for each site you use then you are a easy target for some script kid that dreams to be a hacker.
Q: Why KeePass and not RoboForm or RoboForm2Go or software XYZ?
A:It's FREE and the supported operating systems: Windows 98 / 98SE / ME / 2000 / XP / 2003 / Vista / 7 / 8, each 32-bit and 64-bit, Mono (Linux, Mac OS X, BSD, ...). Ports of it on: PocketPC & Smart Devices, Windows Phone, Android, iPhone / iPad, Mac OS X, BlackBerry (including 10), J2ME / mobile phones (old ones), JavaScript (browsers, runs on a webserver), Palm OS. That means it runs virtually on anything.
I'm using Windows 7 and 8, Windows XP, Ubuntu Linux and Android and this software supports all of them and has even plugins support.
Q: OK, why do I need your guide and not the one provided by the plugin developer ?
A: First the official tutorial that has some steps missing and is sadly not up to date with the new features of Google's API Console. Meaning you do like it says and you wont be able to sync with Google Drive, getting some strange looking errors.
See the video for the same tutorial or just see my youtube posted one:
Downloads
Step 1 : Official Guide
This plugin requires some preliminary setup from Google
Log into https://code.google.com/apis/console to generate a Client Id and Client Secret.
Edit KeePass.config.xml and add Custom entries from Sample-KeePass.config.xml, included in the zip file
EnableAutoSync: synchronize automatically on save (optional)
GoogleSyncClientID: generated from Google API (required)
GoogleSyncClientSecret: generated from Google API (required)
GoogleSyncKeePassUID: UUID of your Google account KeePass entry (required).
(Create a new KeePass entry for a Google account if you do not already have it. Then right click on the entry > Edit/View Entry > Properties tab. Copy the UUID in the configuration file.)
GoogleSyncShowAuthenticationForm: Set this to true if you want to see the Google Authentication form - might be needed for Two factor authentication (optional).
Step 2 : Create the ClientID and Secret the Right Way
OK NOW WHAT'S MISSING ?
When you go to https://code.google.com/apis/console
1. Go to Credentials from the left menu and there choose Create new Client ID the OAuth 2.0 then choose Installed application and INSTALLED APPLICATION TYPE Outher then hit Create Client ID. See the first image.
2. Configure it like in the second image and then generate it, then copy the
CLIENT ID: xxxxxxxxxxxx-yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy.apps.googleusercontent.com
(yes this is the new format with xxx and yyy not like the old format with just xxx but it still works)
copy the CLIENT SECRET: zzzzzzzzzzzzzzzzzzzzzzzz
put them like sayed in the KeePass.config.xml (see the Sample-KeePass.config.xml for details).
3. Go to Consent screen and there choose the EMAIL ADDRESS and input a PRODUCT NAME (it can be anyting, i just put KeePass Google Sync) the rest let it like it is and hit Save buton on the lower part of the page. (THIS FIXES THE invalid_id ERROR). See the last image.
Step 3 : Enable the Correct APIs
Go to APIs and enable the folowing ones: (THIS FIXES THE invalid_client ERROR AND Google.Apis.Requests.RequestError ... ERROR)
• Drive API
• Drive SDK
(Click on the OFF buton on the right of the name and it will switch to on mode.)
With the last step you successfully configured the plugin and your google APIs to work with the plugin and now.
PS only 10.000.000 requests/day and the plugin is useing 2 for each of its options (sync, upload, download), that will let you with just 5.000.000 operations each day, no more that 57 operations/second for 24 hours.