Chatta subito con l'assistenza
Chat con il supporto

One Identity Safeguard for Privileged Sessions 7.1.1 - REST API Reference Guide

Introduction Using the SPS REST API Basic settings User management and access control Managing SPS General connection settings HTTP connections Citrix ICA connections MSSQL connections RDP connections SSH connections Telnet connections VNC connections Search, retrieve, download, and index sessions Reporting Health and maintenance Advanced authentication and authorization Completing the Welcome Wizard using REST Enable and configure analytics using REST

Pre-defined reports

You can configure the compliance reports of SPS using the predefined_reports endpoint.

To help you comply with the regulations of the Payment Card Industry Data Security Standard (PCI DSS), One Identity Safeguard for Privileged Sessions (SPS) can generate reports on the compliance status of SPS. Note that this is not a fully-featured compliance report: it is a tool to enhance and complement your compliance report by providing information available in SPS. The report corresponds with the document Payment Card Industry (PCI) Data Security Standard, Requirements and Security Assessment Procedures, Version 3.0, published by the PCI Security Standards Council.

URL
GET https://<IP-address-of-SPS>/api/configuration/reporting/predefined_reports
Cookies
Cookie name Description Required Values
session_id Contains the authentication token of the user Required

The value of the session ID cookie received from the REST server in the authentication response, for example, a1f71d030e657634730b9e887cb59a5e56162860. For more information on authentication, see Authenticate to the SPS REST API.

NOTE: This session ID refers to the connection between the REST client and the SPS REST API. It is not related to the sessions that SPS records (and which also have a session ID, but in a different format).

Sample request

The following command lists the pre-defined reports available on SPS.

curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/reporting/predefined_reports

The following command retrieves the properties of a specific report.

curl --cookie cookies https://<IP-address-of-SPS>/api//configuration/reporting/predefined_reports/<report-key>
Response

The following is a sample response received when listing pre-defined reports.

For more information on the meta object, see Message format.

{
  "meta": {
    "first": "/api/configuration/reporting/content_subchapters",
    "href": "/api/configuration/reporting/predefined_reports",
    "last": "/api/configuration/reporting/restbased_subchapters",
    "next": "/api/configuration/reporting/reports",
    "parent": "/api/configuration/reporting",
    "previous": "/api/configuration/reporting/content_subchapters",
    "transaction": "/api/transaction"
  },
  "items": [
    {
      "key": "pcidss",
      "meta": {
        "href": "/api/configuration/reporting/predefined_reports/pcidss"
      }
    }
  ]
}

When retrieving the endpoint of a specific report, the response is the following.

{
  "key": "pcidss",
  "meta": {
    "first": "/api/configuration/reporting/predefined_reports/pcidss",
    "href": "/api/configuration/reporting/predefined_reports/pcidss",
    "last": "/api/configuration/reporting/predefined_reports/pcidss",
    "next": null,
    "parent": "/api/configuration/reporting/predefined_reports",
    "previous": null,
    "transaction": "/api/transaction"
  },
  "pcidss": {
    "access": [
      "report"
    ],
    "email_recipients": {
      "selection": "default"
    },
    "name": "PCI-DSS",
    "send_report_in_email": true
  }
}
Element Type Description
key string Top level element, contains the ID of the report.
<id-of-the-report> Top level item The elements of the pre-defined report.
access list List of access control groups whose members can access the report.
email_recipients Top level item Contains the list of e-mails where the generated report is sent.
recipients list

Custom list of e-mails where the generated report is sent.

To use a custom list, the selection element must be set to other.

selection string

This element can have two values:

  • default uses the e-mail address configured in the reporting_address element of the https://<IP-address-of-SPS>/api/configuration/management/email endpoint (or the Basic Settings > Management > Mail settings > Send reports to field on the web UI).

  • other uses the e-mails listed in the recipients element.

name string The name of the report.
send_report_in_email boolean Set it to false if you do not want to include the generated report in the e-mail.
Examples:

Set the e-mail recipients to the default (as configured in the reporting_address element of the /api/configuration/management/email endpoint):

"email_recipients": {
  "selection": "default"
}

Create a custom set of e-mail recipients:

"email_recipients": {
  "recipients": [
    "<email-1>",
    "<email-2>"
  ],
  "selection": "other"
}
Status and error codes

The following table lists the typical status and error codes for this request. For a complete list of error codes, see Application level error codes.

