Chatta subito con l'assistenza
Chat con il supporto

One Identity Safeguard for Privileged Sessions 7.4 - 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 REST API examples

Channel policy

The channel policy lists the channels (for example, terminal session and SCP in SSH, Drawing, Clipboard in RDP) that can be used in a connection. The channel policy can further restrict access to each channel based on the IP address of the client or the server, a user list, user group, or a time policy. For example, all clients may access the servers defined in a connection via SSH terminal, but the channel policy may restrict SCP access only to a single client. The policies set in the channel policy are checked when the user attempts to open a particular channel type in the connection.

Channel policies are protocol specific. To list the available Channel policies for a protocol, use the following command.

curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/<http|ica|rdp|ssh|telnet|vnc>/channel_policies

The following sections detail the properties of Channel policy objects.

URL
GET https:<IP-address-of-SPS>/api/configuration/<http|ica|rdp|ssh|telnet|vnc>/channel_policies/<object-id>
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 properties of a specific RDP Channel policy object.

curl --cookie cookies -https:<IP-address-of-SPS>/api/configuration/<rdp>/channel_policies/<object-id>
Response

The following is a sample response received, showing the properties of Channel policy objects.

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

{
  "body": {
    "name": "terminal-only",
    "rules": [
      {
        "actions": {
          "audit": true,
          "content_policy": null,
          "four_eyes": false,
          "ids": false
        },
        "allowed_for": {
          "clients": [],
          "gateway_groups": [],
          "remote_groups": [],
          "servers": [],
          "time_policy": {
            "key": "-100",
            "meta": {
              "href": "/api/configuration/policies/time_policies/-100"
            }
          }
        },
        "channel": "#drawing"
      },
      {
        "actions": {
          "audit": true,
          "four_eyes": false,
          "ids": false
        },
        "allowed_for": {
          "clients": [],
          "gateway_groups": [],
          "remote_groups": [],
          "servers": [],
          "time_policy": {
            "key": "-100",
            "meta": {
              "href": "/api/configuration/policies/time_policies/-100"
            }
          }
        },
        "channel": "cliprdr"
      }
    ]
  }
}
Element Type Description
name string Top level element, the name of the object. This name is also displayed on the SPS web interface. It cannot contain whitespace.
rules list of JSON objects Top level element, contains the configuration properties of the object.
actions JSON object The actions that SPS performs for the channel, for example, recording the traffic into an audit trail.
allowed_for JSON object Specifies the access control rules of the channel, for example, permitted target IP addresses or usergroups.
channel string

The type of the channel. Note that channels are protocol specific, and different type of channels can have different parameters.

For example:

"channel": "#drawing",
Element Type Description
actions JSON object The list of actions to perform when the Content policy matches the analyzed traffic. All actions are boolean values (true or false)
audit boolean

Set to true to record the activities of the channel into audit trails. Possible values: true or false

content_policy JSON object

Specifies the Content policy to use in the channel, otherwise its value is null (which is the default). For details on Content policies, see Real-time content monitoring with Content Policies For example:

"content_policy": {
"key": "<object-id>",
}
four_eyes boolean

Set to true to require four-eyes authorization to access the channel. For details, see "Configuring four-eyes authorization" in the Administration Guide. Possible values: true or false

Element Type Description
allowed_for JSON object Specifies the access control rules of the channel.
clients list

To restrict the availability of the channel only to certain clients, list the IP address or network of the clients allowed to use this the channel. For IPv6 addresses, use the canonized format of the address. For example:

