The Box Connector performs full and incremental scans over a Box repository and will extract security, metadata, and content from each object scanned. Each scanned object will be tagged with one of three possible actions--add, update, or delete--and can be routed to any Aspire pipeline as desired.

The connector, once started, can be stopped, paused or resumed via the Scheduler Component. Typically the start job will contain all information required by the job to perform the scan. When pausing or stopping, the connector will wait until all the jobs it published have completed before updating the statistics and status of the connector.


Box Application Bundle (Aspire 2)
AppBundle Name Box.Com Connector
Maven Coordinates com.searchtechnologies.aspire:app-box-connector
Versions 2.2.2
Type Flags scheduled
Inputs AspireObject from a content source submitter holding all the information required for a crawl.
Outputs An AspireObject containing the URL, content, ACLs and Metadata processed for each file.

Configuration

This section lists all configuration parameters available to install the Box Application Bundle and to execute crawls using the connector.

PropertyTypeDefaultDescription
snapshotDirstring${aspire.home}/snapshotsThe directory for snapshot files to be stored.
disableTextExtractbooleanfalseBy default, connectors use Apache Tika to extract text from downloaded documents. If you wish to apply special text processing to the downloaded document in the workflow, you should disable text extraction. The downloaded document is then available as a content stream.
workflowReloadPeriodint15mThe period after which to reload the business rules. Defaults to ms, but can be suffixed with ms, s, m, h or d to indicate the required units.
workflowErrorTolerantbooleanfalseWhen set, exceptions in workflow rules will only effect the execution of the rule in which the exception occurs. Subsequent rules will be executed and the job will complete the workflow sucessfully. If not set, exceptions in workflow rules will be re-thrown and the job will be moved to the error workflow.
useGEbooleanfalsetrue if group expansion is going to be used.
geSchedulestring0 0 0 * * ?Indicates how often the group expasion is going to fetch all the security groups.
Serverstringhttps://app.box.comThe Box server Url.
Server API Urlstringhttps://api.box.comURL for Box API.
API versionstring2.0The API version that Box is using.
Client IdstringnoneThe client id of an app in Box.com with access to the Box account.
Client SecretstringnoneThe Client Secret of an app in Box.com with access to the Box account.
Redirect Urlstringhttps://localhost:4000The a valid URL to redirect the authorization tokens (for authorization process)
UserStringnoneLogin of the Box account.
PasswordstringnonePassword for Box accound.
PageSizeinteger100Indicates the amount of documents or folders that will be returned by the API each call.
ExcludeExtensionsstringnoneIndicates the list of extensions (separeted by comma) you don't want to extract the text, for instance dll or exe.
UseImpersonatebooleanfalseImpersonate each user of Box account in order to crawl all shared and private content. If unchecked, only shared content accessible by the crawling account will be crawled.
indexFoldersbooleanfalseIndicates if folders (as well as files) should be indexed.
scanRecursivelybooleanfalseIndicates if subfolders should be scan.
ExcludeSubFolders/includestringnoneOptional. A list of folders that can be excluded from the crawling.
fileNamePatterns/includeregexnoneOptional. A regular expression pattern to evaluate file urls against; if the file name matches the pattern, the file is included by the scanner. Multiple include nodes can be added.
fileNamePatterns/excluderegexnoneOptional. A regular expression pattern to evaluate file urls against; if the file name matches the pattern, the file is excluded by the scanner. Multiple exclude nodes can be added.


Configuration Example

To install the application bundle, add the configuration, as follows, to the <autoStart> section of the Aspire settings.xml.

  <application config="com.searchtechnologies.aspire:app-box-connector">
    <properties>
    <property name="generalConfiguration">true</property>
    <property name="useGE">true</property>
    <property name="geSchedule">0 0 0 ? * *</property>
    <property name="Server">https://app.box.com</property>
    <property name="ServerApi">https://api.box.com</property>
    <property name="ApiVersion">2.0</property>
    <property name="ClientId">yv1mhjwja6dfwju8odkpi8rjn97v1xkv</property>
    <property name="ClientSecret">encrypted:FEFCE311A433D8C76B66215CEA9FB9ED50C5B1ED4B92EB5ED2414AFA94EB40B720A3E725DDD2D3D74A6FE5A70A931FCD</property>
    <property name="Redirect_Url">http://localhost:4000</property>
    <property name="User">[email protected]</property>
    <property name="BoxPassword">encrypted:B39D6E9181FBBEBDF7C880CBEF98F4F2</property>
    <property name="extractLDAP">true</property>
    <property name="ldapUrl">ldap://10.2.1.21:389</property>
    <property name="dnUser">[email protected]</property>
    <property name="dnPassword">encrypted:1E4230BFB07D53AE16879EAF4D57291A</property>
    <property name="userSearchFilter">(|(objectClass=person))</property>
    <property name="ldapSearchBase">OU=Employee Users,OU=Accounts,dc=domain,dc=com</property>
    <property name="LDAPGuidAttr">userPrincipalName</property>
    <property name="LDAPNameAttr">samAccountName</property>
    <property name="snapshotDir">${dist.data.dir}/${app.name}/boxWorkingDir</property>
    <property name="disableTextExtract">false</property>
    <property name="workflowReloadPeriod">15s</property>
    <property name="workflowErrorTolerant">false</property>
    <property name="debug">true</property>
  </properties>
  </application>

