SAPcpmsSecurityPolicyApplyStep

open class SAPcpmsSecurityPolicyApplyStep : OnboardingStep

Instantiates an OnboardingStep that uses the downloaded SAPcpmsSettings to determine the security policies set from Mobile Services and applies them.

There are four types of security policies that we read and act upon in this step:

  1. DeviceComplianceDetectionPolicy
  2. ClipboardAccessPolicy
  3. PrintPolicy
  4. OpenURLPolicy

SAPcpmsSecurityPolicyApplyStep performs the following actions during an onboard, restore, and passcode reset.

  1. If DeviceComplianceDetectionPolicy is set to report: Performs a detection check and uploads the compliance status to Mobile Services.
  2. If DeviceComplianceDetectionPolicy is set to ignore: Does not perform a detection check or upload any compliance status to Mobile Services.
  3. If unable to determine DeviceComplianceDetectionPolicy: Does not perform a detection check or upload any compliance status to Mobile Services.
  4. If ClipboardAccessPolicy is set to blocked: ClipboardProtectionEnforcer prevents cut, copy, and paste actions between this app and any other app.
  5. If ClipboardAccessPolicy is set to unrestricted: ClipboardProtectionEnforcer does not prevent cut, copy, and paste actions between this app and other apps.
  6. If unable to determine ClipboardAccessPolicy: ClipboardProtectionEnforcer does not intervene with the default app’s behavior.
  7. If PrintPolicy is set to blocked: PrintPolicyEnforcer prevents the printing of an app’s content.
  8. If OpenURLPolicy is set to blocked: OpenURLPolicyEnforcer prevents the opening of URLs in external applications.
  9. If PrintPolicy and OpenURLPolicy are set to unrestricted: APIs for print and opening URLs are restored.

Precondition

SAPcpmsSecurityPolicyApplyStep needs to run anytime after SAPcpmsSettingsDownloadStep. SAPcpmsSettingsDownloadStep, usually used indirectly through SAPcpmsDefaultSteps.settingsDownload, will obtain the required policy information.

Note

SAPcpmsSecurityPolicyApplyStep will return OnboardingResult.success even if the compliance status upload fails due to a lack of network connectivity.

Usage

public var onboardingSteps: [OnboardingStep] {
  return [
   // ...
   CompositeStep(steps: SAPcpmsDefaultSteps.settingsDownload),
   CompositeStep(steps: SAPcpmsDefaultSteps.applyDuringOnboard),
   SAPcpmsSecurityPolicyApplyStep(),
   // ...
  ]
}