Converse agora com nosso suporte
Chat com o suporte

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

Local services: enabling SSH access to the SPS host

Exclusively for troubleshooting purposes, you can access the SPS host using SSH. Completing the Welcome Wizard automatically disables SSH access to SPS. Re-enabling it allows you to connect remotely to the SPS host and login using the root user. The password of the root user is the one you provided in the Welcome Wizard.

Caution:

Accessing the One Identity Safeguard for Privileged Sessions (SPS) host directly using SSH is not recommended or supported, except for troubleshooting purposes. In such case, the One Identity Support Team will give you exact instructions on what to do to solve the problem.

For security reasons, disable SSH access to SPS when it is not needed. For details, see "Enabling SSH access to the One Identity Safeguard for Privileged Sessions (SPS) host" in the Administration Guide.

The following encryption algorithms are configured on the local SSH service of SPS:

  • Key exchange (KEX) algorithms:

    diffie-hellman-group-exchange-sha256
  • Ciphers:

    aes256-ctr,aes128-ctr
  • Message authentication codes:

    hmac-sha2-512,hmac-sha2-256
URL
GET https://<IP-address-of-SPS>/api/configuration/local_services/ssh
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 configuration options.

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

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

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

{
    "body": {
        "access_restriction": {
            "allowed_from": [
                "10.40.0.48/24"
            ],
            "enabled": true
        },
        "allow_password_auth": true,
        "bruteforce_protection": true,
        "enabled": true,
        "listen": [
            {
                "address": {
                    "key": "nic1.interfaces.ff7574025754b3df1647001.addresses.1",
                    "meta": {
                        "href": "/api/configuration/network/nics/nic1#interfaces/ff7574025754b3df1647001/addresses/1"
                    }
                },
                "port": 23
            }
        ],
        "public_keys": [
            {
                "comment": "key-comment anothercomment",
                "selection": "rsa",
                "value": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDTnisLCjZ3vONMXqFBIdvpZ0BY73+GdHpgoaL8YsydxJBsYg9dYTDzVVtYFVvdCVzBdcwCjyOuPwtZoYU3pLEFQ7OVoDUDPmVnl6idS/6tB2m89I5zdc02xUeCWTBpTGoOhNtc+YDmxPGZ1FQIpXCw0MT91jviWm3JydDd5YKINwvdTh8zsRT/702ZD9uZslwkQA/b2B9/hidCAkQkvs5H1B3o4laTd0JE9k90N+qbaQjVvoInr+jdXaWvrScwFVxZhb7Q1LvUL6oxW889bOWFMSa+/mnENarw6rpwfk9Ayi5uQQ2imY/tSnfgbS2RvIa1sKwUsJasDqN2lo/DuhON"
            }
        ]
    },
    "key": "ssh",
    "meta": {
        "first": "/api/configuration/local_services/admin_web",
        "href": "/api/configuration/local_services/ssh",
        "last": "/api/configuration/local_services/user_web",
        "next": "/api/configuration/local_services/user_web",
        "parent": "/api/configuration/local_services",
        "previous": "/api/configuration/local_services/snmp_agent",
        "transaction": "/api/transaction"
    }
Element Type Description
key string Top level element, contains the ID of the endpoint.
body Top level element (string) Contains the configuration options of the SSH server.

access_restriction

JSON object

Enables and configures limitations on the clients that can access the web interface, based on the IP address of the clients.

allowed_from

list

The list of IP networks from where the administrators are permitted to access this management interface. To specify the IP addresses or networks, use the IPv4-Address/prefix format, for example, 10.40.0.0/16.

enabled

boolean

Set it to true to restrict access to the specified client addresses.

allow_password_auth boolean Enables password-based authentication, so administrators can remotely login to SPS. If this option is set to False, SPS ignores every other option of this endpoint.
bruteforce_protection boolean Enables protection against brute-force attacks by denying access after failed login attempts for increasingly longer period. Enabled by default.
enabled boolean Enables the SSH server, so administrators can remotely login to SPS. If this option is set to False, SPS ignores every other option of this endpoint.
listen list Selects the network interface, IP address, and port where the clients can access the web interface.
address JSON object

A reference to a configured network interface and IP address where this local service accepts connections. For example, if querying the interface /api/configuration/network/nics/nic1#interfaces/ff7574025754b3df1647001/addresses/ returns the following response:

{
    "body": {
        "interfaces": {
            "@order": [
                "ff7574025754b3df1647001"
            ],
            "ff7574025754b3df1647001": {
                "addresses": {
                    "1": "10.40.255.171/24",
                    "@order": [
                        "1"
                    ]
                },
                "name": "default",
                "vlantag": 0
            }
        },
        "name": "eth0",
        "speed": "auto"
    },
    "key": "nic1",
    "meta": {
        "first": "/api/configuration/network/nics/nic1",
        "href": "/api/configuration/network/nics/nic1",
        "last": "/api/configuration/network/nics/nic3",
        "next": "/api/configuration/network/nics/nic2",
        "parent": "/api/configuration/network/nics",
        "previous": null,
        "transaction": "/api/transaction"
    }
    }

Then the listening address of the local service is the following.

nic1.interfaces.ff7574025754b3df1647001.addresses.1

This is the format you have to use when configuring the address of the local service using REST:

"address": "nic1.interfaces.ff7574025754b3df1647001.addresses.1"

When querying a local services endpoint, the response will contain a reference to the IP address of the interface in the following format:

"address": {
    "key": "nic1.interfaces.ff7574025754b3df1647001.addresses.1",
    "meta": {
        "href": "/api/configuration/network/nics/nic1#interfaces/ff7574025754b3df1647001/addresses/1"
    }
    },
port integer

The port number where this local service accepts connections.

public_keys list

Lists the public keys that can be used to authenticate on SPS. For example:

"public_keys": [
        {
            "comment": "user@example.com anothercomment",
            "key": {
                "selection": "rsa",
                "value": "AADDB3NzaC1yc2EABBADAQA......./DuhON"
            }
        },
        {
            "comment": "username@example.com",
            "key": {
                "selection": "rsa",
                "value": "ASFDFAB3NzaC1yc2EAAAABIwAAASdfASF/EuQh9zc2umxX...dU="
            }
        }
    ]

TIP: One Identity recommends using 2048-bit RSA keys (or stronger).

Elements of public_keys Type Description
comment string

Comments of the public key.

key JSON object

Contains the type of the key and the key itself. For example:

"key": {
    "selection": "rsa",
    "value": "ASFDFAB3NzaC1yc2EAAAABIwAAASdfASF/EuQh9zc2umxX...dU="
}
selection rsa

The type of the public key. Must be rsa.

value string

The public key itself.

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.

Manage the SPS license

You can display information about the currently used SPS license from the https://<IP-address-of-SPS>/api/configuration/management/license endpoint.

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

curl --cookie cookies -H "Content-Type: application/json" https://10.30.255.28/api/configuration/management/license
Response

The following is a sample response received.

For details of the meta object, see Message format.

{
    "body": {
        "product": "Safeguard for Privileged Sessions",
        "product_version": "7",
        "serial": "123-456-789"
        "license_type": "term",
        "valid_not_after": "2022-12-14",
        "enterprise": true
        "limit_type": "session",
        "licensed_options": {
          "basic_proxies": 0,
          "sudo_iolog": 0,
          "analytics": true,
        }
    },
    "key": "license",
    "meta": {
        "first": "/api/configuration/management/certificates",
        "href": "/api/configuration/management/license",
        "last": "/api/configuration/management/webinterface",
        "next": "/api/configuration/management/root_password",
        "parent": "/api/configuration/management",
        "previous": "/api/configuration/management/health_monitoring",
        "remaining_seconds": 600,
        "transaction": "/api/transaction",
        "upload": "/api/upload/license"
    }
}
Element Type Description
key     string Top level element, contains the ID of the endpoint.
body     Top level element (string) Contains the parameters of the license.

 

enterprise

 

boolean

Set to true to enable evaluating the limit values of basic_proxies and sudo_iologs of licensed_options. When set to true, all limit values other 0 than are considered unlimited.

 

license_type

 

string

Contains information about the type of your license. This information is mostly relevant for your company's Sales Team.

 

licensed_options

 

JSON object

Contains the limit values of basic_proxies and sudo_iologs, and enabling or disabling analytics.

  limit_type   host | session
  • host: Limits the number of servers (individual IP addresses) that can be connected through SPS.

  • session: Limits the number of concurrent sessions (parallel connections) that can pass through SPS at a time (for example, 25).

  product   string The official name of the product the license is applied for.

 

product_version

 

string

The product version number currently in use with the license.

 

serial

 

string

The unique serial number of the license.

 

valid_not_after

 

date

The date when the license expires. The dates are displayed in YYYY-MM-DD format.

NOTE: The valid_not_after key can have a null value. In this case, your license does not expire.

Elements of licensed_options

Type

Description

analytics boolean Set to true to enable analytics on this licensed version of SPS.
basic_proxies integer The value of the limit for sessions or hosts when using basic proxies with this licensed version of SPS.
sudo_iolog integer The value of the limit for using Sudo I/O logs with this licensed version of SPS.
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.
Upload a new license

To upload a new license file, complete the following steps.

  1. Download your license file from support portal.

  2. Open a transaction.

    For more information, see Open a transaction.

  3. Upload the license file.

    Upload the file to the https://<IP-address-of-SPS>/api/upload/license endpoint. For example:

    curl --cookie cookies -F 'data=@/path/license.div' https://<IP-address-of-SPS>/api/upload/license
  4. Commit your uploaded license file.

    Commit your uploaded license file to the https://<IP-address-of-SPS>/api/upload/license endpoint. For example:

    curl --cookie cookies https://<IP-address-of-SPS>/api/transaction --request PUT --data '{"message": "your commit message"}'
  5. Commit your changes.

    For more information, see Commit a transaction.

Change contact information

The About page on the SPS web interface and the /api/info endpoint contains various contact information. You can change this to a custom email address or URL.

URL
GET https://<IP-address-of-SPS>/api/configuration/management/support_info
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 contact information.

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

The following is a sample response received when querying the endpoint.

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

{
    "body": {
        "uri": null
    },
    "key": "support_info",
    "meta": {
        "first": "/api/configuration/management/certificates",
        "href": "/api/configuration/management/support_info",
        "last": "/api/configuration/management/webinterface",
        "next": "/api/configuration/management/syslog",
        "parent": "/api/configuration/management",
        "previous": "/api/configuration/management/splunk_forwarder",
        "remaining_seconds": 600,
        "transaction": "/api/transaction"
    }
Change the support link

To change the support link, complete the following steps.

  1. Open a transaction

    For more information, see Open a transaction.

  2. PUT a JSON object containing the new support link.

    PUT a JSON object containing the new support link to the https://<IP-address-of-SPS>/api/configuration/management/support_info endpoint. For example:

    curl -X PUT -d '{"uri": { "selection": "mailto", "value": "mailto:support@example.com" } }' -H "Content-Type: application/json" --cookie cookies "https://<IP-address-of-SPS>/api/configuration/management/support_info"

    To use an HTTP or HTTPS link as contact info, use the following JSON object:

    {
      "uri": {
        "selection": "url",
        "value": "http://example.com"
       }
    }

    To use a email address as contact info, use the following JSON object:

    {
      "uri": {
        "selection": "mailto",
        "value": "mailto:support@example.com"
       }
    }
  3. Commit your changes

    For more information, see Commit a transaction.

Splunk integration

SPS can forward session data to Splunk near real-time. Using the One Identity Safeguard for Privileged Sessions App for Splunk you can integrate this data with your other sources, and access all your data related to privileged user activities from a single interface. To configure SPS to forward session data to Splunk, complete the following steps.

Prerequisites and restrictions:
  • SPS version 5 F5 or later

  • Splunk version 6.5 or later

  • SPS does not send historical data to Splunk, only data from the sessions started after you complete this procedure.

URL
GET https://<IP-address-of-SPS>/api/configuration/management/splunk_forwarder
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 endpoints for SNMP configuration settings.

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

The following is a sample response received when querying the endpoint.

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

{
"body": {
    "enabled": true,
    "flush_interval": 600,
    "host":
        { "selection": "fqdn", "value": "splunk.example.com" },
    "pam_address":
        { "selection": "fqdn", "value": "scb.example.com" },
    "port": 8088,
    "ssl":
        { "selection": "insecure" },
    "token": "2134356431"
    }
}
Elements of remote_desktop_gateway Type Description
body JSON object Top-level element
enabled boolean

Set to true and configure the other options as needed for your environment to forward session data from SPS to Splunk.

flush_interval integer [seconds] If the Splunk server becomes unaccessible, SPS will try to resend the data when this period expires.
host JSON object

Contains the hostname or the IPv4 address of the Splunk server.

"host":
    { "selection": "fqdn", "value": "splunk.example.com" },
"host":
    { "selection": "ip", "value": "192.168.1.1" },
selection fqdn | ip

Defines the address type (IP or domain name). Possible values are:

  • fqdn: The server address is provided as a fully qualified domain name.

  • ip: The server address is provided as an IPv4 address.

value string

The address of the server.

port integer

The port number where your Splunk HTTP Event Collector is accepting connections. By default, Splunk uses port 8088.

ssl JSON object

Determines if encryption is used between SPS and Splunk.

selection string

Determines if encryption is used between SPS and Splunk. Possible values:

  • disabled: Use this option if your Splunk HTTP Event Collector accepts only unencrypted HTTP connections.

    Since the data forwarded to Splunk contains sensitive information, One Identity recommends to use HTTPS encryption between SPS and Splunk.

    "ssl": { "selection": "disabled" },
  • insecure: Use HTTPS encryption between SPS and Splunk.

    "ssl": { "selection": "insecure" },
  • secure: Use HTTPS encryption between SPS and Splunk and also verify the identity of the Splunk server. If you use this option, you must include the certificate of the Splunk server, or the certificate of the CA that issued the certificate of the Splunk server in the certificate option.

    "ssl":
        { "certificate": "-----BEGIN CERTIFICATE-----\nMIIFPzCCAyegA\n....\nr8lDCPoq\n0wgJ\n-----END CERTIFICATE-----\n",
        "selection": "secure"
        },
token string

The HTTP Event Collector authentication token you have generated for SPS.

Configure Splunk forwarder
  1. Install the One Identity Safeguard for Privileged Sessions App for Splunk to your Splunk installation. This will automatically enable and configure the HTTP Event Collector (HEC) in your Splunk installation, and create an HTTP Event Collector authentication token ("HEC token") that SPS will use.

    To help identify the source of the received data, the following settings are configured automatically in the One Identity Safeguard for Privileged Sessions App for Splunk:

    • index: The One Identity Safeguard for Privileged Sessions App for Splunk creates the index automatically, with the name balabit_events.

    • sourcetype: The source type of the events the SPS fowards is balabit:event.

  2. On your Splunk interface, navigate to Settings > Data inputs > HTTP Event Collector. Copy the Token Value from the Balabit_HEC field. This is the HTTP Event Collector authentication token and you will need it when configuring SPS.

  3. Create the JSON object that configures SPS to forward session data to Splunk.

    POST the JSON object to the https://<IP-address-of-SPS>/api/configuration/management/splunk_forwarder endpoint. You can find a detailed description of the available parameters listed in Elements of remote_desktop_gateway. For example,

    {
        "enabled": true,
        "flush_interval": 600,
        "host":
            { "selection": "fqdn", "value": "splunk.example.com" },
        "pam_address":
            { "selection": "fqdn", "value": "psm.example.com" },
        "port": 8088,
        "ssl":
            { "selection": "insecure" },
        "token": "2134356431"
    }
  4. Commit your changes

    For more information, see Commit a transaction.

  5. Splunk will display the data received from SPS as it was received from the host set in the pam_address field. By default, this is the hostname and domain name of the SPS appliance as set on the /api/configuration/network/naming endpoint. Adjust this field as needed for your environment.

  6. Start a session that SPS will audit to test your configuration, and verify that the data of the session appears in Splunk.

Documentos relacionados

The document was helpful.

Selecione a classificação

I easily found the information I needed.

Selecione a classificação