For SSH, RDP, Telnet, and Citrix ICA connections, usermapping policies can be defined. A usermapping policy describes who can use a specific username to access the remote server: only members of the specified local or LDAP usergroups (for example, administrators) can use the specified username (for example, root) on the server.
GET https://<IP-address-of-SPS>/api/configuration/policies/usermapping_policies
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 details on authentication, see Authenticate to the SPS REST API. Note that 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). |
The following command lists the existing usermapping policies.
curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/policies/usermapping_policies
The following command retrieves the properties of a specific usermapping policy.
curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/policies/usermapping_policies<object-id>
The following is a sample response received when listing usermapping policies.
For details of the meta object, see Message format.
{ "meta": { "first": "/api/configuration/policies/audit_policies", "href": "/api/configuration/policies/usermapping_policies", "last": "/api/configuration/policies/usermapping_policies", "next": null, "parent": "/api/configuration/policies", "previous": "/api/configuration/policies/userlists", "transaction": "/api/transaction" }, "items": [ { "key": "11581153055704544883f77", "meta": { "href": "/api/configuration/policies/usermapping_policies/11581153055704544883f77" } }, { "key": "9328731525704545f5e3de", "meta": { "href": "/api/configuration/policies/usermapping_policies/9328731525704545f5e3de" } } ] }
When retrieving the endpoint of a specific host key, the response is the following.
{ "body": { "allow_other_remote_users_without_mapping": false, "mappings": [ { "allowed_groups": [], "remote_user": "test" }, { "allowed_groups": [ "admins" ], "remote_user": "root" } ], "name": "Test" }, "key": "9328731525704545f5e3de", "meta": { "first": "/api/configuration/policies/usermapping_policies/277736452570454272e157", "href": "/api/configuration/policies/usermapping_policies/9328731525704545f5e3de", "last": "/api/configuration/policies/usermapping_policies/9328731525704545f5e3de", "next": null, "parent": "/api/configuration/policies/usermapping_policies", "previous": "/api/configuration/policies/usermapping_policies/11581153055704544883f77", "transaction": "/api/transaction" } }
Anyone can log in to the remote server as the test user:
"mappings": [ { "allowed_groups": [], "remote_user": "test" }
Only the members of the admin group can log in to the remote server as the root user:
"mappings": [ { "allowed_groups": [ "admins" ], "remote_user": "root" }
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 | InvalidQuery | The requested filter or its value is invalid. |
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. |
401 | AuthenticationFailure | Authenticating the user with the given credentials has failed. |
404 | NotFound | The requested object does not exist. |
To add a usermapping policy, you have to:
For details, see Open a transaction.
POST the JSON object to the https://<IP-address-of-SPS>/api/configuration/policies/usermapping endpoint. You can find a detailed description of the available parameters listed in Element .
If the POST request is successful, the response includes the key of the new usermapping policy. For example:
{ "key": "2e8692fa-7fda-4753-8363-37e8244f6b80", "meta": { "href": "/api/configuration/policies/usermapping_policies/2e8692fa-7fda-4753-8363-37e8244f6b80", "parent": "/api/configuration/policies/usermapping_policies", "transaction": "/api/transaction" } }
For details, see Commit a transaction.
To modify a usermapping policy, you have to:
For details, see Open a transaction.
PUT the modified JSON object to the https://<IP-address-of-SPS>/api/configuration/policies/usermapping/<key-of-the-object> endpoint. You can find a detailed description of the available parameters listed in Element .
For details, see Commit a transaction.
Contains the endpoints for configuring plugins.
GET https://<IP-address-of-SPS>/api/configuration/plugins
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 details on authentication, see Authenticate to the SPS REST API. Note that 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). |
The following command lists endpoints for configuring plugins.
curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/plugins
The following is a sample response received when listing endpoints for configuring plugins.
For details of the meta object, see Message format.
{ "items": [ { "key": "aa", "meta": { "href": "/api/configuration/plugins/aa" } }, { "key": "credentialstore", "meta": { "href": "/api/configuration/plugins/credentialstore" } } ], "meta": { "first": "/api/configuration/aaa", "href": "/api/configuration/plugins", "last": "/api/configuration/x509", "next": "/api/configuration/policies", "parent": "/api/configuration", "previous": "/api/configuration/passwords", "transaction": "/api/transaction" } }
Element | Description |
---|---|
aa | Endpoint for configuring authentication and authorization plugins. |
credentialstore | Endpoint for configuring credential store plugins. |
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. |
401 | AuthenticationFailure | Authenticating the user with the given credentials has failed. |
404 | NotFound | The requested object does not exist. |
To upload or update a plugin, complete the following steps. Note that currently you cannot delete a plugin, only update it by uploading a new version.
For details, see Open a transaction.
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 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" } }
For details, see Commit a transaction.
The authentication and authorization (AAA) plugins used on SPS. To upload or update a plugin, see the Upload a plugin section in the Plugins chapter.
GET https://<IP-address-of-SPS>/api/configuration/plugins/aa
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 details on authentication, see Authenticate to the SPS REST API. Note that 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). |
The following command queries the list of AAA plugins used on SPS.
curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/plugins/aa
The following command retrieves the properties of a specific plugin.
curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/plugins/aa/<plugin-id>
The following is a sample response received when querying the list of AAA plugins used on SPS.
For details of the meta object, see Message format.
{ "items": [ { "key": "2080160955734bb2a1ddf9", "meta": { "href": "/api/configuration/plugins/aa/2080160955734bb2a1ddf9" } } ], "meta": { "first": "/api/configuration/plugins/aa", "href": "/api/configuration/plugins/aa", "last": "/api/configuration/plugins/ticketing", "next": "/api/configuration/plugins/credentialstore", "parent": "/api/configuration/plugins", "previous": null, "transaction": "/api/transaction" } }
When retrieving the endpoint of a specific plugin, the response is the following.
{ "body": { "api": "1.0", "description": "test1", "name": "AAPluginExample", "path": "/opt/scb/var/plugins/aa/AAPluginExample", "version": "1.0" }, "key": "2080160955734bb2a1ddf9", "meta": { "first": "/api/configuration/plugins/aa/2080160955734bb2a1ddf9", "href": "/api/configuration/plugins/aa/2080160955734bb2a1ddf9", "last": "/api/configuration/plugins/aa/2080160955734bb2a1ddf9", "next": null, "parent": "/api/configuration/plugins/aa", "previous": null, "transaction": "/api/transaction" } }
Element | Type | Description | |
---|---|---|---|
key | string | Top level element, contains the ID of the plugin. | |
body | Top level element (string) | Contains the properties of the plugin. | |
api | string | The API version of the plugin. | |
description | string | The description of the plugin. This description is also displayed on the SPS web interface. | |
name | string | The name of the plugin. This name is also displayed on the SPS web interface. It cannot contain whitespace. | |
path | string | The path where the plugin is stored on SPS. | |
version | string | The version of the plugin. |
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. |
401 | AuthenticationFailure | Authenticating the user with the given credentials has failed. |
404 | NotFound | The requested object does not exist. |
© ALL RIGHTS RESERVED. Feedback Términos de uso Privacidad Cookie Preference Center