立即与支持人员聊天
与支持团队交流

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

VNC connection policies

Connection policies determine if a server can be accessed from a particular client. Connection policies reference other resources (policies, usergroups, keys) that must be configured and available before creating a connection policy.

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

Examples

For request and response examples, see VNC Connections Policies .

Element Type Description
key string Top level element, contains the ID of the connection policy.
body Top level element (string) The elements of the connection policy.
access_control Top level list

Collection of access policies. Access policies define who can authorize and audit a connection.

active boolean Set to false to suspend the connection policy. Connection settings are preserved.
client_side_transport_security Top level item

Defines the Transport Layer Security (TLS) settings for the connection between SPS and the client. For example:

"client_side_transport_security": {
    "selection": "disabled"
},
indexing Top level item Configures indexing for the connection policy.
enabled boolean Set to true to enable indexing the connections.
policy string

References the identifier of the indexing policy. You can configure indexing policies at the /api/configuration/policies/indexing/ endpoint.

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

priority int

Specifies the indexing priority for the connection. Possible values are:

  • 5

    Very low priority.

  • 4

    Low priority.

  • 3

    Normal (default) priority.

  • 2

    High priority.

  • 1

    Very high priority.

  • 0

    Near real-time priority.

log_audit_trail_downloads boolean

Set to true to log audit trail downloads.

name string The name of the connection policy.
network
clients list, string List of client ("from") IP addresses.
ports list, integers List of target ports.
targets list, string List of target IP addresses.
override_log_level Top level item

Specifies the verbosity level of sessions handled by this connection policy. The log level of other connection policies is not affected. If disabled, the log level set at the /api/configuration/<protocol>/options endpoint is used.

  • To use the default log level, disable this option:

    "override_log_level": {
        "enabled": false
    },
  • To use a custom log level for the connection policy, enable this option and set the log level to use:

    "override_log_level": {
        "enabled": true,
        "log_level": 5
    },
policies Top level item List of policies referenced by the connection policy.
analytics_policy string

References the identifier of the analytics policy. You can configure analytics policies at the /api/configuration/analytics/ endpoint.

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

archive_cleanup_policy string

References the identifier of the archive/cleanup policy. You can configure archive and cleanup policies at the /api/configuration/policies/archive_cleanup_policies/ endpoint.

To modify or add an archive/cleanup policy, use the value of the returned key as the value of the archive_cleanup_policy element, and remove any child elements (including the key).

audit_policy string

Cannot be null.

References the identifier of the audit policy. You can configure audit policies at the /api/configuration/policies/audit_policies/ endpoint.

To modify or add an audit policy, use the value of the returned key as the value of the audit_policy element, and remove any child elements (including the key).

backup_policy string

References the identifier of the backup policy. You can configure backup policies at the /api/configuration/policies/backup_policies/ endpoint.

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

channel_policy string

References the identifier of the channel policy. The value of this option cannot be null.

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).

You can configure VNC channel policies at the /api/configuration/vnc/channel_policies/ endpoint.

settings string

References the identifier of the settings policy. The value of this option cannot be null.

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

rate_limit Top level element Connection rate limit.
enabled boolean Set to true to provide a connection rate limit.
value int The number of connections (per minute) that are allowed in the connection policy.
server_address Top level item Defines the address where the clients connect to.

 

 

custom_dns

string

Configures a DNS server that is used to reverse-resolve the hostname if the Channel Policy contains the address of the target as a hostname instead of an IP address. By default, this is disabled and SPS uses the DNS server set in the /api/configuration/network/dns endpoint.

  • To use the default DNS, disable this option:

    "server_address": {
        "custom_dns": {
            "enabled": false
        },
        ...
    },
  • To use a custom DNS, enable this option and set the IP address of the domain name server to use:

    "server_address": {
        "custom_dns": {
            "enabled": true,
            "server": "192.168.1.1"
        },
        ...
    },

 

 

selection

string

Configures the address where the clients connect to. Possible values are

  • original

    Connect to the same address specified by the client.

  • nat

    Perform a network address translation on the target address.

    Must be used with the network element.

  • fix

    Must be used with the address and port elements.

  • inband

    Extract the address of the server from the username.

    Must be used with the domains element.

    Optional elements: exception_domains, dns_server, and dns_suffixes.