Note: Any optional properties can be removed from the configuration to use the default value described on the table above.



Source Configuration

Scanner Control Configuration

The following table describes the list of attributes that the AspireObject of the incoming scanner job requires to correctly execute and control the flow of a scan process.

ElementTypeOptionsDescription
@actionstringstart, stop, pause, resume, abortControl command to tell the scanner which operation to perform. Use start option to launch a new crawl.
@actionPropertiesstringfull, incrementalWhen a start @action is received, it will tell the scanner to either run a full or an incremental crawl.
@normalizedCSNamestring
Unique identifier name for the content source that will be crawled.
displayNamestring
Display or friendly name for the content source that will be crawled.

Header Example

  <doc action="start" actionProperties="full" actionType="manual" crawlId="0" dbId="0" jobNumber="0" normalizedCSName="FeedOne_Connector"
   scheduleId="0" scheduler="##AspireSystemScheduler##" sourceName="ContentSourceName">
    ...
    <displayName>testSource</displayName>
    ...
  </doc>


All configuration properties described in this section are relative to /doc/connectorSource of the AspireObject of the incoming Job.

ElementTypeDefaultDescription
Serverstringhttps://app.box.comThe Box server Url.
Server API Urlstringhttps://api.box.comURL for Box API.
API versionstring2.0The API version that Box is using.
Client IdstringnoneThe client id of an app in Box.com with access to the Box account.
Client SecretstringnoneThe Client Secret of an app in Box.com with access to the Box account.
Redirect Urlstringhttps://localhost:4000The a valid URL to redirect the authorization tokens (for authorization process)
UserStringnoneLogin of the Box account.
PasswordstringnonePassword for Box account.
PageSizeinteger100Indicates the amount of documents or folders that will be returned by the API each call.
ExcludeExtensionsstringnoneIndicates the list of extensions (separeted by comma) you don't want to extract the text, for instance dll or exe.
UseImpersonatebooleanfalseImpersonate each user of Box account in order to crawl all shared and private content. If unchecked, only shared content accessible by the crawling account will be crawled.
ExcludeSubFolders/includestringnoneOptional. A list of folders that can be excluded from the crawling.
indexContainersbooleanfalseIndicates if folders (as well as files) should be indexed..
scanRecursivelybooleanfalseIndicates if subfolders of the given URL should be scanned..
fileNamePatterns/include/@patternregexnoneOptional. A regular expression pattern to evaluate file urls against; if the file name matches the pattern, the file is included by the scanner. Multiple include nodes can be added.
fileNamePatterns/exclude/@patternregexnoneOptional. A regular expression pattern to evaluate file urls against; if the file name matches the pattern, the file is excluded by the scanner. Multiple exclude nodes can be added.


Scanner Configuration Example

  <doc action="start" actionProperties="full" normalizedCSName="testFile">
<connectorSource>
  <Server>https://app.box.com</Server>
  <ServerApi>https://api.box.com</ServerApi>
  <ApiVersion>2.0</ApiVersion>
  <ClientId>yv1mhjwj6yffwj1wodkpi8rjn97v1xkv</ClientId>
  <ClientSecret>encrypted:FEFCE311A433D8C76B66215CEA9FB9ED50C5B1ED4B92EB5ED2414AFA94EB40B720A3E725DDD2D3D74A6FE5A70A931FCD</ClientSecret>
  <Redirect_Url>http://localhost:4000</Redirect_Url>
  <User>[email protected]</User>
  <BoxPassword>encrypted:B39D6E9181FBBEBDF7C880CBEF98F4F2</BoxPassword>
  <pageSize>100</pageSize>
  <useImpersonate>true</useImpersonate>       
  <indexContainers>true</indexContainers>
  <scanRecursively>true</scanRecursively>
  <ExcludeSubFolders/>
  <fileNamePatterns>
    <exclude pattern=".*Aspire Support.*"/>
  </fileNamePatterns>