Code Description Notes
201 Created The new resource was successfully created.
400 InvalidQuery The requested filter or its value is invalid.
400

IncompleteConfigurationSubtreeError

Syntax error: \"No such property; property='recipients'

Do not provide recipients if you set the selection element under email_recipients to default.
400

Bad Request

"message": "New Ids are not allowed"

Error when committing your transaction. Creating new pre-defined reports is not allowed.
401 Unauthenticated The requested resource cannot be retrieved because the client is not authenticated and the resource requires authorization to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved.
403 Unauthorized The requested resource cannot be retrieved because the client is not authorized to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved.
404 NotFound The requested object does not exist.
Modify a pre-defined report

To modify a report, you have to:

  1. Open a transaction.

    For more information, see Open a transaction.

  2. Modify the JSON object of the report.

    PUT the modified JSON object to the https://<IP-address-of-SPS>/api/configuration/reporting/predefined_reports/<report-key> endpoint. You can find a detailed description of the available parameters listed in Element .

  3. Commit your changes.

    For more information, see Commit a transaction.

Content subchapters

Reporting subchapters created from audit trail content (statistics of search keywords, and screenshots). You have to provide a list of keywords, and create the appropriate filters to narrow down the scope of the search. SPS searches the indexed content of all audit trails that fit the filter criteria, and provide the resulting statistics and screenshots in the report.

Configure and enable indexing for all connections that you want to include in the reports.

URL
GET https://<IP-address-of-SPS>/api/configuration/reporting/content_subchapters
Cookies
Cookie name Description Required Values
session_id Contains the authentication token of the user Required

The value of the session ID cookie received from the REST server in the authentication response, for example, a1f71d030e657634730b9e887cb59a5e56162860. For more information on authentication, see Authenticate to the SPS REST API.

NOTE: This session ID refers to the connection between the REST client and the SPS REST API. It is not related to the sessions that SPS records (and which also have a session ID, but in a different format).

Sample request

The following command lists the available content subchapters.

curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/reporting/content_subchapters

The following command retrieves the properties of a specific subchapter.

curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/reporting/content_subchapters/<subchapter-key>
Response

The following is a sample response received when listing content subchapters.

For more information on the meta object, see Message format.

{
  "meta": {
    "first": "/api/configuration/reporting/content_subchapters",
    "href": "/api/configuration/reporting/content_subchapters",
    "last": "/api/configuration/reporting/restbased_subchapters",
    "next": "/api/configuration/reporting/predefined_reports",
    "parent": "/api/configuration/reporting",
    "previous": null,
    "transaction": "/api/transaction"
  },
  "items": [
    {
      "key": "13869311625707e0a3e0892",
      "meta": {
        "href": "/api/configuration/reporting/content_subchapters/13869311625707e0a3e0892"
      }
    }
  ]
}

When retrieving the endpoint of a specific content subchapter, the response is the following.

{
  "body": {
    "access": [
      "search"
    ],
    "filter": {
      "channel_policy": {
        "key": "-10200",
        "meta": {
          "href": "/api/configuration/ssh/channel_policies/-10200"
        }
      },
      "connection_policy": "8348340645707e2575e3c6",
      "protocol": "ssh",
      "server_address": "192.168.56.102",
      "server_port": 22,
      "source_address": "192.168.56.101",
      "source_port": 22,
      "username": "admin"
    },
    "name": "API_test_subchapter",
    "search_words": [
      "logout"
    ]
  },
  "key": "13869311625707e0a3e0892",
  "meta": {
    "first": "/api/configuration/reporting/content_subchapters/13869311625707e0a3e0892",
    "href": "/api/configuration/reporting/content_subchapters/13869311625707e0a3e0892",
    "last": "/api/configuration/reporting/content_subchapters/13869311625707e0a3e0892",
    "next": null,
    "parent": "/api/configuration/reporting/content_subchapters",
    "previous": null,
    "transaction": "/api/transaction"
  }
}
Element Type Description
key string Top level element, contains the ID of the subchapter.
body Top level element (string) The elements of the subchapter.
access list

Required. List of access control groups whose members can access the subchapter.

To deny access to the subchapter, use "admin" as the only value for the element.

filter Top level element. Filter options for narrowing the scope of the keyword search. See the corresponding table for more details.
channel_policy string

References the key of the channel policy. You can configure channel policies at the "/api/configuration/<protocol>/channel_policies/<policy-ID>" endpoint.

Note that the path is different for each protocol.

