Configure Deep Security Manager System Settings

The API provides access to many of the Deep Security Manager system settings. It is useful to automate the configurations immediately after deployment.

The SystemSettings endpoint enables you to list and modify system settings. Use the following general steps to use a client library to modify system settings:

  1. Create one or more SettingValue objects and set the desired value for them.
  2. Create a SystemSettings object and set the properties to the SettingValue objects.
  3. Create a SystemSettingsApi object and use it to modify the system setting on Deep Security Manager according to the SystemSettings object.

See also Configure Policy, Computer, and System Settings.

Example: Set the maximum number of sessions for a user

Python
def configure_system_settings(api, configuration, api_version, api_exception):
    """ Configures the maximum number of active sessions. Demonstrates how to
    configure system properties.

    :param api: The Deep Security API modules.
    :param configuration: Configuration object to pass to the api client.
    :param api_version: The version of the API to use.
    :param api_exception: The Deep Security API exception module.
    :return: A SystemSettingsApi object that contains the ID of the updated system settings.
    """

    # Create the SettingValue object and set the max sessions value
    max_sessions = api.SettingValue()
    max_sessions.value = "100"

    # Add the SettingValue object to a SystemSettings object
    system_settings = api.SystemSettings()
    system_settings.platform_setting_active_sessions_max_num = max_sessions

    try:
        # Modify system settings on Deep Security Manager
        settings_api = api.SystemSettingsApi(api.ApiClient(configuration))
        return settings_api.modify_system_settings(system_settings, api_version)

    except api_exception as e:
        return "Exception: " + str(e)
JavaScript
/*
* Configures the maximum number of active sessions.
* Demonstrates how to configure system properties.
* @param {object} api The api module.
* @param {String} apiVersion The api version to use.
* @returs {Promise} The promise that SystemSettingsApi.modifySystemSettings returns. 
*/
exports.configureSystemSettings = function(api, apiVersion) {

  // Create the settings value
  const maxSessions = new api.SettingValue();
  maxSessions.value = "20";

  // Cretae a SystemSettings object and set the setting value
  const systemSettings = new api.SystemSettings();
  systemSettings.platformSettingActiveSessionsMax = maxSessions;

  // Modify the settings on Deep Security Manager
  const systemSettingsApi = new api.SystemSettingsApi();
  return systemSettingsApi.modifySystemSettings(systemSettings, apiVersion);
};
Java
/*
 * Configures the maximum number of active sessions. 
 * Demonstrates how to configure system properties.
 */
public static void configureSystemSettings() {

  // Create the setting value
  SettingValue maxSessions = new SettingValue();
  maxSessions.setValue("20");
  
  // Create a SystemSettings object and set the property
  SystemSettings systemSettings = new SystemSettings();
  systemSettings.setPlatformSettingActiveSessionsMax(maxSessions);
  
  // Modify system settings on Deep Security Manager
  SystemSettingsApi settingsApi = new SystemSettingsApi();
  try {
    settingsApi.modifySystemSettings(systemSettings, "v1");
  } catch (ApiException e) {
    e.printStackTrace();
  }
}

For information about authenticating API calls, see Authenticate with Deep Security Manager.