</connectorSource>
<displayName>testFile</displayName>
  </doc>


Note: To launch a crawl, the job should be sent (processed/enqueued) to the "/BoxConnector/Main" pipeline.

Output

<job id="192.168.1.5:50505/2015-07-16T17:46:07Z/0/4" time="2015-07-16T17:56:05Z">
<doc>
  <url>https://app.box.com/files/0/f/3804969570/Folder_private</url>
  <fetchUrl>https://app.box.com/files/0/f/3804969570/Folder_private</fetchUrl>
  <displayUrl>https://app.box.com/files/0/f/3804969570/Folder_private</displayUrl>
  <snapshotUrl>002 https://app.box.com/files/0/f/3804969570/Folder_private</snapshotUrl>
  <id>3804969570</id>
  <connectorSpecific>
    <field name="size">0</field>
    <field name="impersonate">226635049</field>
    <field name="eventType">ITEM_CREATE</field>
    <field name="created_by">[email protected]</field>
    <field name="created_by_Name">Manuel</field>
    <field name="author_Id">226635049</field>
    <field name="user_profile_url">https://app.box.com/profile/226635049</field>
    <field name="modified_by">[email protected]</field>
    <field name="modify_by_Id">226635049</field>
    <field name="modify_by_Name">Manuel</field>
    <field name="last_modified">2015-06-09T17:01:09-07:00</field>
    <field name="owned_by">[email protected]</field>
    <field name="owned_by_Id">226635049</field>
    <field name="owned_by_Name">Manuel</field>
    <field name="type">folder</field>
    <field name="id">3804969570</field>
    <field name="etag">0</field>
    <field name="sequence_id">0</field>
    <field name="name">Folder_private</field>
    <field name="description"/>
    <field name="path_collection">/All Files/Folder_private</field>
    <field name="created_at">2015-06-09T17:01:09-07:00</field>
    <field name="modified_at">2015-06-09T17:01:09-07:00</field>
    <field name="content_created_at">2015-06-09T17:01:09-07:00</field>
    <field name="content_modified_at">2015-06-09T17:01:09-07:00</field>
    <field name="item_status">active</field>
    <field name="parent">https://app.box.com/files/0/f/0/All Files</field>
  </connectorSpecific>
  <docType>container</docType>
  <repItemType>aspire/folder</repItemType>
  <BoxAction>add</BoxAction>
  <dataSize>0</dataSize>
  <title>Folder_private</title>
  <createdBy>[email protected]</createdBy>
  <createdById>226635049</createdById>
  <acls>
    <acl access="allow" domain="" entity="user" fullname="Manuel" name="[email protected]" scope="global"/>
    <acl access="allow" domain="" entity="group" name="3804969570" scope="global"/>
  </acls>
  <modifiedBy>[email protected]</modifiedBy>
  <lastModified>2015-06-09T17:01:09-07:00</lastModified>
  <connectorSource>
    <Server>https://app.box.com</Server>
    <ServerApi>https://api.box.com</ServerApi>
    <ApiVersion>2.0</ApiVersion>
    <ClientId>yv1mhjwja6dfwju8odkpi8rjn97v1xkv</ClientId>
    <ClientSecret>encrypted:FEFCE311A433D8C76B66215CEA9FB9ED50C5B1ED4B92EB5ED2414AFA94EB40B720A3E725DDD2D3D74A6FE5A70A931FCD</ClientSecret>
    <Redirect_Url>http://localhost:4000</Redirect_Url>
    <User>[email protected]</User>
    <BoxPassword>encrypted:B39D6E9181FBBEBDF7C880CBEF98F4F2</BoxPassword>
    <pageSize>100</pageSize>
    <useImpersonate>true</useImpersonate>
    <indexContainers>true</indexContainers>
    <scanRecursively>false</scanRecursively>
    <ExcludeSubFolders/>
    <fileNamePatterns/>
    <displayName>BoxLocal</displayName>
  </connectorSource>
  <action>add</action>
  <hierarchy>
    <item id="CF6BD6634617AB002314F57950CCD87F" level="2" name="Folder_private" type="aspire/folder" url="https://app.box.com/files/0/f/3804969570/Folder_private">
      <ancestors>
        <ancestor id="CD84D22EDB049F30B6DFB825B428EF61" level="1" parent="true" type="aspire/folder" url="https://app.box.com/files/0/f/0/All Files"/>
      </ancestors>
    </item>
  </hierarchy>
  <content/>
</doc>
</job>
  • No labels