Policy Type Can't Be Set on New Policy Created

When you create your own Policy in Nexus IQ, it doesn’t give you the option to set the Policy Type. This info is key when using the REST API to find either “security”,“license” or “other” policy violations. This information is set for all of the default policies that come within nexus iq.

@jfinnessy thanks for taking a look at creating your own policy. The type is calculated based on what conditions are used. The documentation for this is a bit buried so no wonder it wasn’t obvious. Here’s where that’s mentioned: Understanding the Parts of a Policy

Copied here for ease of reference:

When setting conditions, you will also want to consider Policy Type (one of the available filters for the Dashboard). Based on the condition that is chosen, a policy type will be assigned. This is done automatically and can’t be overridden. The following rules are used to determine a policy’s type:

  • Security if it has any security conditions, it is considered a Security policy.
  • License if it has any license conditions, it is considered a License policy.
  • Quality if it has any age or popularity conditions, it is considered a Quality policy.
  • Other if none of its conditions are of types mentioned above, it is considered to be of type Other.

A policy can only ever be of one type. In cases where a policy has conditions that meet more than one of the rules above, the order above dictates the type of policy. For example, if a policy has security and license conditions, it is considered to be of type Security.