:

server_side_transport_security Top level item

Defines the Transport Layer Security (TLS) settings for the connection between SPS and the server. For example:

"server_side_transport_security": {
    "selection": "disabled"
},
source_address Top level element Allows you to configure Source Network Address Translation (SNAT) on the server side of SPS. SNAT determines the IP address SPS uses in the server-side connection. The target server will see the connection coming from this address.
selection string

Configures Source Network Address Translation. Possible values are:

  • box_address

    Default. Uses the network address of the logical interface of SPS.

  • original

    Uses the IP address of the client, as seen by SPS.

  • fix

    Uses a fixed address when connecting to the remote server.

    Must be used with the address element.

address string

Must be used if the value of the selection element is set to fix.

The IP address to use as the source address in server-side connections.

web_gateway_authentication Top level item When gateway authentication is required for a connection, the user must authenticate on SPS as well. This additional authentication can be performed out-of-band on the SPS web interface for every protocol.
enabled boolean Set to true to enable additional gateway authentication on the SPS web interface.
groups list, string

By default, any user can perform gateway authentication for the connections. You can restrict authentication to members of specific usergroups. Define the usergroups at the /api/configuration/aaa/local_database/groups/ endpoint, and list the name of each group here.

require_same_ip boolean Set to true to only accept web gateway authentication from the same host that initiated the connection.
Elements of client_side_transport_security
Elements of client_side_transport_security Type Description
peer_certificate_check Top level item

Sets how SPS authenticates the peers. To permit connections from peers without requesting a certificate, set "enabled": false, for example:

"peer_certificate_check": {
    "enabled": false
}

To validate the certificate of the peer, set "enabled": true, and reference a trusted certificate authority list, for example:

"peer_certificate_check": {
    "enabled": true,
    "trusted_ca": "cfc815e5-dadb-4eb9-a628-12ae0c12d358"
}
selection string

Sets the encryption settings used between SPS and the client. When the connection is encrypted, SPS has to show a certificate to the client, so you must configure the sps_certificate option as well. The possible values of selection are:

  • tls

    Require encryption.

sps_certificate JSON object

Sets the certificate that SPS shows to the peer when the communication is encrypted. SPS can either use the same certificate for every session, or generate a separate certificate fpr each session.

  • To use the same certificate for every session, set selection: "fix" and reference the certificate to use in the x509_identity option, for example:

    "sps_certificate": {
        "selection": "fix",
        "x509_identity": "<'key' of an uploaded certificate>"
    },

    For details on uploading certificates to SPS, see Certificates stored on SPS.

  • To generate a certificate for every session, set selection: "generate" and reference the certificate authority to sign the generated certificates in the signing_ca option, for example:

    "sps_certificate": {
        "selection": "generate",
        "signing_ca": "2221b768-0722-4298-9e16-ce67eb3723ad"
    },

    For details on using signing certificates, see Signing CA policies.

Elements of server_side_transport_security
Elements of server_side_transport_security Type Description
peer_certificate_check Top level item

Sets how SPS authenticates the peers. To permit connections from peers without requesting a certificate, set "enabled": false, for example:

"peer_certificate_check": {
    "enabled": false
}

To validate the certificate of the peer, set "enabled": true, and reference a trusted certificate authority list, for example:

"peer_certificate_check": {
    "enabled": true,
    "trusted_ca": "cfc815e5-dadb-4eb9-a628-12ae0c12d358"
}
selection string

Sets the encryption settings used between SPS and the server. If SPS has to show a certificate to the peer, so you must configure the sps_certificate option as well. The possible values of selection are:

  • none

    Do not use encryption.

  • tls

    Require encryption.

sps_certificate JSON object

Sets the certificate that SPS shows to the peer when the communication is encrypted. SPS can either use the same certificate for every session, or generate a separate certificate for each session.

  • If the server does not require a certificate from SPS, set selection: "none".

  • To use the same certificate for every session, set selection: "fix" and reference the certificate to use in the x509_identity option, for example:

    "sps_certificate": {
        "selection": "fix",
        "x509_identity": "<'key' of an uploaded certificate>"
    },

    For details on uploading certificates to SPS, see Certificates stored on SPS.

  • To generate a certificate for every session, set selection: "generate" and reference the certificate authority to sign the generated certificates in the signing_ca option, for example:

    "sps_certificate": {
        "selection": "generate",
        "signing_ca": "2221b768-0722-4298-9e16-ce67eb3723ad"
    },

    For details on using signing certificates, see Signing CA policies.

