Chatee ahora con Soporte
Chat con el soporte

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

Configuring the SAML2 Service Provider settings

Configure the Security Assertion Markup Language 2.0 (SAML2) Service Provider settings to control federated user access to SPS.

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

HTTP operations

HTTP operations with the /aaa/saml2 endpoint include:

HTTP method

URL

Description

Notes

GET

/api/configuration/aaa/saml2

Listing the SAML2 Service Provider settings.

 

PUT

/api/configuration/aaa/saml2

Configuring the SAML2 Service Provider settings.

 
Sample request

Listing the SAML2 Service Provider settings.

curl -X GET -b "${COOKIE_PATH}" https://<IP-address-of-SPS>/api/configuration/aaa/saml2
Sample response

The following is a sample response received if the request was successful.

{
                "key": "saml2",
                "body": {
                    "acs_addresses": [
                        "hostname",
                        "hostname.example.com",
                        "192.168.1.101"
                    ],
                    "entity_id": "https://hostname.example.com/sts/saml2/170953689162bf25866552c",
                    "x509_identity": {
                        "key": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
                        "meta": {
                            "href": "/api/configuration/x509/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
                        }
                    }
                }
            }
 

Elements of the response message body include:

Element

Type

Description

Notes

key

string

The identifier of the SAML2 login method.

body.acs_addresses

array

A list of Assertion Consumer Service (ACS) addresses.

 

body.entity_id

string

The entity ID of the SPS as Service Provider.

 

body.x509_identity

object

X.509 identity of the Service Provider to sign the authentication requests.

 

body.x509_identity.key

string

The identifier of the X.509 identity under /api/configuration/x509.

 

body.x509_identity.meta.href

string (relative path)

Link to the X.509 identity (only the path part of the URL).

 

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

Sample request

Configuring the SAML2 Service Provider settings.

curl -X PUT -b "${COOKIE_PATH}" https://<IP-address-of-SPS>/api/configuration/aaa/saml2

To configure the SAML2 Service Provider settings

  1. Download the SP metadata XML from /sts/saml2/sp-metadata.xml. This XML file contains the SP's entity ID. You are not required to authenticate to download this XML file.

  2. Open a transaction

    For more information, see Open a transaction.

  3. Create a X.509 identity at the /api/configuration/x509 endpoint.

    {
                    "certificate": <-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE----->,
                    "private_key": <-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY----->,
                    "issuer_chain": []
                }
  4. Return to the /api/configuration/aaa/saml2 endpoint and add the newly created X.509 identity to the SAML2 entity ID and the listed ACS addresses to complete the configuration.

    {
                    "entity_id": "https://minimal.balabit/sts/saml2/other-random-string",
                    "x509_identity": "<XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX>",
                    "acs_addresses": ["minimal.balabit", "192.168.1.101"]
                }
     
  5. Commit your changes

    For more information, see Commit a transaction.

HTTP response codes

For more information and a complete list of standard HTTP response codes, see Application level error codes.

Managing SPS

Topics:

Troubleshooting options

Configures debug logging and the retention time of core dump files.

  • Debug logging increases the log level of the non-network-related events, adding the commands executed by the SPS web interface to the log.

  • SPS automatically generates core dump files if an important software component of the system crashes. These core dump files can be of great help to the One Identity Support Team to identify problems. To download the generated core dump files, navigate to Basic Settings > Troubleshooting > Core files on the web interface of SPS.

URL
GET https://<IP-address-of-SPS>/api/configuration/troubleshooting
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 queries the troubleshooting settings.

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

The following is a sample response received.

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

{
  "body": {
    "core_files": {
      "retention_days": 14
    },
    "debug_logging": {
      "enabled": true
    }
  },
  "key": "troubleshooting",
  "meta": {
    "first": "/api/configuration/aaa",
    "href": "/api/configuration/troubleshooting",
    "last": "/api/configuration/x509",
    "next": "/api/configuration/vnc",
    "parent": "/api/configuration",
    "previous": "/api/configuration/telnet",
    "transaction": "/api/transaction"
  }
}
Element Type Description
key string Top level element, contains the ID of the endpoint.
body Top level element (string) Contains the troubleshooting settings.
core_files Top level item Contains the settings for core dump file retention.
retention_days int Retention time for core files, in days.
debug_logging Top level item Settings for debug logging.
enabled boolean Set to true to increase the log level of the non-network-related events, adding the commands executed by the SPS web interface to the log.
Modify troubleshooting settings

To modify troubleshooting settings, you have to:

  1. Open a transaction

    For more information, see Open a transaction.

  2. Modify the JSON object of the troubleshooting options.

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

Internal certificates

This endpoint references the certificates of SPS's internal Certificate Authority, Timestamping Authority, and the SSL certificate of the web and REST interface.

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

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

The following is a sample response received when listing the internal certificates of SPS.

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

{
  "body": {
    "ca": {
      "selection": "identity",
      "x509_identity": {
        "key": "fbd684e1-e1ac-4f34-ad25-86c560c51e24",
        "meta": {
          "href": "/api/configuration/x509/fbd684e1-e1ac-4f34-ad25-86c560c51e24"
        }
      }
    },
    "server": {
      "key": "fd1c73e8-bcb8-4d13-991f-722f492dc074",
      "meta": {
        "href": "/api/configuration/x509/fd1c73e8-bcb8-4d13-991f-722f492dc074"
      }
    },
    "tsa": {
      "key": "20e72ede-78ef-460a-b843-68a35d994142",
      "meta": {
        "href": "/api/configuration/x509/20e72ede-78ef-460a-b843-68a35d994142"
      }
    }
  },
  "key": "certificates",
  "meta": {
    "first": "/api/configuration/management/certificates",
    "href": "/api/configuration/management/certificates",
    "last": "/api/configuration/management/webinterface",
    "next": "/api/configuration/management/disk_fillup_prevention",
    "parent": "/api/configuration/management",
    "previous": null,
    "transaction": "/api/transaction"
  }
}
Element Type Description
key string The ID of the endpoint.
body Top level element (string) Contains the internal certificates of SPS.
ca Top level item Contains the certificate of SPS's internal Certificate Authority.
selection string Must be set to identity.
x509_identity string

References the certificate of SPS's internal Certificate Authority. You can configure certificates at the /api/configuration/x509/ endpoint.

To modify or add an X.509 certificate, use the value of the returned key as the value of the x509_identity element, and remove any child elements (including the key). For details, see Certificates stored on SPS.

server string

References the SSL certificate of SPS's web interface. You can configure certificates at the /api/configuration/x509/ endpoint.

To modify or add an X.509 certificate, use the value of the returned key as the value of the x509_identity element, and remove any child elements (including the key). For details, see Certificates stored on SPS.

tsa string

References the certificate of SPS's internal Timestamping Authority. You can configure certificates at the /api/configuration/x509/ endpoint.

To modify or add an X.509 certificate, use the value of the returned key as the value of the x509_identity element, and remove any child elements (including the key). For details, see Certificates stored on SPS.

Modify a certificate

To modify a certificate, you have to:

  1. Open a transaction

    For more information, see Open a transaction.

  2. Create a CA

    Have the value of the key element of a valid X.509 CA certificate stored on SPS.

  3. Modify the JSON object of the endpoint.

    Use the X.509 certificate's key as the value of the ca element. You can find a detailed description of the available parameters listed in Element . PUT the modified JSON object to the https://<IP-address-of-SPS>/api/configuration/management/certificates endpoint.

  4. 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.
Documentos relacionados

The document was helpful.

Seleccionar calificación

I easily found the information I needed.

Seleccionar calificación