Chat now with support
Chat mit Support

One Identity Safeguard for Privileged Sessions 7.5 - 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

Privileges of usergroups

This endpoint lists the usergroups configured on SPS, and the privileges (ACLs) of each group.

Note that currently you cannot edit the privileges (ACLs) of the groups using the REST API. If you change the privileges of a usergroup on the SPS web interface, the changes will apply to the users when they authenticate again on SPS, the privileges of active sessions are not affected.

URL
GET https://<IP-address-of-SPS>/api/configuration/aaa/acls
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 local users.

curl --cookie cookies.txt https://<IP-address-of-SPS>/api/configuration/aaa/acls
Response

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

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

{
    "body": [
        {
            "group": "basic-view",
            "objects": [
                "/special/basic"
            ],
            "permission": "read"
        },
        {
            "group": "basic-write",
            "objects": [
                "/special/basic"
            ],
            "permission": "write"
        },
        {
            "group": "auth-view",
            "objects": [
                "/special/auth"
            ],
            "permission": "read"
        },
        {
            "group": "auth-write",
            "objects": [
                "/special/auth"
            ],
            "permission": "write"
        },
        {
            "group": "search",
            "objects": [
                "/special/searchmenu"
            ],
            "permission": "read"
        },
        {
            "group": "changelog",
            "objects": [
                "/special/changelog"
            ],
            "permission": "read"
        },
        {
            "group": "policies-view",
            "objects": [
                "/special/pol"
            ],
            "permission": "read"
        },
        {
            "group": "policies-write",
            "objects": [
                "/special/pol"
            ],
            "permission": "write"
        },
        {
            "group": "ssh-view",
            "objects": [
                "/special/ssh"
            ],
            "permission": "read"
        },
        {
            "group": "ssh-write",
            "objects": [
                "/special/ssh"
            ],
            "permission": "write"
        },
        {
            "group": "rdp-view",
            "objects": [
                "/special/rdp"
            ],
            "permission": "read"
        },
        {
            "group": "rdp-write",
            "objects": [
                "/special/rdp"
            ],
            "permission": "write"
        },
        {
            "group": "telnet-view",
            "objects": [
                "/special/telnet"
            ],
            "permission": "read"
        },
        {
            "group": "telnet-write",
            "objects": [
                "/special/telnet"
            ],
            "permission": "write"
        },
        {
            "group": "vnc-view",
            "objects": [
                "/special/vnc"
            ],
            "permission": "read"
        },
        {
            "group": "vnc-write",
            "objects": [
                "/special/vnc"
            ],
            "permission": "write"
        },
        {
            "group": "indexing",
            "objects": [
                "/special/search/search",
                "/special/bap"
            ],
            "permission": "write"
        },
        {
            "group": "ica-view",
            "objects": [
                "/special/ica"
            ],
            "permission": "read"
        },
        {
            "group": "ica-write",
            "objects": [
                "/special/ica"
            ],
            "permission": "write"
        },
        {
            "group": "http-view",
            "objects": [
                "/special/http"
            ],
            "permission": "read"
        },
        {
            "group": "http-write",
            "objects": [
                "/special/http"
            ],
            "permission": "write"
        },
        {
            "group": "indexer-view",
            "objects": [
                "/special/indexer"
            ],
            "permission": "read"
        },
        {
            "group": "indexer-write",
            "objects": [
                "/special/indexer"
            ],
            "permission": "write"
        },
    ],
    "key": "acls",
    "meta": {
        "first": "/api/configuration/aaa/acls",
        "href": "/api/configuration/aaa/acls",
        "last": "/api/configuration/aaa/settings",
        "next": "/api/configuration/aaa/local_database",
        "parent": "/api/configuration/aaa",
        "previous": null,
        "transaction": "/api/transaction"
    }
}
Element Type Description
body Top level element (JSON object) Contains the properties of the user.
group string The name of the usergroup.
objects list The list of privileges that the group has access to.
permission read | write The type of the permission. The group needs write access to configure an object, or to perform certain actions.
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.

Audit data access rules

This endpoint enables you to restrict the search and access privileges of usergroups to audit data.

URL
GET https://<IP-address-of-SPS>/api/acl/audit_data
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 audit data access rules.

curl --cookie cookies.txt https://<IP-address-of-SPS>/api/acl/audit_data
Response

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

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

{
    "items": [
        {
            "key": "autogenerated-10211162955b9621d4eb244",
            "meta": {
                "href": "/api/acl/audit_data/autogenerated-10211162955b9621d4eb244"
            }
        }
    ],
    "meta": {
        "href": "/api/acl/audit_data",
        "parent": "/api/acl",
        "remaining_seconds": 600,
        "transaction": "/api/transaction"
    }
}
Element Type Description
items Top-level element (list of JSON objects) List of endpoints (objects) available from the current endpoint.
key string The ID of the endpoint.
meta Top-level item (JSON object) Contains the path to the endpoint.
href string (relative path) The path of the resource that returned the response.
Query a specific audit data access rule

To find out the contents of a particular audit data access rule, complete the following steps:

NOTE: If you have an SPS user who has Search > Search in all connections privileges in Users & Access Control > Appliance Access, the autogenerated-all-data-access-id rule is automatically generated. Therefore, you can almost always query this audit data access rule.

  1. Query the https://<IP-address-of-SPS>/api/acl/audit_data/<key-of-rule-to-be-queried> endpoint.
    curl --cookie cookies.txt https://<IP-address-of-SPS>/api/acl/audit_data/<key-of-rule-to-be-queried>

    The following is a sample response received.

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

    {
        "body": {
    	"name": "my_ssh_rule",
    	"query": "psm.connection_policy:my_ssh_connection_policy",
    	"groups": [
    	    "ssh-view",
    	    "ssh-write"		
    	]								
        },
        "key": "autogenerated-10211162955b9621d4eb244",
        "meta": {
            "href": "/api/acl/audit_data/autogenerated-10211162955b9621d4eb244",
            "parent": "/api/acl/audit_data",
            "remaining_seconds": 600,
            "transaction": "/api/transaction"
        }
    }
    Elements Type Description
    body Top-level element (JSON object) Contains the JSON object of the rule.

     

    name

    string

    The human-readable name of the audit data access rule that you specified when you created the rule.

     

    query

    string

    The query that members of the usergroup(s) are allowed to perform.

    groups list The usergroup(s) whose access to audit data you want to restrict.
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

SemanticError

The configuration contains semantic errors, inconsistencies or other problems that would put the system into an unreliable state if the configuration had been applied. The details section contains the errors that were found in the configuration.

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.

Active sessions

The api/active-sessions endpoint has only one parameter and it only serves the DELETE request that closes the specified session.

URL
DELETE https://<IP-address-of-SPS>/api/active-sessions?id=<session_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 Access Control Lists (ACLs):

curl --cookie cookies.txt https://<IP-address-of-SPS>/api/configuration/aaa/acls

The user (in this example, user1) has to be a member of a group that has read and write/perform privileges for Active Sessions (/special/active_sessions). After authentication, user1 can close the active session determined by the session ID.

curl -k --user user1 --cookie-jar /tmp/cookie https://192.168.122.194/api/authentication
curl -k --cookie /tmp/cookie https://192.168.122.194/api/active-sessions?id=svc/rpokH8fD9kx6CaxNLznKx2/test:12 -X DELETE
Closing active sessions in a cluster environment

In a cluster environment, after authentication, user1 can close active sessions recorded on Search Minion nodes through the Search Master node's IP address.

curl -k --cookie /tmp/cookie https://<IP-address-of-Search-Master-SPS>/api/active-sessions?id=<session_id> -X DELETE

Active sessions recorded on the Search Local node can be closed only from the node itself.

curl -k --cookie /tmp/cookie https://<IP-address-of-Search-Local-SPS>/api/active-sessions?id=<session_id> -X DELETE

Active sessions recorded on the Search Minion node can be closed from the node itself, as well.

curl -k --cookie /tmp/cookie https://<IP-address-of-Search-Minion-SPS>/api/active-sessions?id=<session_id> -X DELETE

NOTE: The following scenarios are not supported:

  • Closing an active session recorded on Search Local node from the Search Master node.

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
400 SessionIdMissing No session ID is given in the "id" query parameter.
404 SessionCouldNotBeFound No session could be found for the given session ID. Select an ongoing session at the Active Connections page on the Web UI and give its session ID as "id" query parameter.
500 SessionTerminationFailed The session could not be terminated due to internal errors.
500 RemoteNodeInfoMissing The cluster node where the session is being recorded is missing from your primary node's configuration. For assistance, contact our Support Team.
503 SessionTerminationServiceUnavailable Session termination service is unavailable on the specific host for closing sessions. To make sure session termination service is running, login to the host CLI and issue the 'systemctl restart sessionterminationservice.service' command.
504 MinionUnavailable The minion node that is recording the session is unavailable. To get more information about the missing node, navigate to /api/cluster/status.

Manage users and usergroups locally on SPS

Contains the endpoints for managing users and usergroups locally on SPS.

URL
GET https://<IP-address-of-SPS>/api/configuration/aaa/local_database
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 of the local database.

curl --cookie cookies.txt https://<IP-address-of-SPS>/api/configuration/aaa/local_database
Response

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

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

{
    "items": [
        {
            "key": "groups",
            "meta": {
                "href": "/api/configuration/aaa/local_database/groups"
            }
        },
        {
            "key": "users",
            "meta": {
                "href": "/api/configuration/aaa/local_database/users"
            }
        }
    ],
    "meta": {
        "first": "/api/configuration/aaa/acls",
        "href": "/api/configuration/aaa/local_database",
        "last": "/api/configuration/aaa/settings",
        "next": "/api/configuration/aaa/settings",
        "parent": "/api/configuration/aaa",
        "previous": "/api/configuration/aaa/acls",
        "transaction": "/api/transaction"
    }
}
Element Description
groups Endpoint that contains local usergroups.
users Endpoint that contains local usernames.
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.
Verwandte Dokumente

The document was helpful.

Bewertung auswählen

I easily found the information I needed.

Bewertung auswählen