To modify or add a channel policy, use the value of the returned key as the value of the channel_policy element, and remove any child elements (including the key).

connection_policy string

The key of the connection policy specified for the search.

To use a connection policy, you must also set the protocol using the protocol element.

protocol string

The protocol of the connection or channel policy specified for the search.

server_address string

The target server's address.

Use an IPv4 address.

server_port int The port of the target server's address.
source_address string The address from where the connection is initiated.
source_port int The port of the address from where the connection is initiated.
username string The username used to connect to the target server.
name string The name of the subchapter.
search_words list The list of search keywords to generate statistics and screenshots for in the subchapter.
Examples:

Create a content subchapter for the occurences of the "logout" keyword in SSH connections. Make the subchapter accessible to the search and report usergroups.

  • Search connections where the "shell-only" channel policy is used.

    {
      "access": [
        "search",
        "report"
      ],
      "filter": {
        "channel_policy": "-10000",
        "connection_policy": null,
        "protocol": "ssh",
        "server_address": null,
        "server_port": null,
        "source_address": null,
        "source_port": null,
        "username": null
      },
      "name": "Shell_access",
      "search_words": [
        "logout"
      ]
    }
  • Search connections of a specific connection policy. Provide the protocol of the connection. The key of the connection policy is available at the /api/configuration/<protocol>/connections/ endpoint.

    {
      "access": [
        "search",
        "report"
      ],
      "filter": {
        "channel_policy": null,
        "connection_policy": "<key-of-connection-policy>",
        "protocol": "ssh",
        "server_address": null,
        "server_port": null,
        "source_address": null,
        "source_port": null,
        "username": null
      },
      "name": "Controlled_access",
      "search_words": [
        "logout"
      ]
    }
  • Search connections where the "admin" username was used.

    {
      "access": [
        "search",
        "report"
      ],
      "filter": {
        "channel_policy": null,
        "connection_policy": null,
        "protocol": "ssh",
        "server_address": null,
        "server_port": null,
        "source_address": null,
        "source_port": null,
        "username": "admin"
      },
      "name": "Login_as_admin",
      "search_words": [
        "logout"
      ]
    }
  • Search connections made to a specific server address and port.

    {
      "access": [
        "search",
        "report"
      ],
      "filter": {
        "channel_policy": null,
        "connection_policy": null,
        "protocol": "ssh",
        "server_address": "<server-ip>",
        "server_port": <port>,
        "source_address": null,
        "source_port": null,
        "username": null
      },
      "name": "Server_access",
      "search_words": [
        "logout"
      ]
    }
Status and error codes

The following table lists the typical status and error codes for this request. For a complete list of error codes, see Application level error codes.

Code Description Notes
201 Created The new resource was successfully created.
400 InvalidQuery The requested filter or its value is invalid.
400

Path: <endpoint>/filter/channel_policy

Type: SyntacticError

You have included the key and meta elements of a channel_policy in a PUT or POST request.
401 Unauthenticated The requested resource cannot be retrieved because the client is not authenticated and the resource requires authorization to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved.
403 Unauthorized The requested resource cannot be retrieved because the client is not authorized to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved.
404 NotFound The requested object does not exist.
Add a content subchapter

To add a content subchapter, you have to:

  1. Open a transaction.

    For more information, see Open a transaction.

  2. Create the JSON object for the new content subchapter.

    POST the JSON object to the https://<IP-address-of-SPS>/api/configuration/reporting/content_subchapters/ endpoint. You can find a detailed description of the available parameters listed in Element .

    • To use a channel policy for filtering, use the key of the policy. You must also set the protocol element to the corresponding protocol.

      For example, to use the shell-only channel policy, which is a default SSH policy provided by SPS, you have to configure both the channel_policy element…

      "channel_policy": "-10000"

      …and the protocol element:

      "protocol": "ssh"

    If the POST request is successful, the response includes the key of the new subchapter. For example:

    {
      "key": "416bb324-b44e-4ed3-a49d-02e99e53e941",
      "meta": {
        "href": "/api/configuration/reporting/content_subchapters/416bb324-b44e-4ed3-a49d-02e99e53e941",
        "parent": "/api/configuration/reporting/content_subchapters",
        "transaction": "/api/transaction"
      }
    }
  3. Commit your changes.

    For more information, see Commit a transaction.

Modify a content subchapter

