Tchater maintenant avec le support
Tchattez avec un ingénieur du support

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

Local services: Web login for users

The SPS users can perform authentication-related activities (gateway authentication, 4-eyes authorization). On this endpoint you can configure on which interfaces can the users access SPS, and optionally restrict the access to these interfaces.

URL
GET https://<IP-address-of-SPS>/api/configuration/local_services/user_web
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/user_web
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.0/16"
            ],
            "enabled": true
        },
        "listen": [
            {
                "address": {
                    "key": "nic1.interfaces.ff7574025754b3df1647001.addresses.1",
                    "meta": {
                        "href": "/api/configuration/network/nics/nic1#interfaces/ff7574025754b3df1647001/addresses/1"
                    }
                },
                "http_port": 80,
                "https_port": 443
            }
        ]
    },
    "key": "user_web",
    "meta": {
        "first": "/api/configuration/local_services/user_web",
        "href": "/api/configuration/local_services/user_web",
        "last": "/api/configuration/local_services/user_web",
        "next": "/api/configuration/local_services/indexer",
        "parent": "/api/configuration/local_services",
        "previous": null,
        "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 SPS web interface.

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.

bruteforce_protection boolean Enables protection against brute-force attacks by denying access after failed login attempts for increasingly longer period. Enabled by default.
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"
    }
    },
http_port integer The port number where SPS accepts HTTP connections. Note that SPS automatically redirects connections from this port to the HTTPS port set in https_port.
https_port integer The port number where SPS accepts HTTPS connections.
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.

Local services: cluster interface

To enable cluster management, enable the cluster interface on all nodes that you want to be part of your One Identity Safeguard for Privileged Sessions (SPS) cluster. Complete the following steps on each node of the cluster.

NOTE: All nodes in a cluster must run the same version of SPS.

URL
GET https://<IP-address-of-SPS>/api/configuration/local_services/cluster
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/cluster
Response

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

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

{
    "body": {
        "enabled": true,
        "listen_address": {
            "key": "nic1.interfaces.ff7574025754b3df1647001.addresses.2553887595ce3ca7f1eae4",
            "meta": {
                "href": "/api/configuration/network/nics/nic1#interfaces/ff7574025754b3df1647001/addresses/2553887595ce3ca7f1eae4"
            }
        }
    },
    "key": "cluster",
    "meta": {
        "first": "/api/configuration/local_services/admin_web",
        "href": "/api/configuration/local_services/cluster",
        "last": "/api/configuration/local_services/user_web",
        "next": "/api/configuration/local_services/indexer",
        "parent": "/api/configuration/local_services",
        "previous": "/api/configuration/local_services/analytics",
        "remaining_seconds": 600,
        "transaction": "/api/transaction"
    }
}
Element Type Description
enabled boolean

By default, this option is set to false. Set it to true to enable the cluster interface.

listen_address Top level element (string) Contains the key of the network interface that is used as the cluster interface.
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.

System backup policy

System backup uses a backup policy to create a snapshot of the configuration of One Identity Safeguard for Privileged Sessions (SPS) to a remote backup server. For details on how backup policies work, see "Data and configuration backups" in the Administration Guide. For details on configuring a backup policy using the REST API, see Backup policy. To encypt the backup, see Encrypting system backup policy.

URL
GET https://<IP-address-of-SPS>/api/configuration/management/system_backup
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 system backup settings of SPS.

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

The following is a sample response received when listing the endpoints for date and time settings.

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

{
  "body": {
      "backup_policy": "<key-to-a-backup-policy>"
    },
  "key": "system_backup",
  "meta": {
    "first": "/api/configuration/management/certificates",
    "href": "/api/configuration/management/system_backup",
    "last": "/api/configuration/management/webinterface",
    "next": "/api/configuration/management/universal_siem_forwarder",
    "parent": "/api/configuration/management",
    "previous": "/api/configuration/management/syslog",
    "remaining_seconds": 600,
    "transaction": "/api/transaction"
  }
}
Element Description
backup_policy

