To use the Google Drive Search Federation you must create an App through Google, and authorize the App to make requests on behalf of users on your domain. No extra privileges, other than a Google account, are required to create a Google App. Authorizing the App will require Admin privileges for the Google domain you wish to federate. Google is constantly enhancing and improving their services, so some screens may have changed.
When synced to a local file system, Google Drive may be indexed just like other local folders. This may be done by an administrator with access to the file system or by a user using the Perceptive Anywhere agent to index their desktop.
In order to use this federator, you must have .NET 3.5 installed on the machine hosting Perceptive Enterprise Search.
All Google Apps are managed at http://cloud.google.com/. Google Apps belong to a parent project, which you must create first.
Click on Create Project and choose a name for your project. Google will automatically assign a unique "Project ID". The "Project name" and "Project ID" are not used by Perceptive Search.
Google may require "SMS Verification" to create a new project. If you recieve the following box, just follow the instruction from Google.
Once you complete the new project dialog and any account verification steps required, you should be on the new project's overview page.
Next, you must allow the project to make API calls using the Drive API. To do this, click on APIs & auth then on APIs. You'll be presented with a list of all Google APIs. From this list, find Drive API and click ON/OFF. You'll be presented with a dialog to accept Google's Terms of Service.
Once you have enabled the Drive API, it will move to the top of the list and switch from OFF to ON.
Now that the project is created and has access to the Google Drive API, you must configure client credentials. Select APIs & auth, if not already expanded, then click on Credentials.
Click on Create New Client ID to generate an OAuth2 Service Account Client ID.
Select Service account and click on Create Client ID. After a few moments, you will be given an opportunity to download the private key (.p12 file).
Make a note of the Service Account email address provided, as it will be required by the Google Drive Federator configuration wizard. Also make a note of the Service Account Client ID as it will be required for the next section "Authorizing the Google App on your Google Domain".
This next step will allow Perceptive search to execute queries on behalf of the user, so that they will only get documents and files that they have access to. In order to authorize an app, you must have admin access for your Google Domain. Select Security on your Google Admin console. This page is customizable, so it may not look exactly as shown.
On the Security page, click on Advanced settings to expand the view, then click on "Manage third party OAuth Client access".
In the Client Name field, enter the client id for the service account created above. In the API Scopes field enter "https://www.googleapis.com/auth/drive.readonly.metadata" without quotes. Click to Authorize the App.
For the Google Drive Federator to work properly, users must log into the web site. On the administration site navigate to Home::Web Sites::Default::Security::Access Control. Under the heading Anonymous Access click the radio button next to "Users must login to access web site".
If a simple regular expression cannot map user names to email addresses (for example, user1's Google address is bob45@example.com), an LDAP mapping may be necessary. It will look up a user record using LDAP, and use the specified attribute in the record as the Google email address. Two common LDAP implementations are OpenLDAP and Active Directory.
When creating a GoogleDrive index, you will have the opportunity to specify LDAP settings on the User Configuration page. There are four required fields to connect to an LDAP server.
ldap.subdomain.example.com:636
DOMAIN_NAME\user
. If the regular expression box is left empty, that string
will be substituted for any instance of %u in the user filter. Depending on what is
stored in your LDAP server, you may or may not need to strip the domain name using the
regular expression. Putting /^*.\\(.*)$/$1/
as the regular expression will
strip the domain name, leaving only the user name.
(uid=%u)
(sAMAccountName=%u)
DC=subdomain,DC=example,DC=com
OU=Users,O=ExampleDomain
mail
There are two additional fields text fields: the binding user and password. If your LDAP server is configured to allow anonymous queries, then these fields are not required. Otherwise, you will need to specify the user and password used to run the LDAP query. This Microsoft Knowledge Base article describes how to enable anonymous access on Active Directory. OpenLDAP has anonymous access enabled by default.
admin
uid=admin,ou=users,o=domainname
The last two options apply to every LDAP connection.