DataCollectionRules

@objc
public class DataCollectionRules : NSObject

Enable anonymous threat research data be collected on the device and sent to the BlackBerry Cloud for analysis.

What is Anonymous Data Collection?

As part of BlackBerry’s Mobile Threat Defense suite of features, this feature collects data that BlackBerry believes may assist in finding new, previously undetected, threats, and increasing confidence in the detection of threats. The information may bring benefits to either future static checks and/or future training of machine learning models, and thus advances BlackBerry’s products.

What data is collected?

The categories of sensor being used and thus data collected are:

  • Anonymous identity
  • Information about:
    • Battery status
    • Processes & Threads
    • Libraries
    • Applications
    • System Files & Properties
    • Network events
    • Certificates

How does BlackBerry ensure the data collected is anonymous?

We collect nothing in the information which allows identification of the individual user or device or organization. There is no way for BlackBerry, or the organization using BlackBerry solution to process the data to determine the identity of the source of the data. A randomly generated Anonymous App Identifier is created per application, this is used so that anonymous data collected over time from the same application instance can be collated. However, this identifier is different and unique from any identifier that either the app developer or BlackBerry is aware of.

This random Anonymous App Identifier is stored encrypted in the secure container which protects all of runtime Library data and is deleted when either the app is uninstalled or is deactivated. This Anonymous App Identifier is unique per application. For example, if the user had 3 applications protected by \ss_runtime_name on the same device, each would return a different identifier and thus data is not associated together.

Where is the data stored and who has access to the data?

The data is used internally within the BlackBerry’s R&D organization. Even within the organization only individuals with a genuine need to access the data are granted access after following an approval process. The data is not available in any form to anyone outside of BlackBerry. The data is stored in Amazon AWS S3 storage for data analysis and processing.

How is data collected?

If this feature is enabled anonymous data collection information will be reported every 6 hours (or next time app starts if more than 6 hours have passed). Data collection is configured to only upload over a WiFi connection and to upload a maximum of 100MB per month. Certain types of information are collected at application startup only and other types during the course of an application running.

Use the methods in this class to alter the data limits and networks used whilst uploading.

Enabling Anonymous Data Collection

We would encourage application developers to enable this feature by adding the following:-

// Update the default rules.
private let dataCollectionRulesToSet = DataCollectionRules()
dataCollectionRulesToSet.enableDataCollection()

// Apply the updated rules.
ManageRules.setDataCollectionRules(rules: dataCollectionRulesToSet)
  • A Boolean value indicating whether the data collection has been enabled.

    By default, data collection is disabled.

    Declaration

    Swift

    public private(set) var isEnabled: Bool { get }
  • An upload type which indicates what network types are permitted when uploading data.

    Declaration

    Swift

    public private(set) var uploadType: UploadType? { get }
  • A limit on how much data may be uploaded per month.

    Declaration

    Swift

    public private(set) var uploadMonthlyLimit: UploadMonthlyLimit? { get }
  • Enable data collection and uploads.

    By default, data collection is disabled.

    Declaration

    Swift

    @discardableResult
    public func enableDataCollection() -> DataCollectionRules
  • Disable data collection and uploads

    Declaration

    Swift

    @discardableResult
    public func disableDataCollection() -> DataCollectionRules
  • Set the type of network to use when uploading anonymous threat research data to the BlackBerry Cloud for analysis.

    Declaration

    Swift

    @discardableResult
    public func setUploadType(_ uploadType: UploadType) -> DataCollectionRules

    Parameters

    uploadType

    Upload type to be set

  • Control how much data is uploaded per month.

    Select whether to permit 10MB, 50MB, or 100MB of data to be uploaded to BlackBerry per month. By default, the upper limit of 100MB is configured.

    Declaration

    Swift

    @discardableResult
    public func setUploadMonthlyLimit(_ uploadMonthlyLimit: UploadMonthlyLimit) -> DataCollectionRules

    Parameters

    uploadMonthlyLimit

    indicating the amount of data per month.