Box Connector
Overview
Used for OneTrust Data Discovery, the Box.com connector connects to the Box cloud file sharing system and can be used to scan file system information directly from Box.
OneTrust recommends disabling Box email notifications using the SDK method, public void suppressNotifications() , so that users are not spammed with notifications when performing discovery on their account(s). For more information, see Suppressing Box Notifications.
- Pod Residency
-
storage-scanner - Connection Method
-
OAuth 2.0 with JSON Web Tokens (Server Authentication)
Supported Scan Actions
|
Scan Type |
Description |
|---|---|
|
Catalog |
This scan type will fetch the list of Folder/Files present in the box account which is shared with current user. It collects the Metadata also for these objects and send back to Main app. |
|
Catalog & Scan |
This scan type will fetch the list of Folder/Files present in the box account. We collect the metadata and then proceed with content extraction. It will return the personally identifiable information, data elements, and terms with the applied the classification labels. |
Credential and System Permissions
OneTrust recommends to adhere to your organization's security and infrastructure policy and include system engineer resources or other qualified subject matter experts to set up credentials on data sources. For specific instructions for how to enable these credentials, refer to your data source's implementation documentation, knowledge base and/or support resources.
Any Box account that needs to connect to the OneTrust Scanner requires a custom application with admin privileges and JWT token authentication. Click here for more information on creating custom apps with Box.
Required Permissions (Application Scopes)
Ensure the following are enabled based on your organization's app-access level controls.
|
Actions |
Required |
|---|---|
|
Content Actions |
|
|
Administrative Actions |
|
|
Advanced Features |
|
Sample JSON
{
"clientID": "your_client_id",
"clientSecret": "your_client_secret",
"publicKeyID": "your_private_key_Id",
“passphrase“: ”passphrase”,
"privateKey": "your_private_key",
"enterpriseID": "your_enterprise_id"
}
Scan Profile Support
For additional details on scan profile configuration and management, see Setting Up Scan Profiles.
Limits
-
Maximum/Minimum file size
-
Maximum number of users, folders per user, and files per user
-
File types
-
Include/Exclude Paths currently supports user folder, and file
Include Path Details
|
Scopes |
Description |
|---|---|
|
User |
|
|
Folder |
|
|
File |
|
Collected Box Objects
Using the Box connector, OneTrust will be able to catalog and scan the Box objects listed below:
|
Object |
Description |
|---|---|
|
Users |
All users in the Box enterprise account |
|
File |
The actual files that are stored inside a Share or folders. |
|
Folder |
The folders where the files are stored that are shared to other Box users. Note: In order to discover user accounts and scan them automatically, Box requires integrations to impersonate each user while scanning their accounts. As of 6.25, in order to prevent duplication of scanning, the Box connector will skip collaborations (shared files and folders) that are not owned by the current user it is impersonating. |
Collected Box Fields
- Field
- Description
- Allowed Roles
-
The types of roles that a user can be invited as.
- Classification Definition
-
The Box description for the classification applied.
- Classification Name
-
The name of the Box classification applied to the file.
- Comment Count
-
The number of comments on the file.
- Content Created Date
-
The created date of the file or folder originally outside of Box.
- Content Modified Date
-
The modified date of the file or folder outside of Box.
- Content Type
-
The document type of the file.
- Created By
-
The unique ID of the file.
- Created Date
-
The creation date of the file or folder in Box.
- Description
-
The optional description for the file or folder.
- Expires Date
-
The expiration date of the file or folder.
- File Extension
-
The extension of the file (.pdf, .csv, etc.)
- Is Externally Owned
-
Determines if the file or folder is owned by an external user.
- Item Status
-
The status of the file or folder, includes active, trashed, or deleted.
- Last Modified Date
-
The modified date of the file or folder in Box.
- Modified By
-
The user who last modified the file.
- Name
-
The name of the file or folder in Box.
- Owner
-
The Box user who owns the file or folder.
- Parent Folder
-
The parent folder for the file.
- Path
-
The full path of the object, includes:
-
Folder
-
File
-
- Purged Date
-
The purged date of the file or folder.
- Reference Id
-
The unique ID of the Box file or folder.
- SHA1 Hash
-
The hash code of the file.
- Shared Access
-
For files and folders, we apply the following to the shared access attribute in this priority order:
-
Open Access - If someone can access the file or folder with no restriction with a hyperlink.
-
Shared External - The file or folder is shared externally via collaboration to a user outside your box account.
-
Shared Internal - The file or folder is shared internally via collaboration to a user inside your organization.
-
Private - The file or folder is not shared by the file owner.
-
- Shared Link Access
-
The access level for the shared link.
- Shared Link URL
-
The URL of the shared link associated with a file or folder.
- Size on Disk
-
The size of the file or folder (bytes) populated from Box.
- Sync State
-
The state of the sync from a user's device to a folder.
- Tags
-
The Box tags applied to the file or folder.
- Trashed Date
-
The trashed date of the file or folder.
- Type
-
The type of object which includes file or folder.
- Upload Email Access
-
The access level of the upload email for the folder.
- Upload Email
-
The upload email address for the folder.
- Uploader Name
-
The uploader's name.
- Users
-
The user's id and email.
- Version
-
The version number of the file.
- ETag
-
The HTTP entity tag of the file or folder.
Troubleshooting
Privacy Key Note in PEM Format
Error received:
"org.bouncycastle.openssl.PEMKeyPair.getPrivateKeyInfo()" because "keyPair" is null] Source:
Resolution: Convert the certificate from either Binary or JKS formats into PEM format.
Convert Binary into PEM Format:
-
Use the openssl x509 command to convert the binary certificate to PEM format. Replace certificate.der with the filename of your binary certificate and certificate.pem with the desired filename for the resulting PEM certificate. This command specifies -inform der to indicate that the input file is in DER format, and -out certificate.pem specifies the output filename.
CODEopenssl x509 -inform der -in certificate.der -out certificate.pem -
Once the conversion is complete, you can verify the PEM certificate using a text editor or by displaying its contents with the openssl x509 command. This command will display the details of the PEM certificate. Ensure that the information matches your expectations and that the certificate is correctly formatted.
CODEopenssl x509 -in certificate.pem -text -noout
Convert JKS into PEM Format:
These are general steps and might vary based on the specific contents and requirements of your JKS file. Additionally, ensure you have the necessary permissions to access and manipulate the certificates and keys in the JKS file.
-
Use the keytool command-line utility, which is included in the Java Development Kit (JDK), to extract the certificate and private key from the JKS file. For example, to extract the private key and certificate chain from a JKS file named keystore.jks:
CODEkeytool -v -importkeystore -srckeystore keystore.jks -destkeystore keystore.p12 -deststoretype PKCS12 -
Use the openssl command-line tool to convert the PKCS12 file to PEM format. This step separates the certificate and private key into individual PEM files. For example, to convert the PKCS12 file keystore.p12 to PEM format:
CODEopenssl pkcs12 -in keystore.p12 -out keystore.pem -
If needed, you can further extract the certificate and private key from the PEM file using text processing tools or by manually editing the file.
Socket Timeout Error in the Logs
To address this issue, ensure that the worker node traffic goes through the proxy. Update the proxy setup in guided environments or set the proxy details on the data source cluster.
No Account User Found
Ensure that the Box app scope has enterprise access rather than just app scope. Adjust the app scope settings accordingly. You may need administrative privileges in your Box account to change Box app scope.
403 Forbidden - Insufficient Scope
This error is typically produced when scopes that are needed for the API operation are not enabled. Check your configured application scopes following the Credential and System Permissions section and reauthorize your application, if applicable.
2024-10-07 17:10:37.646 WARN --- [ boxtask1-P-1] c.b.sdk jobId=a062c1e5-8be8-4664-aa9c-2cd8a9a1297d : Response
GET https://api.box.com/2.0/users/me
HTTP/1.1 403 Forbidden
date: Mon, 07 Oct 2024 17:10:37 GMT
x-envoy-upstream-service-time: 135
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
www-authenticate: Bearer realm="Service", error="insufficient_scope", error_description="The request requires higher privileges than provided by the access token."
To reauthorize the app
-
Log in to Box console as an admin
-
Go to the Apps menu
-
Select the Custom Apps Manager tab.
-
Find your authorized application by name under Server Authentication Apps.
-
In the authorized application row, click the Context Menu button represented by three dots ( . . . )
-
Select Reauthorize App.
Suppressing Box Notifications
Suppression of notifications should be enabled in the Box Server before this data source is executed for the first time. Ensure that you are logged in as an Enterprise user when completing these tasks.
The following settings are required for your application to leverage this feature:
- Can suppress email notifications from API calls
-
: Contact Box Support for assistance. You will need to provide the following, which can be obtained via the authorized application settings:
CODECLIENTID = "xxxxxxx"; ENTERPRISEID = "xxxxx"; - Manage Enterprise Properties
-
: Available via the developer console under the authorized application's Configuration tab.
- Edit settings for your company
-
: Specify co-admin permissions under "Users & Groups > Roles and Access Permissions" in the console. Update user access permissions to
Edit settings and apps for your companyonly.
The OneTrust Data Discovery project suppresses notifications by default. If you want to enable these notifications, you will need to update the Credentials JSON by making enableNotifications as true.
{
"clientID": "xxx",
"clientSecret": "xxx",
"connectionUrl": "na",
"enterpriseID": "xx",
"passphrase": "xxx",
"privateKey": "-----BEGIN ENCRYPTED PRIVATE KEY-----\nMIIFDjBABgkqhkiG9w0BBQ0w\n-----END ENCRYPTED PRIVATE KEY-----\n",
"publicKeyID": "xxx",
"enableNotifications": "true"
}