VNC settings policies

VNC settings policies define protocol-level settings. You can create multiple policies, and choose the appropriate one for each VNC connection.

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

curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/vnc/settings_policies

The following command retrieves the properties of a specific policy.

curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/vnc/settings_policies/<policy-id>
Response

The following is a sample response received when listing VNC settings policies.

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

{
    "items": [
        {
            "body": {
                "client_tls_security_settings": {
                    "cipher_strength": {
                        "selection": "recommended"
                    },
                    "minimum_tls_version": "TLSv1_2"
                },
                "inactivity_timeout": {
                    "enabled": false
                },
                "name": "default",
                "preconnect_channel_check": false,
                "server_tls_security_settings": {
                    "cipher_strength": {
                        "selection": "recommended"
                    },
                    "minimum_tls_version": "TLSv1_2"
                },
                "timeout": 600
            },
            "key": "-30211",
            "meta": {
                "href": "/api/configuration/vnc/settings_policies/-30211"
            }
        }
    ],
    "meta": {
        "first": "/api/configuration/vnc/channel_policies",
        "href": "/api/configuration/vnc/settings_policies",
        "last": "/api/configuration/vnc/settings_policies",
        "next": null,
        "parent": "/api/configuration/vnc",
        "previous": "/api/configuration/vnc/options",
        "remaining_seconds": 600,
        "transaction": "/api/transaction"
    }
}

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

{
    "body": {
        "client_tls_security_settings": {
            "cipher_strength": {
                "selection": "recommended"
            },
            "minimum_tls_version": "TLSv1_2"
        },
        "inactivity_timeout": {
            "enabled": false
        },
        "name": "default",
        "preconnect_channel_check": false,
        "server_tls_security_settings": {
            "cipher_strength": {
                "selection": "recommended"
            },
            "minimum_tls_version": "TLSv1_2"
        },
        "timeout": 600
    },
    "key": "-30211",
    "meta": {
        "first": "/api/configuration/vnc/settings_policies/-30211",
        "href": "/api/configuration/vnc/settings_policies/-30211",
        "last": "/api/configuration/vnc/settings_policies/-30211",
        "next": null,
        "parent": "/api/configuration/vnc/settings_policies",
        "previous": null,
        "remaining_seconds": 600,
        "transaction": "/api/transaction"
    }
}
Element Type Description
key   string Top level element, contains the ID of the policy.
body   Top level element (string) The elements of the VNC settings policy.
  client_tls_security_settings JSON object Configures TLS security settings on the client side.
  name string Name of the VNC settings policy. Cannot contain whitespace.
preconnect_channel_check boolean

Before establishing the server-side connection, SPS can evaluate the connection and channel policies to determine if the connection might be permitted at all. The server-side connection is established only if the evaluated policies permit the client to access the server.

To enable this function, set the parameter to true.

server_tls_security_settings JSON object Configures TLS security settings on the server side.
timeout int

Idle timeout, in seconds.

NOTE: The SPS web UI displays the same value in seconds.

inactivity_timeout Top level element
enabled boolean
  • true: If no user activity is detected, it terminates the session after the configured time has passed since the last user activity.
  • false: No user inactivity timeout.
value int

Only if enabled is true

The value of user activity timeout. Must be greater than or equal to the value of timeout

Elements of client_tls_security_settings and server_tls_security_settings Type Description
cipher_strength JSON object Specifies the cipher string OpenSSL will use.
custom_cipher string

The list of ciphers you want to permit SPS to use in the connection. For more details on customizing this list, check the 'openssl-ciphers' manual page on your SPS appliance.

selection string

Specifies the cipher string OpenSSL will use. The following settings options are possible:

  • recommended: Specifies to use only ciphers with adequate security level.

  • custom: Allows you to specify the list of ciphers you want to permit SPS to use in the connection.

    TIP: One Identity recommends using this setting only to ensure compatibility with older systems. For more details on customizing this list, check the openssl-ciphers manual page on your SPS appliance.

    For example: ALL:!aNULL:@STRENGTH