To modify a content subchapter, you have to:

  1. Open a transaction.

    For more information, see Open a transaction.

  2. Modify the JSON object of the subchapter.

    You can find a detailed description of the available parameters listed in Element

    To use a channel policy for filtering, do not include the returned key and meta elements of the channel policy in your PUT request. Instead, set the value of the channel_policy to the value of its key.

    For example, if a GET request for the subchapter returns the following channel_policy filter:

    "channel_policy": {
      "key": "-10200",
      "meta": {
        "href": "/api/configuration/ssh/channel_policies/-10200"
      }
    }

    You have to change it in your PUT request to:

    "channel_policy": "-10200"

    You must also configure the protocol element to the protocol of the channel policy.

  3. Upload the modified configuration

    PUT the modified JSON object to the https://<IP-address-of-SPS>/api/configuration/reporting/content_subchapters/<subchapter-key> endpoint.

  4. Commit your changes.

    For more information, see Commit a transaction.

Health and maintenance

Topics:

Monitor appliance health status

To monitor the health status of an appliance, query the /api/health_status endpoint.

URL
curl --cookie cookies https://<IP-address-of-SPS>/api/health_status
Response

The following is a sample response received.

For more information on the meta object, see Message format.

For details of the other objects, see tables Cluster status details and "issues" object details.

{
              "health_status": {
                  "cpu": 1.0,
                  "disk": 2.0,
                  "firmware": {
                      "tainted_files": {
                          "boot": 1,
                          "core": 2,
                          "ha_other": 0
                      },
                      "integrity": {
                          "boot": "OK",
                          "core": "CORRUPTED"
                      }
                  },
                  "indexer": {
                      "indexer_status": [
                          {
                              "capabilities": ["index"],
                              "idle_workers_count": 1,
                              "indexer_jobs": 0,
                              "ip": "127.0.0.1",
                              "screenshot_jobs": 0,
                              "video_jobs": 0,
                              "workers_count": 1
                          },
                          {
                              "capabilities": ["screenshot", "video"],
                              "idle_workers_count": 1,
                              "indexer_jobs": 0,
                              "ip": "127.0.0.1",
                              "screenshot_jobs": 0,
                              "video_jobs": 0,
                              "workers_count": 1
                          },
                          {
                              "capabilities": ["video"],
                              "idle_workers_count": 1,
                              "indexer_jobs": 0,
                              "ip": "127.0.0.1",
                              "screenshot_jobs": 0,
                              "video_jobs": 0,
                              "workers_count": 1
                          }
                      ],
                      "processing_tasks": [],
                      "remaining_tasks": [],
                      "worker_warnings": []
                  },
                  "load1": 3.0,
                  "load15": 4.0,
                  "load5": 5.0,
                  "memory": 7.0,
                  "pipeline_queues": {
                      "session_events": 64.3,
                      "indexer_events": 40.0
                  },
                  "raid": {
                      "disks": {
                          "252:0": {"status": "OK"},
                          "252:1": {"status": "OK"},
                          "252:2": {"status": "OK"},
                          "252:3": {"status": "OK"}
                      },
                      "status": {
                          "detailed_status": "OK",
                          "operation_progress": 0,
                          "status": "OK"
                      }
                  },
                  "sessions": {
                      "http": 1,
                      "ica": 2,
                      "mssql": 3,
                      "rdp": 4,
                      "ssh": 5,
                      "telnet": 6,
                      "vnc": 7
                  },
                  "sessions_total": 28,
                  "swap": 8.0,
                  "system_details": {
                      "cpu": {
                          "guest": 0.0,
                          "guest_nice": 0.0,
                          "idle": 97.0,
                          "iowait": 0.0,
                          "irq": 0.0,
                          "nice": 0.0,
                          "softirq": 0.0,
                          "steal": 0.0,
                          "system": 2.0,
                          "user": 1.0
                      },
                      "disk": {
                          "free": 200000000,
                          "percent": 2.0,
                          "total": 10000000000,
                          "used": 9800000000
                      },
                      "memory": {
                          "active": 5523861504,
                          "available": 3288555520,
                          "buffers": 265920512,
                          "cached": 3269304320,
                          "free": 1188810752,
                          "inactive": 1109909504,
                          "percent": 60.6,
                          "shared": 1117671424,
                          "slab": 325619712,
                          "total": 8344498176,
                          "used": 3620462592
                      },
                      "swap": {
                          "free": 0,
                          "percent": 0.0,
                          "sin": 0,
                          "sout": 0,
                          "total": 0,
                          "used": 0
                      }
                  }
              }
          }

