Policy Management
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_link3' is unknown.

Policy Management

Policies are a set of configurations. Policies trigger events based on the data gathered or inform the user when the device is not responding as expected. 

In this tutorial, you create a policy and see how it's applied on the device.

Before you begin

  1. To learn about user categories responsible for working with policies and how the policies are enforced on a device, see Policies.

  2. Start the WSO2 IoT Server core profile.

    cd <IoT_HOME>/bin sh iot-server.sh
  3. Sign in to the Device Management console.

Compliance management: If the device user does not comply with the policy enforced on a device, WSO2 IoT Server forcefully enforces the policies back on the device.

Let's get started!


Add a policy

In this tutorial, you will be creating a policy for Android devices. You can follow the same steps to create policies for Windows and iOS devices.

  1. Click Add under POLICIES.

  2. Click the policy for Android.

  3. Create your policy. In this tutorial, let's create a passcode policy.
    After defining the settings, click CONTINUE.

  4. Define the user groups that the passcode policy needs to be assigned to:
    Select the set user role/s or set user/s option and then select the users/roles from the item list.
    Let's select set user role/s and then select ANY.

  5. Click CONTINUE.

  6. Define the policy name and the description of the policy.

  7. Click PUBLISH to save and publish the configured profile as an active policy to the database.

  8. To publish the policy to the existing devices, click APPLY CHANGES TO DEVICES from the policy management page.

To check if the policy is applied on your device, follow the steps to verify the policy enforced on a device.


Publish policies

When a policy is published it will be in the active state. The active policies for a given device type will be applied to devices that register with WSO2 IoT Server based on the Policy enforcement criteria.

Follow the steps given below to publish a policy:

  1. Click View under POLICIES to get the list of the available policies.

  2. Click Select to select the policy or policies that are not in the publish state and you wish to publish.

  3. Click Publish.

    Click YES to confirm that you want to publish the policy. Now your policy is published and is in the active/updated state. Therefore, the policy will only be applied on devices that enroll newly with WSO2 IoT Server and not on the already enrolled devices.

Optionally, click APPLY CHANGES to push any changes made to the policies on the existing devices.


Unpublish policies

When a policy is unpublished it will be in the non-active state. Such policies will not be considered when applying policies to the device that registers with WSO2 IoT Server.

Follow the steps given below to unpublish a policy:

  1. Click View under POLICIES to get the list of the available policies.

  2. Click Select to select the policy or policies you wish to unpublish.

  3. Click Unpublish.

  4. Click YES to confirm that you want to unpublish the policy. Now your policy is unpublished and is in the inactive/updated state. Therefore, the policy will not be applied on devices that enroll newly with WSO2 IoT Server.

Optionally, click  APPLY CHANGES to push the policy changes to the existing devices. If you unpublished a policy that is already enforced on a device and you clicked APPLY CHANGES, that policy will be removed from the device and another policy will be applied to the device based on the policy enforcement criteria.


Verify the policy enforced on a device

To see if the policy is applied on your device, go to the device management console:

  1. Click View under DEVICES.

  2. Click on your device to view the device details.

  3. Click Policy Compliance.
    You will see the policy that is currently applied to your device.


com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.