minimum_tls_version string

Specifies the minimal TLS version SPS will offer during negotiation. The following settings options are possible:

  • TLSv1_2: this setting only offers TLS version 1.2 during the negotiation. This is the recommended setting.

  • TLSv1_1: this setting offers TLS version 1.1 and later versions during the negotiation.

  • TLSv1_0: this setting offers TLS version 1.0 and later versions during the negotiation.

Add VNC settings policies

To add a settings policy, you have to:

  1. Open a transaction

    For more information, see Open a transaction.

  2. Create the JSON object for the new policy

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

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

    {
      "key": "3848c708-2e1d-4463-b232-0c8c5875ff55",
      "meta": {
        "href": "/api/configuration/vnc/settings_policies/3848c708-2e1d-4463-b232-0c8c5875ff55",
        "parent": "/api/configuration/vnc/settings_policies",
        "transaction": "/api/transaction"
      }
    }
  3. Commit your changes

    For more information, see Commit a transaction.

Modify VNC settings policies

To modify a settings policy, you have to:

  1. Open a transaction

    For more information, see Open a transaction.

  2. Modify the JSON object of the policy

    PUT the modified JSON object to the https://<IP-address-of-SPS>/api/configuration/vnc/settings_policies/<key-of-the-object> 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.

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.
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.

Global VNC options

List of options that affect all VNC connections.

URL
GET https://<IP-address-of-SPS>/api/configuration/vnc/options
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 global VNC options.

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

The following is a sample response received when listing global VNC options.

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

{
  "body": {
      "channel_database_cleanup": {
        "enabled": false
      },
    "service": {
      "enabled": false
     }
   }
  }
  "key": "options",
  "meta": {
    "first": "/api/configuration/vnc/channel_policies",
    "href": "/api/configuration/vnc/options",
    "last": "/api/configuration/vnc/options",
    "next": null,
    "parent": "/api/configuration/vnc",
    "previous": "/api/configuration/vnc/channel_policies",
    "transaction": "/api/transaction"
  }
}
Element Type Description
key   Top level item Contains the ID of the endpoint.
body   Top level item Contains the elements of the global VNC options.
  channel_database_cleanup Top level item Contains settings for database cleanup.
  service Top level item Global setting to enable VNC connections, and specify the logging detail.
Elements of channel_database_cleanup Type Description
days integer

Applies only if enabled is set to true.

Global retention time for the metadata of VNC connections, in days. Must exceed the retention time of the archiving policy (or policies) used for VNC connections, and the connection-specific database cleanup times (if configured).

enabled

boolean To enable the global cleanup of VNC connection metadata, set this element to true.
Elements of service Type Description
log_level integer

Applies only if enabled is set to true.

Defines the logging detail of VNC connections.

enabled

boolean Set to true to enable VNC connections.
Examples

Querying the full list of global VNC options:

{
  "body": {
    "channel_database_cleanup": {
      "enabled": true,
      "days": 365
     },      
    "service": {
      "enabled": true,
      "log_level": 4
    }
  }
  "key": "options",
  "meta": {
    "first": "/api/configuration/vnc/channel_policies",
    "href": "/api/configuration/vnc/options",
    "last": "/api/configuration/vnc/options",
    "next": null,
    "parent": "/api/configuration/vnc",
    "previous": "/api/configuration/vnc/channel_policies",
    "transaction": "/api/transaction"
  }
}
Modify global VNC settings

To modify global VNC settings, you have to:

  1. Open a transaction

    For more information, see Open a transaction.

  2. Modify the JSON object of the global VNC settings endpoint.

    PUT the modified JSON object to the https://<IP-address-of-SPS>/api/configuration/vnc/options endpoint.

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

    For more information about the elements of the channel_database_cleanup item, see Elements of channel_database_cleanup.

    For more information about the elements of the service item, see Elements of service.

  3. Commit your changes

    For more information, see Commit a transaction.

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.
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 the SPS REST API attempted to access, but could not retrieve.

403 Unauthorized The requested resource cannot be retrieved because the client is not authorized to access it. The details section contains the path that the SPS REST API attempted to access, but could not retrieve.
404 NotFound The requested object does not exist.

Search, retrieve, download, and index sessions

Topics:
相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级