Using Policy Type containers
You can use a Policy Type container to store related Policy Type objects and other Policy Type containers.
Containers give you an additional way to categorize custom policy types, making it easier to locate and select the policy to configure in the wizards for managing Policy Objects. Thus, when you create a Policy Object, the wizard page that prompts you to select a policy displays the custom policy types along with the containers that hold the respective Policy Type objects.
To create a new Policy Type container
- In the console tree, under Configuration/Server Configuration/Policy Types, right-click the Policy Type container in which you want to create a new container, and select New | Policy Type Container.
For example, if you want to create a new container in the root container, right-click Policy Types.
- In the New Object - Policy Type Container wizard, type a name and, optionally, a description for the new container.
The name and description are displayed on the page for selecting a policy, in the wizards that are used to configure Policy Objects.
- Click Next and follow the steps in the wizard to complete the creation of the new container.
Exporting policy types
You can export Policy Type objects so that the definition of the policy types is stored in an XML file that can be imported in a different Active Roles environment. Exporting and then importing Policy Type objects make it easy to distribute custom policies to other environments.
To export a Policy Type object or container
- Right-click the Policy Type object or container, click Export and specify a file to hold the export data.
You can select multiple Policy Objects to export, or you can select a container to export all Policy Type objects and containers held in that container. In either case, the Export operation creates a single XML file that can later be imported to any container under the Policy Types node.
Exporting Policy Type objects creates an XML file representing both the objects and the Script Modules containing the policy scripts for each policy type being exported. During an import, Active Roles creates the Policy Type objects and the Script Modules based on the data found in the XML file. As a result of the import, the policy types are replicated to the new environment and can be used the same way as in the environment from which they were exported.
Importing policy types
You can import the exported Policy Type objects and containers, which will add them to a Policy Type container and allow you to configure and use policies defined by those Policy Type objects. All the data required to deploy the policy types is represented in an XML file. To see an example of the XML document that represents a policy type, export a Policy Type object and view the saved XML file.
To import the exported Policy Type objects and containers
- In the Active Roles console tree, under Configuration/Server Configuration/Policy Types, right-click the Policy Type container in which you want to import the Policy Type objects and containers.
- Click Import Policy Types, and then open the export data file you want to import.
This will create new Policy Type objects and containers in the selected container. In addition, new Script Modules will be created in the Configuration/Script Modules container and associated with the newly created Policy Type objects.
Configuring a policy of a custom type
Once a custom policy type has been deployed, an Active Roles administrator can add a policy of that type to a Policy Object. This is accomplished by selecting the policy type in the wizard that creates a new Policy Object or in the wizard that adds a policy to an existing Policy Object.
Which wizards to use, depends upon the policy type category:
- For a policy type of the Provisioning category, a policy of that type can be added only to a Provisioning Policy Object.
- For a policy type of the Deprovisioning category, a policy of that type can be added only to a Deprovisioning Policy Object.
To configure a policy of a custom policy type
- Follow the steps in the wizard for creating a new Policy Object or in the wizard for adding a policy to an existing Policy Object.
For example, if the policy type is of the Provisioning category, you could use the New Provisioning Policy Object wizard opened by the New | Provisioning Policy command on a container under Configuration/Policies/Administration in the Active Roles console.
- On the Policy to Configure page in the wizard, click the type of the policy you want.
The Policy to Configure page lists the custom policy types together with the pre-defined Active Roles policy types. Each custom policy type is identified by the display name of the respective Policy Type object.
The custom policy types are organized in a tree-like structure that reflects the existing hierarchy of the Policy Type containers. For example, if a Policy Type container is created to hold a particular Policy Type object, the container also appears on the wizard page, so you may need to expand the container to view or select the policy type.
- On the Policy Parameters page, set parameter values for the policy: Click the name of a parameter in the list, and then click Edit.
Parameters control the behavior of the policy. When Active Roles executes the policy, it passes the parameter values to the policy script. The actions performed by the script, and the results of those actions, depend upon the parameter values.
Clicking Edit displays a page where you can add, remove or select a value or values for the selected parameter. For each parameter, the policy script defines the name of the parameter and other characteristics, such as a description, a list of acceptable values, the default value, and whether a value is required. If a list of acceptable values is defined, then you can only select values from that list.
- Follow the wizard pages to complete the wizard.