Contains the ID of the backup policy to use for system backups. For details on configuring a backup policy using the REST API, see Backup policy.

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.

Encrypting system backup policy

System backup uses a backup policy to create a snapshot of the configuration of One Identity Safeguard for Privileged Sessions (SPS) to a remote backup server. For details on how backup policies work, see "Data and configuration backups" in the Administration Guide. For details on configuring a backup policy using the REST API, see Backup policy. This section describes how to create encrypted system backups.

URL
GET https://<IP-address-of-SPS>/api/management/exported_configuration_encryption
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 system backup settings of SPS.

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

The following is a sample response received when listing the endpoints for date and time settings.

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

{
    "body": {
        "encryption": {
            "enabled": true,
            "gpg_public_key": {
                "fingerprint": "2F2E3967EDAD2F288E54EE8693B99C4F545B7670",
                "public_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nmQGNBF3rnZ0BDADHdz5/kCkrl7T8w861AGGXdGK/lwxunTCx6tfhSsFREWmKjhfr\nYTLNxsodALXtAphHeNAeUWwXjYDJelAlMVcDrVtLp7Ht8tqnmNt2NWUSmfFIF3ga\nD1OsH2UjT5Xt6XAjKvFfWeHSxkS0QHIcLfUT5WDoUcTEsR8jEdj80A7Z6.......
            CT1WwbMg5VoXQ3Rpp8evcUTzy3+ra/GosCSaFSrE31pyXkULB9+EAU7W\n23YDiM21csIaqX+XDGMex5Hq4PMhO7cqSMyB\n=j20J\n-----END PGP PUBLIC KEY BLOCK-----\n",
                "uids": [
                    "Demo User <example@oneidentity.com>"
                ]
            }
        }
    },
    "key": "exported_configuration_encryption",
    "meta": {
        "first": "/api/configuration/management/certificates",
        "href": "/api/configuration/management/exported_configuration_encryption",
        "last": "/api/configuration/management/webinterface",
        "next": "/api/configuration/management/health_monitoring",
        "parent": "/api/configuration/management",
        "previous": "/api/configuration/management/email",
        "remaining_seconds": 600,
        "transaction": "/api/transaction"
    }
}
Elements of encryption Type Description
encryption Top level element Defines encryption settings for system backups.
enabled boolean

When set to True, enables encryption of the system backups. Enabling encryption requires setting the gpg_public_key option.

gpg_public_key JSON object

Contains the fingerprint, public_key, and the list of uids of the GPG public key used to encrypt system backups. For example:

"gpg_public_key": {
    "fingerprint": "2F2E3967EDAD2F288E54EE8693B99C4F545B7670",
    "public_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nmQGNBF3rnZ0BDADHdz5/kCkrl7T8w861AGGXdGK/lwxunTCx6tfhSsFREWmKjhfr\nYTLNxsodALXtAphHeNAeUWwXjYDJelAlMVcDrVtLp7Ht8tqnmNt2NWUSmfFIF3ga\nD1OsH2UjT5Xt6XAjKvFfWeHSxkS0QHIcLfUT5WDoUcTEsR8jEdj80A7Z6hKyF29g\...
    R40Niv4Ge6aYneDpk3yTBco6bBYDR7NKA7OREXCfqcyCeYB121UQ\nbb5aTZAaW8D8IRmybxpRxRAaHZX0apBgDLKwWf48kLOnOC9O7hgcyY1spZgTGz7i\nTryxlBl/CT1WwbMg5VoXQ3Rpp8evcUTzy3+ra/GosCSaFSrE31pyXkULB9+EAU7W\n23YDiM21csIaqX+XDGMex5Hq4PMhO7cqSMyB\n=j20J\n-----END PGP PUBLIC KEY BLOCK-----\n",
    "uids": [
        "Demo User <example@oneidentity.com>"
    ]
}
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.
Documents connexes

The document was helpful.

Sélectionner une évaluation

I easily found the information I needed.

Sélectionner une évaluation