Managing Security through API

This section describes the API Server on a Management ServerClosed Check Point Single-Domain Security Management Server or a Multi-Domain Security Management Server. and the applicable API Tools.

API

You can configure and manage the Management Server through API Requests that you send to the API Server that runs on the Management Server.

The API Server can automate daily tasks and integrate Check Point solutions with 3rd-party systems, such as virtualization, ticketing, and change management systems.

To learn more about the management APIs, to see code samples, and to take advantage of user forums, see:

API Tools

You can use these tools to work with the API Server on the Management Server:

Configuring the API Server

To configure the API Server:

  1. Connect with SmartConsole to the Security Management Server or applicable Domain Management Server.

  2. From the left navigation panel, click Manage & Settings.

  3. In the upper left section, click Blades.

  4. In the Management API section, click Advanced Settings.

    The Management API Settings window opens.

  5. Configure the Startup Settings and the Access Settings.

  6. Click OK.

  7. In the upper left section, click Permissions & Administrators.
  8. In the object of each applicable Administrator, make sure the assigned Permission ProfileClosed Predefined group of SmartConsole access permissions assigned to Domains and administrators. With this feature you can configure complex permissions for many administrators with one definition. allows access to Management API.

  9. Publish the SmartConsole session.

  10. Restart the API Server on the Management Server with this command:

    api restart

    Notes:

    • On a Multi-Domain Server, you must run this command in the context of the applicable Domain Management Server:

      mdsenv <IP Address or Name of Domain Management Server>

    • The output of this command must show:

      API started successfully

  11. Examine the status of the API server on the Management Server with this command:

    api status

    Notes:

    • The output of this command must show:

      --------------------------------------------
      Overall API Status: Started
      --------------------------------------------
      
      API readiness test SUCCESSFUL. The server is up and ready to receive connections
    • The output of this command may show the state of the "API" process as "Stopped" when API access is set to "All IP addresses that can be used for GUI clients", and more than 200 Trusted Clients are configured:

      Processes:
      
      Name      State     PID       More Information
      -------------------------------------------------
      API       Stopped   ...
      

Discarding API Sessions with Locks or Pending Changes

Open SmartConsole and API sessions that contain locks or unpublished changes are not automatically discarded. As a result, some sessions can remain open for extended periods.

The ENABLE_DISCARD_WORKSESSIONS_OLDER_THAN_DAYS environment variable controls whether stale open sessions are automatically discarded. By default, this variable is disabled, and open sessions with locks or unpublished changes remain available until they are manually discarded.

When enabled, the Security Management Server periodically evaluates open sessions and discards sessions that exceed the configured age threshold.

To configure automatic discard of stale sessions:

  1. Connect to the Security Management Server or Multi-Domain Server using SSH.

  2. Switch to Expert mode.

  3. To enable automatic discard of open sessions that contain locks or unpublished changes, set ENABLE_DISCARD_WORKSESSIONS_OLDER_THAN_DAYS to "true".

    Run:

    MDS_FWDIR/scripts/reload_env_vars.sh -e "ENABLE_DISCARD_WORKSESSIONS_OLDER_THAN_DAYS=true"

    $MDS_FWDIR/scripts/override_server_setting.sh -e ENABLE_DISCARD_WORKSESSIONS_OLDER_THAN_DAYS true

  4. By default, only sessions which are open for more than 60 days are automatically discarded. To configure the number of days after which sessions are discarded, run:

    $MDS_FWDIR/scripts/reload_env_vars.sh -e "DISCARD_WORKSESSIONS_OLDER_THAN_DAYS=<Number_of_Days>" $MDS_FWDIR/scripts/override_server_setting.sh -e DISCARD_WORKSESSIONS_OLDER_THAN_DAYS <Number_of_Days>

    For example, to set the threshold to 30 days, run:

    $MDS_FWDIR/scripts/reload_env_vars.sh -e "DISCARD_WORKSESSIONS_OLDER_THAN_DAYS=30"
    $MDS_FWDIR/scripts/override_server_setting.sh -e DISCARD_WORKSESSIONS_OLDER_THAN_DAYS 30

Result:

When ENABLE_DISCARD_WORKSESSIONS_OLDER_THAN_DAYS is set to "true":

  • The Security Management Server checks all open SmartConsole and API sessions one time per day.

  • If a session remains open longer than the number of days configured in DISCARD_WORKSESSIONS_OLDER_THAN_DAYS, the session is automatically discarded.