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

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

Plugins

Contains the endpoints for configuring plugins.

URL
GET https://<IP-address-of-SPS>/api/configuration/plugins
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 endpoints for configuring plugins.

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

The following is a sample response received when listing endpoints for configuring plugins.

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

{
    "items": [
        {
            "key": "aa",
            "meta": {
                "href": "/api/configuration/plugins/aa"
            }
        },
        {
            "key": "configuration_sync",
            "meta": {
                "href": "/api/configuration/plugins/configuration_sync"
            }
        },
        {
            "key": "credentialstore",
            "meta": {
                "href": "/api/configuration/plugins/credentialstore"
            }
        },
        {
            "key": "signingca",
            "meta": {
                "href": "/api/configuration/plugins/signingca"
            }
        }
    ],
    "meta": {
        "first": "/api/configuration/aaa",
        "href": "/api/configuration/plugins",
        "last": "/api/configuration/x509",
        "next": "/api/configuration/policies",
        "parent": "/api/configuration",
        "previous": "/api/configuration/passwords",
        "remaining_seconds": 600,
        "transaction": "/api/transaction"
    }
}
Element Description
aa Endpoint for configuring authentication and authorization plugins.
configuration_sync Endpoint for configuring plugins that synchronize the configuration of SPS clusters that receive their configuration from the Central Management node.
credentialstore Endpoint for configuring credential store plugins.
signingca Endpoint for configuring plugins to sign certificates.
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 plugin

To upload or update a plugin, complete the following steps. To update a plugin, upload a new version. Starting with version 6.4, you can also delete plugins using the REST API. For details, see Delete a plugin.

  1. Open a transaction

    For more information, see Open a transaction.

  2. POST the plugin as a zip file (application/zip) to the https://<IP-address-of-SPS>/api/upload/plugins endpoint, for example:

    curl -X POST -H "Content-Type: application/zip" --cookie cookies.txt https://<IP-address-of-SPS>/api/upload/plugins --data-binary @<path-to-plugin.zip>

    If the POST request is successful, the response includes the key of the new plugin, as well as information about the uploaded plugin. For example:

    {
        "meta": {
            "href": "/api/configuration/plugins/aa/aa423b72-0d0f-4275-be30-494e9a99ffad",
            "parent": "/api/configuration/plugins/aa"
        },
        "key": "aa423b72-0d0f-4275-be30-494e9a99ffad",
        "body": {
            "name": "Sample-Authentication-Plugin",
            "description": "My custom authentication plugin",
            "version": "1.12",
            "path": "/opt/scb/var/plugins/aa/Sample-Authentication-Plugin",
            "api": "1.0"
        }
    }
  3. Commit your changes

    For more information, see Commit a transaction.

Note the following points.

  • Re-uploading an already existing plugin overwrites the existing plugin.

  • Uploading a newer version of an already existing plugin overwrites the existing plugin.

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 plugin has been successfully uploaded. The response should include the key of the created object.
400 The plugin does not support this version of SPS.
400 InvalidPlugin The type or some other value in the Manifest file of the plugin is invalid, or this version of SPS does not support this type of plugin. Check the error key in the response for details.
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.
422 TransactionProcessingError The plugin was uploaded but deploying the plugin failed for some reason.

Delete a plugin

Starting with version 6.4, you can also delete plugins using the REST API.

  1. Open a transaction

    For more information, see Open a transaction.

  2. DELETE the https://<IP-address-of-SPS>/api/configuration/plugins/aa/<ID-of-the-plugin-to-delete> endpoint. For details, see Delete an object. If the DELETE request is successful, the response includes only the meta object, for example:

    {
        "meta": {
            "href": "/api/configuration/plugins/aa/b080b1ba546232548bb1a9",
            "parent": "/api/configuration/plugins/aa"
        }
    }
  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
200 The plugin has been successfully deleted
400 SemanticError The plugin cannot be deleted, because there is reference to it in the configuration (For example, AA plugin delete fails because there is an AA Plugin Configuration for it).
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.
404 There is no plugin with the given key.

Check the integrity of a plugin

The authentication and authorization (AA) plugins used on SPS. To upload or update a plugin, see Upload a plugin.

URL
GET https://<IP-address-of-SPS>/api/plugin/integrity?key=<key-value-from-the-response-of-the-last-creation>&plugin_type=<type-of-the-plugin>&ops=zip_checksum&ops=zip_content&ops=unregistered
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 retrieves the results of the integrity check.

curl --cookie cookies.txt https://<IP-address-of-SPS>/api/plugin/integrity?key=<key-value-from-the-response-of-the-last-creation>&plugin_type=aa&ops=zip_checksum&ops=zip_content&ops=unregistered
  • To retrieve the <key-value-from-the-response-of-the-last-creation> of the plugin that you have uploaded earlier, enter the following command:

    curl https://<IP-address-of-SPS>/api/configuration/plugins/<plugin_type>

    This will display all plugins that you have uploaded earlier, that belong to the specified plugin type. The value will be the value of the key parameter of the response.

  • The following plugin_type values are available:

    • Authentication and authorization: aa

    • Configuration synchronization: configuration_sync

    • Credential Store: credentialstore

    • Signing CA: signingca

Response

The following is a sample response received when querying the results of the integrity check.

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

{ 
  "body": {
    "zip_checksum": {
      "verdict": "passed",
      "reason": "Plugin .zip checksums match"
    },
    "zip_content": {
      "verdict": "passed",
      "reason": "The plugin runtime files are the same since you have uploaded the plugin .zip"
	},
    "unregistered":	{
      "verdict": "unavailable",
      "reason": "Cannot find checker. Make sure that you use an existing checker: unregistered"
    }
  }
}
Element Type Description
body Top level element (string) Contains the results of the response.
zip_checksum string The checksum of the uploaded .zip file.
verdict string The verdict of the integrity check.
reason string The reason of the integrity check verdict.
zip_content string The content of the .zip file.
verdict string The verdict of the integrity check.
reason string The reason of the integrity check verdict.
unregistered string Whether SPS was joined to Starling for online checksum.
verdict string The verdict of the integrity check.
reason string The reason of the integrity check verdict.
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 MissingMandatoryParameter One of the following keys is missing: key, plugin_type, ops.
400 InvalidFormat The key is not valid plugin key.
404 MissingPlugin The plugin is not found in the configuration.
相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级