Configuring Controller API
You must perform some initial configuration and setup activities through the Policy Enforcer UI before you begin using the Controller API.
- Log into the Policy Enforcer UI and configure the threat
prevention type. You can configure Policy Enforcer to run in the following
modes based on the threat prevention type you select:
Cloud only or cloud feeds mode
Sky ATP mode
Sky ATP with Policy Enforcer mode
For more information on configuring threat prevention types, see Policy Enforcer Administration Guide.
- Invoke the Config API with HTTP basic authentication using
your Policy Enforcer server SSH user credentials, as shown in the
following example:
POST <context>/api/v2/controller/configs Content-Type: application/json Authorization: Basic <base 64 encoded (<ssh username of Policy Enforcer>:<ssh password of Policy Enforcer>)> "configs": { "sdsn": true, "cloudOnly": false, "customOnly": false, "ems": { "username": "Policy Enforcer_user", "SD_app_sub_version": null, "SD_app_version": <Security Director release version>, "url": <URL of Security Director>, "password": <ssh password of Policy Enforcer>}, "SD_release_type": "<Security Director release type, for example, R1, R2> " "restApi": { "username": <REST API username>, "password": <REST API password>} }
Note You must use only https for the ems URL.
Ensure that you are using the correct Policy Enforcer username and password that successfully authenticate Security Director.
The REST API username and password are the new credentials for the REST APIs.
Based on the mode you have selected in the Policy Enforcer UI, you can specify the configuration using the Config API as follows:
- Default mode—You can
configure Policy Enforcer in the Default mode as follows:
"configs": { "sdsn": true "cloudonly": false “customOnly”: true }
- Cloud only or cloud feeds mode—You can configure Policy Enforcer in the cloud only or cloud
feeds mode as follows:
"configs": { "sdsn": true "cloudonly": true “customOnly”: false }
- Sky ATP mode—You can
configure Policy Enforcer in the Sky ATP mode as follows:
"configs": { "sdsn": false "cloudonly": false “customOnly”: false }
- Sky ATP with Policy Enforcer mode—You can configure Policy Enforcer in the Sky ATP with Policy
Enforcer mode as follows:
"configs": { "sdsn": true "cloudonly": false “customOnly”: false }
Note Ensure that the values of
sdsn
andcloudonly
reflect the mode you have selected in the Policy Enforcer UI. - You can also use your REST API user credentials for HTTP
basic authentication to make any Policy Enforcer REST API calls. To
do so, you must first create your REST API username and password.
You can use any value as the username and password, for example,
admin/admin
orabcd/wxyz
.