PUT Security Roles

The PUT /Security/Roles method is used to update a security role in Keyfactor Command including the permissions set for the role and the security identities mapped to the role. This method returns HTTP 200 OK on a success with the details of the security role.

Tip:  The following permissions (see Security Overview) are required to use this feature:

SecuritySettings: Modify

Warning:  Any previously populated fields that are not submitted with their full existing data using this method will be cleared of their existing data. When using this method, you should first do a GET to retrieve all the values for the record you want to update, enter corrected data into the field(s) you want to update, and then submit all the fields using PUT, including the fields that contain values but which you are not changing.

Table 479: PUT Security Roles Input Parameters

Name In Description
Id Body Required. An integer containing the Keyfactor Command identifier for the security role. Use the GET /Security/Roles method (see GET Security Roles) to retrieve a list of all the security roles to determine the role's ID.
Name Body Required. A string containing the short reference name for the security role.
Description Body Required. A string containing the description for the security role.
Enabled Body

A Boolean that indicates whether the security role is enabled (true) or not (false). Security roles that have been disabled cannot be assigned to security identities. The default is true.

This is considered deprecated and may be removed in a future release.

Private Body

A Boolean that indicates whether the security role has been marked private (true) or not (false). The default is false.

This is considered deprecated and may be removed in a future release.

Permissions Body

An object containing the permissions assigned to the role in a comma-separated list of Name:Value pairs. ClosedShow permission details.

For example:

"Permissions": [
   "AdminPortal:Read",
   "Dashboard:Read"
],
Identities Body

An array containing one or more identifiers for each security identity to associate with the role. ClosedShow identifier information.

For example:

"Identities": [
   {
      "Name": "KEYEXAMPLE\\jsmith"
   },
   {
      "Name": "KEYEXAMPLE\\mjones"
   }
]

Table 480: PUT Security Roles Response Data

Name Description
Id An integer containing the Keyfactor Command identifier for the security role.
Name A string containing the short reference name for the security role.
Description A string containing the description for the security role.
Enabled

A Boolean that indicates whether the security role is enabled (true) or not (false). Security roles that have been disabled cannot be assigned to security identities. The default is true.

This is considered deprecated and may be removed in a future release.

Immutable A Boolean that indicates whether the security role has been marked as editable (true) or not (false). Internal Keyfactor Command roles are not editable. This setting is reserved for Keyfactor Command internal use.
Valid A Boolean that indicates whether the security role's audit XML is valid (true) or not (false). A security role may become invalid if Keyfactor Command determines that it appears to have been tampered with. This setting is not end-user configurable.
Private

A Boolean that indicates whether the security role has been marked private (true) or not (false). The default is false.

This is considered deprecated and may be removed in a future release.

Identities

An array containing information about the security identities assigned to the security role. ClosedShow identity details.

Permissions

An object containing the permissions assigned to the role in a comma-separated list of Name:Value pairs.

For example:

"Permissions": [
   "AdminPortal:Read",
   "Dashboard:Read"
],
Tip:  For code examples, see the Keyfactor API Endpoint Utility. To find the embedded web copy of this utility, click the help icon () at the top of the Keyfactor Command Management Portal page next to the Log Out button.