Elements of the response message include:

Elements

Type Description

health_status

null or object

The health status of a node. When queried, it lists data related to the given node's health (in the case of HA, this means the current master node).

health_status.memory

floating point number

Memory usage (percent)

health_status.disk

floating point number Hard disk usage (percent)

health_status.swap

floating point number Swap usage (percent)

health_status.cpu

floating point number Overall CPU usage (percent)

health_status.load1

floating point number

The average system load during the last one minute.

health_status.load5

floating point number

The average system load during the last five-minute period.

health_status.load15

floating point number

The average system load during the last fifteen-minute period.

health_status.sessions

string

The protocol type and the number of ongoing sessions. For example:

"sessions": {
  "ssh": 3,
  "rdp": 4
}

health_status.total_sessions

integer (number of) The total number of ongoing sessions.

health_status.system_details

JSON object Various details about the CPU, disk, memory and swap usage of the appliance. Note that the exact set of metrics is determined by the underlying kernel and system libraries, therefore it might change between different versions of One Identity Safeguard for Privileged Sessions without notice.

health_status.pipeline_queues

JSON object

Represents the fullness of the processing pipelines in percentages.

health_status.indexer

JSON object

 

health_status.indexer.indexer_status

 

Represents the current status of the indexer service.

health_status.indexer.indexer_status

capabilities

enum

Defines what various tasks the worker nodes of that group can handle.

Possible values: index | screenshot | video

health_status.indexer.indexer_status

idle_workers_count

number

The number of worker nodes without a task.

health_status.indexer.indexer_status

indexer_jobs

number

The number of indexer tasks delegated to worker nodes within that worker group.

health_status.indexer.indexer_status

ip

string

The IPv4 address of the indexer worker nodes.

health_status.indexer.indexer_status

screenshot_jobs

number

The number of screenshot tasks delegated to worker nodes within that worker group.

health_status.indexer.indexer_status

video_jobs

number

The number of video tasks delegated to worker nodes within that worker group.

health_status.indexer.indexer_status

workers_count

number

The number of worker nodes with the same capabilities.

health_status.indexer.processing_tasks

array

The list of tasks in progress based on the connection policy.

health_status.indexer.remaining_tasks

array

The list of tasks queued for processing based on the connection policy. For example:

    [{​​​​​​​
     'processing_tasks': {​​​​​​​​​
         'connection': 'ssh_connection',
         'protocol': 'SSH',
         'indexer_jobs': 1,
         'screenshot_jobs': 3,
         'video_jobs': 0
     }​​​​​​​​​
}​​​​​​​]
 

health_status.indexer.worker_warnings

array

The list of error and warning messages related to the worker nodes.

health_status.raid

JSON object

 

health_status.raid.status

JSON object

 

health_status.raid.status

status

string

Possible values:

  • OK [0] - All disks are functioning properly.

  • WARNING [1] - All disks are functioning properly, however, there is a possibility of data loss, if the values increase further above the threshold.

  • DEGRADED [2] - There is no operation in progress due to disk failure. Data is preserved, but it is not at full redundancy.

  • DEGRADED_SYNCING [3] - Resync/rebuild is in progress due to disk failure. Data is preserved, but it is not at full redundancy.

  • CRITICAL [4] - Data loss occurred.

health_status.raid.status

detailed_status

string

A short description of the type of RAID operation that is in progress (for example, rebuild, background initialization, or consistency check).

health_status.raid.status

operation_progress

number

The progress of the RAID operation in percentages. Typically used if the disk is in a REBUILDING state.

The default value is 0.

 

 

health_status.raid.disks

JSON object

 

 

 

health_status.raid.disks

<disk_id>

JSON object

 

 

 

health_status.raid.disks

<disk_id>.status

string

Possible values:

  • SPARE - The Dedicated Hot Spare (DHS) disk that is on standby to take over, if a disk fails.

  • REBUILDING - Either a new disk has been inserted, or the DHS disk had to take over for a failed disk, and is now building.

  • FAULTY - The failed disk that must be replaced with a new one.

The number of CPUs determine the load a system can handle without causing the processes having to wait. As a generic rule of thumb, if the load is less than the number of processor cores of the appliance, the overall system load can be considered normal, otherwise it might be an indication of performance issues.

Related Documents

The document was helpful.

Seleziona valutazione

I easily found the information I needed.

Seleziona valutazione