Configure specific software checks to be evaluated. More...
Configure what security patch level and OS version is required for your application to be safe. Flag if your application is running on a specific manufacturers device whose software or version of Android is deemed to be untrustworthy.
It is recommend that users have a recent security patch level and OS version to be confident your application is being run in a safe environment.
Utilize the security checks within the library to help inform or perhaps enforce that a user upgrades their device software. Define your minimum requirements for security patch level and OS version and then enable these checks using 'DeviceSoftware.enableCheck'.
Additionally preclude specific device manufactures or device models from running your application that are deemed to be a security risk. This may be relevant in certain locales where devices from a certain manufacturer are deemed to be untrustworthy.
Classes | |
enum | DeviceSoftwareCheck |
Enumeration of software security checks which may be evaluated by the library. More... | |
Public Member Functions | |
DeviceSoftwareRules () | |
Constructor with all checks disabled. More... | |
DeviceSoftwareRules (SecurityFeatureStatus status) | |
Set all checks to be enabled or disabled. More... | |
DeviceSoftwareRules | enableCheck (DeviceSoftwareCheck check) |
Enable a specific check to be evaluated once the required rules are configured. More... | |
DeviceSoftwareRules | disableCheck (DeviceSoftwareCheck check) |
Turn off a specific check from being evaluated. More... | |
SecurityFeatureStatus | getCheck (DeviceSoftwareCheck check) |
Determine if a specific check is currently enabled. More... | |
List< String > | getManufacturerDenyList () |
Return the list of device manufacturers which are denied. More... | |
DeviceSoftwareRules | setManufacturerDenyList (List< String > manufacturerDenyList) |
Configure a list of device manufacturers to deny. More... | |
List< String > | getModelDenyList () |
Return the list of device models which are denied. More... | |
DeviceSoftwareRules | setModelDenyList (List< String > modelDenyList) |
Configure a list of device models to deny. More... | |
String | getMinimumOSVersion () |
Return the minimum OS version permitted. More... | |
DeviceSoftwareRules | setMinimumOSVersion (String minimumOSVersion) throws IllegalArgumentException |
Configure the minimum OS version permitted. More... | |
Date | getSecurityPatchMinimumDate () |
Returns minimum required date of system security patch. More... | |
DeviceSoftwareRules | setSecurityPatchMinimumDate (Date securityPatchMinimumDate) |
Configure the minimum required date of system security patch. More... | |
List< String > | getUnsupportedOsVersions () |
Return the list of OS versions which are denied. More... | |
DeviceSoftwareRules | setUnsupportedOsVersions (List< String > unsupportedOsVersions) |
Configure a list of OS versions to deny. More... | |
Constructor with all checks disabled. All deny lists are empty. Min version is 0.0.0.0. Minimum patch level date is 1970-01-01T00:00:00Z.
DeviceSoftwareRules | ( | SecurityFeatureStatus | status | ) |
Constructor which sets all Check statuses to status
. All deny lists are empty. Minimum patch level date is 1970-01-01T00:00:00Z.
status | - security feature status for all checks (individual checks can be enabled/disabled by enableCheck/disableCheck APIs) |
DeviceSoftwareRules enableCheck | ( | DeviceSoftwareCheck | check | ) |
Enable a specific check to be evaluated. Note the rules to evaluate must be configured.
DeviceSoftwareRules disableCheck | ( | DeviceSoftwareCheck | check | ) |
Turn off a specific check so it is no longer evaluated.
SecurityFeatureStatus getCheck | ( | DeviceSoftwareCheck | check | ) |
Determine if a specific check is currently enabled.
List<String> getManufacturerDenyList | ( | ) |
Return the list of device manufacturers which are denied. If a user's device is manufactured by a company on this list, it will be flagged as a DeviceSoftware threat.
DeviceSoftwareRules setManufacturerDenyList | ( | List< String > | manufacturerDenyList | ) |
Configure a list of device manufacturers which will be flagged as a risk.
manufacturerDenyList | A list of manufacturers on the deny list. |
List<String> getModelDenyList | ( | ) |
Return the list of device models which are denied. If the model of a user's device matches one of the models on this list it will be flagged as a DeviceSoftware threat.
DeviceSoftwareRules setModelDenyList | ( | List< String > | modelDenyList | ) |
Configure a list of device models which will be flagged as a risk.
modelDenyList | A list of device models on the deny list. |
String getMinimumOSVersion | ( | ) |
string
representing the minimum OS Version. i.e. Android versionName. DeviceSoftwareRules setMinimumOSVersion | ( | String | minimumOSVersion | ) | throws IllegalArgumentException |
Configure the minimum OS version permitted. Use string dot notation format, e.g. 10.1.0
minimumOSVersion | The minimum permitted OS version. |
IllegalArgumentException | - thrown when minimumOSVersion isn't in the correct dot notation format. |
Date getSecurityPatchMinimumDate | ( | ) |
Returns the earliest date of the Android security patch which must be installed on the device. Security updates installed after this date are deemed to be acceptable.
date
The date after which a security patch must have been installed. DeviceSoftwareRules setSecurityPatchMinimumDate | ( | Date | securityPatchMinimumDate | ) |
Set the oldest permitted date for when the Android security patch which last updated on the device. Security updates installed before this date will be flagged as a risk.
The minimum patch level date is 1970-01-01T00:00:00Z.
securityPatchMinimumDate | the oldest permitted date of the security patch. |
List<String> getUnsupportedOsVersions | ( | ) |
Return the list of OS versions which are denied. If the OS version of a user's device matches one of the versions on this list it will be flagged as a DeviceSoftware threat.
DeviceSoftwareRules setUnsupportedOsVersions | ( | List< String > | unsupportedOsVersions | ) |
Configure a list of OS versions which will be flagged as unsupported.
unsupportedOsVersions | A list of unsupported OS versions on the deny list. |