"clients": [
  "192.168.1.1/24",
  "2001:db8:85a3::8a2e:0:0/32"
                        

Alternatively, you can also enter a hostname instead. One Identity Safeguard for Privileged Sessions (SPS) saves the hostname and resolves it when opening channels, therefore SPS can trace dynamic IP addresses.

NOTE: Note the following limitations:

  • The Domain Name Servers you set must be able to resolve the hostnames you enter into the clients and servers fields, otherwise this function (and, therefore, the sessions using this Channel Policy) will not work.

  • SPS Channel Policies support wildcard characters in the *.example.com format. If the channel opening request contains an IP address, SPS uses a reverse lookup method to resolve this IP address into a hostname for a match.

  • SPS uses the Domain Name Servers set in the /api/configuration/network/dns endpoint to resolve the hostnames.

gateway_groups list

You can control channel access during gateway authentication with blacklists or whitelists of user groups. You can use local user lists on SPS, or LDAP groups.

To use this option, you must also configure web gateway authentication in the connection policy, or client-side gateway authentication back-end in the authentication policy.

For example:

"gateway_groups": ["group1", "group2"],

To configure local user lists, see User lists.

remote_groups list

You can control channel access during authentication to the remote server with blacklists or whitelists of user groups. You can use local user lists on SPS, or LDAP groups.

For example:

"remote_groups": ["group1", "group2"],

To configure local user lists, see User lists.

servers list

To restrict the availability of the channel only to certain servers, list the IP address or network of the servers that your clients are allowed to access using this the channel. For IPv6 addresses, use the canonized format of the address. For example:

"servers": [
  "192.168.1.1/24",
  "2001:db8:85a3::8a2e:0:0/32"
                        

Alternatively, you can also enter a hostname instead. One Identity Safeguard for Privileged Sessions (SPS) saves the hostname and resolves it when opening channels, therefore SPS can trace dynamic IP addresses.

NOTE: Note the following limitations:

  • The Domain Name Servers you set must be able to resolve the hostnames you enter into the clients and servers fields, otherwise this function (and, therefore, the sessions using this Channel Policy) will not work.

  • SPS Channel Policies support wildcard characters in the *.example.com format. If the channel opening request contains an IP address, SPS uses a reverse lookup method to resolve this IP address into a hostname for a match.

  • SPS uses the Domain Name Servers set in the /api/configuration/network/dns endpoint to resolve the hostnames.

Alternatively, you can configure a custom DNS server to be used for target selection custom_dns field of the Connection Policy.

time_policy JSON object

Specifies the Time policy to use in the channel. If you do not want to restrict access, use the default 7x24 policy-100. For details on Time policies, see Time policy. For example:

"time_policy": {
  "key": "-100",
}

Policies

List of endpoints for configuring policies and settings that can be referenced when configuring connections.

URL
GET https://<IP-address-of-SPS>/api/configuration/policies
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 endpoints.

curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/policies
Response

The following is a sample response received when listing the available configuration endpoints.

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

{
  "items": [
    {
      "key": "aa_plugin_instances",
      "meta": {
        "href": "/api/configuration/policies/aa_plugin_instances"
      }
    },
    {
      "key": "analytics",
      "meta": {
        "href": "/api/configuration/policies/analytics"
      }
    },
    {
      "key": "archive_cleanup_policies",
      "meta": {
        "href": "/api/configuration/policies/archive_cleanup_policies"
      }
    },
    {
      "key": "audit_policies",
      "meta": {
        "href": "/api/configuration/policies/audit_policies"
      }
    },
    {
      "key": "backup_policies",
      "meta": {
        "href": "/api/configuration/policies/backup_policies"
      }
    },
    {
      "key": "content_policies",
      "meta": {
        "href": "/api/configuration/policies/content_policies"
      }
    },
    {
      "key": "credentialstores",
      "meta": {
        "href": "/api/configuration/policies/credentialstores"
      }
    },
    {
      "key": "indexing",
      "meta": {
        "href": "/api/configuration/policies/indexing"
      }
    },
    {
      "key": "ldap_servers",
      "meta": {
        "href": "/api/configuration/policies/ldap_servers"
      }
    },
    {
      "key": "signing_cas",
      "meta": {
        "href": "/api/configuration/policies/signing_cas"
      }
    },
    {
      "key": "time_policies",
      "meta": {
        "href": "/api/configuration/policies/time_policies"
      }
    },
    {
      "key": "trusted_ca_lists",
      "meta": {
        "href": "/api/configuration/policies/trusted_ca_lists"
      }
    },
    {
      "key": "user_databases",
      "meta": {
        "href": "/api/configuration/policies/user_databases"
      }
    },
    {
      "key": "userlists",
      "meta": {
        "href": "/api/configuration/policies/userlists"
      }
    },
    {
      "key": "usermapping_policies",
      "meta": {
        "href": "/api/configuration/policies/usermapping_policies"
      }
    }
  ],
  "meta": {
    "first": "/api/configuration/aaa",
    "href": "/api/configuration/policies",
    "last": "/api/configuration/x509",
    "next": "/api/configuration/private_keys",
    "parent": "/api/configuration",
    "previous": "/api/configuration/plugins",
    "transaction": "/api/transaction"
  }
}
Endpoint Description
aa_plugin_instances Authentication and Authorization plugin policies
analytics Analytics.
archive_cleanup_policies Archive/Cleanup policies.
audit_policies Audit trail encryption, timestamping, and signing.
backup_policies Backup policies.
content_policies Actions for detected commands, screen content, credit card information, and window titles.
credentialstores Local and external credential stores.
indexing Languages for Optical Character Recognition (OCR).
ldap_servers LDAP servers.
signing_cas

Signing CAs for generating the server-side certificates on the fly. You can use such CAs in SSL-encrypted RDP sessions, RDP sessions that use Network Level Authentication (CredSSP), or SSH connections that use X.509-based authentication.

To configure signing for audit trails, use the audit_policies endpoint.

time_policies Time policies.
trusted_ca_lists Trusted Certificate Authorities (CAs), and options for restricting the accepted certificates.
user_databases Local User Databases are available for RDP, SSH and Telnet protocols, and can be used to authenticate the clients to credentials (passwords, public keys, and certificates) that are locally available on SPS.
userlists Local white- or blacklists of usernames that allow fine-control over who can access a connection or a channel.
usermapping_policies Usermapping policies describe who can use a specific username to access the remote server.
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
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.

Archive/Cleanup policy

Archiving transfers data from SPS to an external storage solution, cleanup removes (deletes) old files. Archived data can be accessed and searched, but cannot be restored (moved back) to the SPS appliance. Only those closed audit-trail files are archived where the retention time has already elapsed. To list the available Archive policies, use the following command.

curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/policies/archive_cleanup_policies/

The following sections detail the properties of Archive/Cleanup policy objects.

URL
GET https:<IP-address-of-SPS>/api/configuration/policies/archive_cleanup_policies/<object-id>
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 properties of a specific Archive/Cleanup policy object.

curl --cookie cookies -https:<IP-address-of-SPS>/api/configuration/policies/archive_cleanu_policies/<object-id>
Response

The following is a sample response received, showing the properties of Archive/Cleanup policy objects.

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

{
  "key": "99375192754364c2b1bd01",
  "body": {
    "name": "archive_all_with_filelist",
    "include_node_id_in_path": false,
    "notification_event": {
      "type": "all",
      "send_filelist": true,
      "file_count_limit": 123456
    },
    "target": {
      "type": "nfs",
      "server": {
        "selection": "ip",
        "value": "1.2.3.5"
      },
      "path": "/data/backup"
    },
    "start_times": [
      "10:10"
    ],
    "template": "PROTOCOL/CONNECTION/ARCHIVEDATE/",
    "retention_days": 30
  }
}
Element Type Description
name string Top level element, the name of the object. This name is also displayed on the SPS web interface. It cannot contain whitespace.
include_node_id_in_path boolean Include the Cluster Node ID in the path. Recommended to set to True if the SPS instance is a node in a cluster. This ensures that the ID of the node is included in the path of the relevant directory, which is required to prevent cluster nodes from archiving data to the same location, and so overwriting each other's data and resulting in data loss.
notification_event Top level element
type string (all | errors-only | none)
  • all: Sends notification emails on all archive-related events.
  • errors-only: Sends notification emails only on archive-related errors.
  • none: Sends no archive-related notification emails.
send_filelist boolean

This is meaningful only if notification_event is set to all.

True if the list of files are included in the notification e-mail.

file_count_limit integer

This is meaningful only if notification_event is set to all and send_filelist is set to True.

The maximum number of files that are included in the notification e-mail.

target Top level element Defines the address of the archive server, which protocol to use to access it, and other parameters. SPS can be configured to use the SMB/CIFS, and NFS protocols to access the archive server.
type string (smb | nfs | none)
  • smb: Move data to a remote server using SMB/CIFS
  • nfs: Move data to a remote server using NFS
  • none: Cleanup data. Data is deleted from SPS forever and cannot be recovered.
server Top level element
domain string

Only if type is set to smb.

The domain name of the target server

protocol_version string

Only if type is set to smb.

The SMB protocol to use when SPS connects to the server. Servers are usually backwards compatible with earlier protocol versions (for example, a server that supports version 2.1 supports versions 2.0 and 1.0 as well).

share string

Only if type is set to smb.

The name and directory path of the share in the following format:

share_name/path/to/directory
authentication Top level element

Only if type is set to smb.

path string The path to the archive directory on the target server
start_times list of strings The time when the archive process starts in H:MM or HH:MM format.
template string

SPS organizes the audit trails into directories based on the date or the protocol. The subdirectories are created directly into the archive directory. The following subdirectory structures are possible:

  • PROTOCOL/CONNECTION/ARCHIVEDATE/

  • ARCHIVEDATE/CONNECTION/PROTOCOL/

  • CONNECTIONDATE/PROTOCOL/CONNECTION/

  • ARCHIVEDATE/

  • CONNECTIONDATE/

retention_days integer (days) Data older than this value is archived to the external server. The archived data is deleted from SPS.
Elements of server Type Description
server Top level element
selection string (ip | fqdn)
  • ip: IP address
  • fqdn: Hostname
value string The IP address or the hostname of the remote server
Elements of authentication Type Description
authentication Top level element

Only if type is set to smb.

selection string (password | anonymous)
  • password: To log on using a username and password.
  • anonymous: To log on anonymously.
username string

Only if selection is set to password.

The username used to log on to the remote server

password string

Only if selection is set to password.

The password corresponding to the username

Running audit data cleanup policies immediately

You can run all audit data cleanup policies immediately. This procedure deletes all data matching the queries and older than the retention period.

Prerequisites
  • You have configured audit data cleanup policies.

URL
POST https://<IP-address-of-SPS>/api/cleanup/cleanup_now
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 deletes all data matching the queries and older than the retention period.

curl -X POST http://<IP-address-of-SPS>/api/cleanup/cleanup_now
Response

The following is a sample response received after a successful cleanup.

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

"{
 
    "meta": {
 
        "href": "/api/cleanup/cleanup_now",
 
        "parent": "/api/cleanup",
 
        "remaining_seconds": XXXX
 
    }
 
}"
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
200 Deleted The audit data was successfully deleted.
401 Unauthenticated Accessing the given resource requires authentication.
403 Unauthorized The client is not authorized to access the given resource.
405 MethodNotAllowed The method (GET/PUT) is not allowed for this node.
Related Documents

The document was helpful.

Seleziona valutazione

I easily found the information I needed.

Seleziona valutazione