Connecting Dropbox

edit

Connecting Dropbox

edit

Dropbox is a cloud-based storage service for organizations of all sizes, allowing teams to create, store, share and automatically synchonize documents across desktop, web and mobile. The Dropbox connector provided with Workplace Search automatically captures, syncs and indexes the following items:

Stored Files

Including ID, File Metadata, File Content, Updated by, and timestamps

Dropbox Paper

Including ID, Metadata, Content, Updated by, and timestamps

Configuring the Dropbox Connector

edit

Configuring the Dropbox connector is the first step prior to connecting the Dropbox service to Workplace Search, and requires that you create an OAuth App from the Dropbox platform. To get started, first log in to Dropbox and access your administrative dashboard:


Step 1. Login to Dropbox’s App Developer Portal.


Step 2. Click the Create app button:

dropbox create app start

You should see the Create a new app form.

dropbox create app form

Before we create a new app, there are two important things to understand:

  1. The app can stay in Developer Mode. You do not need to publish it.
  2. Make sure that you create this app with a trusted and stable Dropbox account.

Creating an app with a team-owned (Dropbox Business) account is required if you enable document-level permissions.


Step 3. Choose Scoped access and Full Dropbox, and enter a name in the Name your app field. The name must be unique within Dropbox (e.g. Organization Name Workplace Search).

dropbox scoped access
dropbox full dropbox
dropbox name your app

Step 4. Choose create app to submit the Create a new app form.

dropbox create app end

Your app is created, and you should now see the Settings form.

dropbox settings

Step 5. Within OAuth 2 and Redirect URIs, add the appropriate redirect URIs.

The redirect URIs required vary by which user interface you are using to manage Enterprise Search. Enterprise Search in Kibana and standalone Enterprise Search use different redirect URIs. See user interfaces for details on each UI.

When using standalone Enterprise Search, add the following two redirect URIs, substituting <WS_BASE_URL> with the base URL at which Workplace Search is hosted (scheme + host, no path).

<WS_BASE_URL>/ws/org/sources/dropbox/create
<WS_BASE_URL>/ws/sources/dropbox/create

Examples:

# Deployment using a custom domain name
https://www.example.com/ws/org/sources/dropbox/create
https://www.example.com/ws/sources/dropbox/create

# Deployment using a default Elastic Cloud domain name
https://8905d44eb30e4d56a1acc41bde14c847.ent-search.us-east-1.aws.cloud.es.io:443/ws/org/sources/dropbox/create
https://8905d44eb30e4d56a1acc41bde14c847.ent-search.us-east-1.aws.cloud.es.io:443/ws/sources/dropbox/create

# Unsecured local development environment
http://localhost:3002/ws/org/sources/dropbox/create
http://localhost:3002/ws/sources/dropbox/create

Choose Add to save each URL.

When using Enterprise Search in Kibana, use the following redirect URI, substituting <KIBANA_BASE_URL> with the base URL of your Kibana instance. This should correspond with the value of kibana.external_url in your enterprise-search.yml:

<KIBANA_BASE_URL>/app/enterprise_search/workplace_search/sources/added

Examples:

# Deployment using a custom domain name for Kibana
https://www.example.com/app/enterprise_search/workplace_search/sources/added

# Deployment using a default Elastic Cloud domain name for Kibana
https://c3397e558e404195a982cb68e84fbb42.kb.us-east-1.aws.found.io:443/app/enterprise_search/workplace_search/sources/added

# Unsecured local Kibana environment
http://localhost:5601/app/enterprise_search/workplace_search/sources/added

Choose Add to save the URL.

dropbox redirect uris

Step 6. Reveal the App Key and App Secret and keep them in a secure and handy location: they will be required shortly.

dropbox app key app secret

Step 7. Choose Permissions to change to the Permissions form.

dropbox permissions

Choose only the following permissions:

  • files.content.read
  • sharing.read
  • account_info.read - This should be automatically selected for you.
  • files.metadata.read - This should be automatically selected for you when files.content.read is selected.

Adding permissions beyond the instructed list can cause errors when syncing content from Dropbox.

dropbox files content read
dropbox sharing read

If and only if you intend to enable document-level permissions then you must also choose these additional permissions:

  • team_info.read
  • team_data.member
  • team_data.team_space
  • members.read

In order to fetch document level permissions, you must use an OAuth App that is created using a team-owned (Dropbox Business) account.

Adding permissions beyond the instructed list can cause errors when syncing content from Dropbox.

dropbox team read
dropbox members read

Choose Submit to save your changes within the Permissions form.

dropbox submit

Step 8. From the Workplace Search administrative dashboard’s Sources area, locate Dropbox, click Configure and provide both the Client ID and Client Secret.

App Key and App Secret correspond to Client ID and Client Secret, respectively.

Voilà! The Dropbox connector is now configured, and ready to be used to synchronize content. In order to capture data, you must now connect a Dropbox instance with the adequate authentication credentials.

Connecting Dropbox to Workplace Search

edit

Once the Dropbox connector has been configured, you may connect a Dropbox instance to your organization.


Step 1. Head to your organization’s Workplace Search administrative dashboard, and locate the Sources tab.


Step 2. Click Add a new source.


Step 3. Select Dropbox in the Configured Sources list, and follow the Dropbox authentication flow as presented.


Step 4. Upon the successful authentication flow, you will be redirected to Workplace Search.

Dropbox content will now be captured and will be ready for search gradually as it is synced. Once successfully configured and connected, the Dropbox synchronization automatically occurs every 2 hours.

Limiting the content to be indexed

edit

If you don’t need to index all the available content, you can specify the indexing rules via the API. This will help shorten indexing times and limit the size of the index. See Customizing indexing. For Dropbox, applicable rule types would be path_template and file_extension.

Synchronized fields

edit

The following table lists the fields synchronized from the connected source to Workplace Search. The attributes in the table apply to the default search application, as follows:

  • Display name - The label used when displayed in the UI
  • Field name - The name of the underlying field attribute
  • Faceted filter - whether the field is a faceted filter by default, or can be enabled (see also: Customizing filters)
  • Automatic query refinement preceding phrases - The default list of phrases that must precede a value of this field in a search query in order to automatically trigger query refinement. If "None," a value from this field may trigger refinement regardless of where it is found in the query string. If '', a value from this field must be the first token(s) in the query string. If N.A., automatic query refinement is not available for this field by default. All fields that have a faceted filter (default or configurable) can also be configured for automatic query refinement; see also Update a content source, Get a content source’s automatic query refinement details and Customizing filters.
Display name Field name Faceted filter Automatic query refinement preceding phrases

Id

id

No

N.A.

URL

url

No

N.A.

Title

title

No

N.A.

Type

type

Default

None

Path

path

No

N.A.

Updated at

updated_at

No

N.A.

Last updated

last_updated

No

N.A.

Size

size

No

N.A.

Updated by

updated_by

Configurable

[edited by, updated by, modified by]

Updated by email

updated_by_email

Configurable

[edited by, updated by, modified by]

Media type

mime_type

Default

None

Extension

extension

Default

None