Safeguard for Privileged Sessions can check the validity of certificates using the certificates and certificate-revocation lists of trusted certificate authorities (CAs) that issued the certificates.
GET https://<IP-address-of-Safeguard for Privileged Sessions>/api/configuration/policies/trusted_ca_lists
Header 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 Safeguard for Privileged Sessions REST API. Note that this session ID refers to the connection between the REST client and the Safeguard for Privileged Sessions REST API. It is not related to the sessions that Safeguard for Privileged Sessions records (and which also have a session ID, but in a different format). |
The following command lists the trusted CAs.
curl --cookie cookies https://<IP-address-of-Safeguard for Privileged Sessions>/api/configuration/policies/trusted_ca_lists
The following command retrieves the properties of a specific CA.
curl --cookie cookies https://<IP-address-of-Safeguard for Privileged Sessions>/api/configuration/policies/trusted_ca_lists/<policy-id>
The following is a sample response received when listing trusted CAs. For details of the meta object, see Introduction.
{ "items": [ { "key": "12269547065727ad6e79d9e", "meta": { "href": "/api/configuration/policies/trusted_ca_lists/12269547065727ad6e79d9e" } } ], "meta": { "first": "/api/configuration/policies/audit_policies", "href": "/api/configuration/policies/trusted_ca_lists", "last": "/api/configuration/policies/usermapping_policies", "next": "/api/configuration/policies/user_databases", "parent": "/api/configuration/policies", "previous": "/api/configuration/policies/time_policies", "transaction": "/api/transaction" } }
When retrieving the endpoint of a specific CA, the response is the following.
{ "body": { "authorities": [ { "certificate": "<cert>", "crl": "<url-of-revocation-list>" } ], "dn_check": { "altEmailAddress": "<altEmail>", "c": "<country>", "cn": "<commonName>", "emailAddress": "<email>", "l": "<localityName>", "o": "<orgName>", "ou": "<orgUnitName>", "st": "<stateOrProvince>" }, "dns_lookup": false, "name": "<ca-name>", "strict_hostcheck": true }, "key": "12269547065727ad6e79d9e", "meta": { "first": "/api/configuration/policies/trusted_ca_lists/12269547065727ad6e79d9e", "href": "/api/configuration/policies/trusted_ca_lists/12269547065727ad6e79d9e", "last": "/api/configuration/policies/trusted_ca_lists/12269547065727ad6e79d9e", "next": null, "parent": "/api/configuration/policies/trusted_ca_lists", "previous": null, "transaction": "/api/transaction" } }
Element | Type | Description | ||
---|---|---|---|---|
key | string | Top level element, contains the ID of the CA. | ||
body | Top level element (string) | Contains the properties of the CA. | ||
authorities | Top level list |
Contains the certificates and the Certificate Revocation Lists (CLR) of the trusted CAs. You can add multiple certificate and CRL pairs. | ||
certificate | string | The certificate of the trusted CA. | ||
crl | string | The URL of the Certificate Revocation List of the CA. | ||
dn_check | Top level item | Certificates are only accepted if their content matches the configured values. | ||
altEmailAddress | string | The certificate is only accepted if its alternative e-mail address matches the value of the altEmailAddress element. | ||
c | string | The certificate is only accepted if its country matches the value of the c element. | ||
cn | string | The certificate is only accepted if its common name matches the value of the cn element. | ||
emailAddress | string | The certificate is only accepted if its e-mail address matches the value of the emailAddress element. | ||
l | string | The certificate is only accepted if its locality matches the value of the l element. | ||
o | string | The certificate is only accepted if its organization name matches value of the o element. | ||
ou | string | The certificate is only accepted if its organization unit name matches value of the ou element. | ||
st | string | The certificate is only accepted if its state or province matches value of the st element. | ||
dns_lookup | boolean | Set to true to use the domain name server set on the /api/configuration/network/naming endpoint to resolve the hostnames and IP addresses for certificate validation. If you have enabled strict_hostcheck, you probably want to enable this option as well. | ||
name | string | The name of the trusted CA. This name is also displayed on the Safeguard for Privileged Sessions web interface. It cannot contain whitespace. | ||
strict_hostcheck | boolean | Set to true to configure only accepting certificates where the Common Name of the certificate contains the hostname or the IP address of the host showing the certificate. |
Safeguard for Privileged Sessions uses only the key part of the CA certificate.
To use a certificate with the Safeguard for Privileged Sessions API, remove all data, and substitute line breaks with \n.
The following is an example certificate, as used on the Safeguard for Privileged Sessions web interface:
-----BEGIN CERTIFICATE----- MIIDnDCCAoQCCQDc536Ob5tPQTANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMC Q0ExEDAOBgNVBAgTB09udGFyaW8xEDAOBgNVBAcTB1Rvcm9udG8xEDAOBgN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7Fx+W50/NtXamUF1Sf8WlPZc03oVl1/Fzo7mt qYyyD1ld89OUEYZ+aJQd/A== -----END CERTIFICATE-----
The same certificate, as accepted by the Safeguard for Privileged Sessions API:
"certificate": "-----BEGIN CERTIFICATE-----\nMIIDnDCCAoQCCQDc536Ob5tPQTANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMC\nQ0ExEDAOBgNVBAgTB09udGFyaW8xEDAOBgNVBAcTB1Rvcm9udG8xEDAOBgNVBAoT\nB0JhbGFiaXQxFjAUBgNVBAsTDURvY3VtZW50YXRpb24xEDAOBgNVBAMTB2JhbGFi\naXQxIDAeBgkqhkiG9w0BCQEWEWNhdGFpbEBiYWxhYml0Lmh1MB4XDTE2MDQyMjE2\nMDAyNloXDTE3MDQyMjE2MDAyNlowgY8xCzAJBgNVBAYTAkNBMRAwDgYDVQQIEwdP\nbnRhcmlvMRAwDgYDVQQHEwdUb3JvbnRvMRAwDgYDVQQKEwdCYWxhYml0MRYwFAYD\nVQQLEw1Eb2N1bWVudGF0aW9uMRAwDgYDVQQDEwdiYWxhYml0MSAwHgYJKoZIhvcN\nAQkBFhFjYXRhaWxAYmFsYWJpdC5odTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC\nAQoCggEBAOGa9I2jmVlVdVWEI/Wy7ahTeyaIjK52FQUXqxG8okOSD+nV74ZFUuiS\n59X+2Ow1aDqVGrDMgPNhSVpYXUvDUAUOILJW4rAIoxDY6vDU9/4v9dDiQfEPlauw\n0qNRjPS1MLzjSOQDSKqPkdivkS6HKZeX3+TFq3OxO+vIrF9zFfp9T+eDG2oSobPc\n3mV2zkvtD61CXzbezAVdArDl6WnysRyzxyH8WEhFwZepWxFD9Y5N1dzKody7Hncs\nX5kVIv0+Z6bBHfg/7wHWysJdwNuLr0ByTOvPM6WdA83k3Fy2gYNk7Rc0BbRFbQTX\nhJVfUzSUWHVhFQtAb4diKU5voqepfNMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA\nR5DIwOHsEKoGkiI3cHC2VMnxP2rRhpTneh6El+DFnQPdjrXa+tnqV4TdnNaD+FvP\nAB1kqbmC4hJAsjMLU2b1ne6m+SLmzhRuMxcA6x+fnYvcQT57IbRdq2E/4oJGeyuy\n0jQE+nmoVD3lDytIOxCfQvZhl1tcbBE5hp5USme4PmNhY6QfUlgjsFjPfoVG7XDB\nuNaUoWS6RvZPmL5IuvF9tqe96ES6DTjC8rBfQYvSoVNjjPnUMx0C8xstRSEG7oJc\nN5+4ImYnFNxSG20hZpFy0OFDf2g7Fx+W50/NtXamUF1Sf8WlPZc03oVl1/Fzo7mt\nqYyyD1ld89OUEYZ+aJQd/A==\n-----END CERTIFICATE-----\n"
To add a trusted CA, you have to:
For details, see Open a transaction.
POST the JSON object to the https://<IP-address-of-Safeguard for Privileged Sessions>/api/configuration/policies/trusted_ca_lists endpoint. You can find a detailed description of the available parameters listed in Trusted Certificate Authorities.
If the POST request is successful, the response includes the key of the new trusted CA. For example:
{ "key": "becc17b1-e876-4443-b22e-a3baf7825e55", "meta": { "href": "/api/configuration/policies/trusted_ca_lists/becc17b1-e876-4443-b22e-a3baf7825e55", "parent": "/api/configuration/policies/trusted_ca_lists", "transaction": "/api/transaction" } }
For details, see Commit a transaction.
To modify a trusted CA, you have to:
For details, see Open a transaction.
PUT the modified JSON object to the https://<IP-address-of-Safeguard for Privileged Sessions>/api/configuration/policies/trusted_ca_lists/<key-of-the-object> endpoint. You can find a detailed description of the available parameters listed in Trusted Certificate Authorities.
For details, see Commit a transaction.
The following table lists the typical status and error codes for this request. For a complete list of error codes, see Using the Safeguard for Privileged Sessions REST API.
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. |
Local User Databases are available for RDP, SSH and Telnet protocols, and can be used to authenticate the clients to credentials that are locally available on Safeguard for Privileged Sessions. Such credentials include passwords, public keys, and certificates. Local User Databases are most commonly used in inband gateway authentication scenarios.
GET https://<IP-address-of-Safeguard for Privileged Sessions>/api/configuration/policies/user_databases
Header 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 Safeguard for Privileged Sessions REST API. Note that this session ID refers to the connection between the REST client and the Safeguard for Privileged Sessions REST API. It is not related to the sessions that Safeguard for Privileged Sessions records (and which also have a session ID, but in a different format). |
The following command lists local user databases.
curl --cookie cookies https://<IP-address-of-Safeguard for Privileged Sessions>/api/configuration/policies/user_databases
The following command retrieves the properties of a specific local user database.
curl --cookie cookies https://<IP-address-of-Safeguard for Privileged Sessions>/api/configuration/policies/user_databases/<object-id>
The following is a sample response received when listing local user databases. For details of the meta object, see Introduction.
{ "items": [ { "key": "8235074425707e306abf39", "meta": { "href": "/api/configuration/policies/user_databases/8235074425707e306abf39" } } ], "meta": { "first": "/api/configuration/policies/audit_policies", "href": "/api/configuration/policies/user_databases", "last": "/api/configuration/policies/usermapping_policies", "next": "/api/configuration/policies/userlists", "parent": "/api/configuration/policies", "previous": "/api/configuration/policies/trusted_ca_lists", "transaction": "/api/transaction" } }
When retrieving the endpoint of a specific local user database, the response is the following.
{ "body": { "name": "<name-of-the-user-database>", "users": [ { "certificates": [ "<cert>" ], "passwords": [ { "key": "ad55822d-fa28-45aa-bca4-220074f770e1", "meta": { "href": "/api/configuration/passwords/ad55822d-fa28-45aa-bca4-220074f770e1" } } ], "public_keys": [ { "selection": "rsa", "value": "<public-key>" } ], "username": "<username>" } ] }, "key": "8235074425707e306abf39", "meta": { "first": "/api/configuration/policies/user_databases/8235074425707e306abf39", "href": "/api/configuration/policies/user_databases/8235074425707e306abf39", "last": "/api/configuration/policies/user_databases/8235074425707e306abf39", "next": null, "parent": "/api/configuration/policies/user_databases", "previous": null, "transaction": "/api/transaction" } }
Element | Type | Description | ||
---|---|---|---|---|
key | string | Top level element, contains the ID of the local user database. | ||
body | Top level element (string) | Contains the properties of the local user database. | ||
name | string | The name of the local user database. This name is also displayed on the Safeguard for Privileged Sessions web interface. It cannot contain whitespace. | ||
users | Top level list | Contains the password, key, and certificates of each configured user. | ||
certificates | Top level list, string | Contains the certificates of the user. | ||
passwords | Top level item |
References the password of the user. You can configure passwords at the /api/configuration/passwords/ endpoint. To modify or add a password, use the value of the returned key as the value of the password element, and remove any child elements (including the key). | ||
public_keys | Top level list | Contains the pubic keys of the user. | ||
username | Top level list, string | Name of the user. |
Elements of public_keys | Type | Description |
---|---|---|
selection | string |
Possible values are:
|
value | string | The public key. |
Configure password authentication only for test_user. (New passwords can only be provided using the web interface of Safeguard for Privileged Sessions.)
{ "name": "<name-of-the-user-database>", "users": [ { "certificates": [], "passwords": [ "ad55822d-fa28-45aa-bca4-220074f770e1" ], "public_keys": [], "username": "test_user" } ] }
Configure two possible X.509 certificates for test_user, and no other authentication options.
{ "name": "<name-of-the-user-database>", "users": [ { "certificates": [ "<cert1>", "<cert2>" ], "passwords": [], "public_keys": [], "username": "test_user" } ] }
Safeguard for Privileged Sessions uses only the key part of the certificate.
To use a certificate with the Safeguard for Privileged Sessions API, remove all data, and substitute line breaks with \n.
The following is an example certificate, as used on the Safeguard for Privileged Sessions web interface:
-----BEGIN CERTIFICATE----- MIIDnDCCAoQCCQDc536Ob5tPQTANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMC Q0ExEDAOBgNVBAgTB09udGFyaW8xEDAOBgNVBAcTB1Rvcm9udG8xEDAOBgNVBAoT B0JhbGFiaXQxFjAUBgNVBAsTDURvY3VtZW50YXRpb24xEDAOBgNVBAMTB2JhbGFi aXQxIDAeBgkqhkiG9w0BCQEWEWNhdGFpbEBiYWxhYml0Lmh1MB4XDTE2MDQyMjE2 MDAyNloXDTE3MDQyMjE2MDAyNlowgY8xCzAJBgNVBAYTAkNBMRAwDgYDVQQIEwdP bnRhcmlvMRAwDgYDVQQHEwdUb3JvbnRvMRAwDgYDVQQKEwdCYWxhYml0MRYwFAYD VQQLEw1Eb2N1bWVudGF0aW9uMRAwDgYDVQQDEwdiYWxhYml0MSAwHgYJKoZIhvcN AQkBFhFjYXRhaWxAYmFsYWJpdC5odTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC AQoCggEBAOGa9I2jmVlVdVWEI/Wy7ahTeyaIjK52FQUXqxG8okOSD+nV74ZFUuiS 59X+2Ow1aDqVGrDMgPNhSVpYXUvDUAUOILJW4rAIoxDY6vDU9/4v9dDiQfEPlauw 0qNRjPS1MLzjSOQDSKqPkdivkS6HKZeX3+TFq3OxO+vIrF9zFfp9T+eDG2oSobPc 3mV2zkvtD61CXzbezAVdArDl6WnysRyzxyH8WEhFwZepWxFD9Y5N1dzKody7Hncs X5kVIv0+Z6bBHfg/7wHWysJdwNuLr0ByTOvPM6WdA83k3Fy2gYNk7Rc0BbRFbQTX hJVfUzSUWHVhFQtAb4diKU5voqepfNMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA R5DIwOHsEKoGkiI3cHC2VMnxP2rRhpTneh6El+DFnQPdjrXa+tnqV4TdnNaD+FvP AB1kqbmC4hJAsjMLU2b1ne6m+SLmzhRuMxcA6x+fnYvcQT57IbRdq2E/4oJGeyuy 0jQE+nmoVD3lDytIOxCfQvZhl1tcbBE5hp5USme4PmNhY6QfUlgjsFjPfoVG7XDB uNaUoWS6RvZPmL5IuvF9tqe96ES6DTjC8rBfQYvSoVNjjPnUMx0C8xstRSEG7oJc N5+4ImYnFNxSG20hZpFy0OFDf2g7Fx+W50/NtXamUF1Sf8WlPZc03oVl1/Fzo7mt qYyyD1ld89OUEYZ+aJQd/A== -----END CERTIFICATE-----
The same certificate, as accepted by the Safeguard for Privileged Sessions API:
"certificate": "-----BEGIN CERTIFICATE-----\nMIIDnDCCAoQCCQDc536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l1tcbBE5hp5USme4PmNhY6QfUlgjsFjPfoVG7XDB\nuNaUoWS6RvZPmL5IuvF9tqe96ES6DTjC8rBfQYvSoVNjjPnUMx0C8xstRSEG7oJc\nN5+4ImYnFNxSG20hZpFy0OFDf2g7Fx+W50/NtXamUF1Sf8WlPZc03oVl1/Fzo7mt\nqYyyD1ld89OUEYZ+aJQd/A==\n-----END CERTIFICATE-----\n"
To add a local user database, you have to:
For details, see Open a transaction.
POST the JSON object to the https://<IP-address-of-Safeguard for Privileged Sessions>/api/configuration/policies/user_databases endpoint. You can find a detailed description of the available parameters listed in Local user databases.
If the POST request is successful, the response includes the key of the new local user database. For example:
{ "key": "c4e60325-971a-44bc-ac01-e353dc6320d6", "meta": { "href": "/api/configuration/policies/user_databases/c4e60325-971a-44bc-ac01-e353dc6320d6", "parent": "/api/configuration/policies/user_databases", "transaction": "/api/transaction" } }
For details, see Commit a transaction.
To modify a local usre database, you have to:
For details, see Open a transaction.
PUT the modified JSON object to the https://<IP-address-of-Safeguard for Privileged Sessions>/api/configuration/policies/user_databases/<key-of-the-object> endpoint. You can find a detailed description of the available parameters listed in Local user databases.
For details, see Commit a transaction.
The following table lists the typical status and error codes for this request. For a complete list of error codes, see Using the Safeguard for Privileged Sessions REST API.
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. |
User lists are local white- or blacklists of usernames that allow fine-control over who can access a connection or a channel.
|
NOTE:
User lists on Safeguard for Privileged Sessions cannot prevent a user from accessing the server from a local terminal. |
You can use user lists when configuring gateway_groups or remote_groups in the allowed_for element of channel policies. For more information on configuring channel policies, see Channel policy.
To use this option, you must also configure web gateway authentication in the connection policy, or client-side gateway authentication back-end in the authentication policy.
GET https://<IP-address-of-Safeguard for Privileged Sessions>/api/configuration/policies/userlists
Header 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 Safeguard for Privileged Sessions REST API. Note that this session ID refers to the connection between the REST client and the Safeguard for Privileged Sessions REST API. It is not related to the sessions that Safeguard for Privileged Sessions records (and which also have a session ID, but in a different format). |
The following command lists the user lists created on Safeguard for Privileged Sessions.
curl --cookie cookies https://<IP-address-of-Safeguard for Privileged Sessions>/api/configuration/policies/userlists
The following command retrieves the properties of a specific list.
curl --cookie cookies https://<IP-address-of-Safeguard for Privileged Sessions>/api/configuration/policies/userlists/<key-id>
The following is a sample response received when retrieveing the user lists. For details of the meta object, see Introduction.
The keys with negative ID values are the default user lists of Safeguard for Privileged Sessions.
{ "meta": { "first": "/api/configuration/policies/audit_policies", "href": "/api/configuration/policies/userlists", "last": "/api/configuration/policies/usermapping_policies", "next": "/api/configuration/policies/usermapping_policies", "parent": "/api/configuration/policies", "previous": "/api/configuration/policies/user_databases", "transaction": "/api/transaction" }, "items": [ { "key": "-1", "meta": { "href": "/api/configuration/policies/userlists/-1" } }, { "key": "-2", "meta": { "href": "/api/configuration/policies/userlists/-2" } }, { "key": "-3", "meta": { "href": "/api/configuration/policies/userlists/-3" } }, { "key": "-4", "meta": { "href": "/api/configuration/policies/userlists/-4" } }, { "key": "20088200245706af301b1ba", "meta": { "href": "/api/configuration/policies/userlists/20088200245706af301b1ba" } } ] }
When retrieving the endpoint of a specific user list, the response is the following.
{ "body": { "default": "exclude", "name": "root_only", "users": [ "root" ] }, "key": "-4", "meta": { "first": "/api/configuration/policies/userlists/-1", "href": "/api/configuration/policies/userlists/-4", "last": "/api/configuration/policies/userlists/20088200245706af301b1ba", "next": "/api/configuration/policies/userlists/20088200245706af301b1ba", "parent": "/api/configuration/policies/userlists", "previous": "/api/configuration/policies/userlists/-3", "transaction": "/api/transaction" } }
Element | Type | Description | |
---|---|---|---|
key | string | Top level element, contains the ID of the user list | |
body | Top level element (string) | The elements of the user policy. | |
default | string |
The default policy of the user list. Possible values are:
| |
name | string |
The name of the user list. | |
users | list |
The usernames added to the list. |
The following table lists the typical status and error codes for this request. For a complete list of error codes, see Using the Safeguard for Privileged Sessions REST API.
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 user list, you have to:
For details, see Open a transaction.
POST the JSON object to the https://<IP-address-of-Safeguard for Privileged Sessions>/api/configuration/policies/userlists endpoint. You can find a detailed description of the available parameters listed in User lists.
If the POST request is successful, the response includes the key of the new user list. For example:
{ "key": "321314dc-eca0-4e97-b445-0612fedc0165", "meta": { "href": "/api/configuration/policies/userlists/321314dc-eca0-4e97-b445-0612fedc0165", "parent": "/api/configuration/policies/userlists", "transaction": "/api/transaction" } }
For details, see Commit a transaction.
To modify a user list, you have to:
For details, see Open a transaction.
PUT the modified JSON object to the https://<IP-address-of-Safeguard for Privileged Sessions>/api/configuration/policies/userlists/<key-of-the-object> endpoint. You can find a detailed description of the available parameters listed in User lists.
For details, see Commit a transaction.
© 2023 One Identity LLC. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy