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.
The user must hold a role containing this permission in the Global Permission Set (see Permission Sets).
This endpoint An endpoint is a URL that enables the API to gain access to resources on a server. will be found by selecting V2 (Version 2) in the Keyfactor API A set of functions to allow creation of applications. Keyfactor offers the Keyfactor API, which allows third-party software to integrate with the advanced certificate enrollment and management features of Keyfactor Command. Reference and Utility. See Versioning.
Version 2 of the PUT /Security/Roles method has been redesigned to provide support for multiple identity providers and the newer claims-based authentication model that accompanies it. This version of the endpoint supports both Active Directory and other identity providers.
Table 607: PUT Security Roles v2 Input Parameters
Name |
In |
Description | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Id | Body |
Required. An integer containing the Keyfactor Command identifier for the security role.
|
|||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||
Permission Set Id | Body |
A string containing the Keyfactor Command reference GUID of the permission set to which the role is assigned (see Permission Sets). |
|||||||||||||||||||||||||||||||||||||||
Permissions | Body |
An array of strings containing the permissions assigned to the role in a comma-separated list of Name:Value pairs. See Version Two Permission Model for an overview of the possible permissions. For example: "Permissions": [ "/portal/read/", "/dashboard/read/", "/certificates/collections /metadata/modify/6/", "/certificates/collections /private_key/read/6/" ], |
|||||||||||||||||||||||||||||||||||||||
Claims | Body |
An array of objects containing the claims associated with the role.
|
Table 608: PUT Security Roles v2 Response Data
Name |
In |
Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Id | Body |
An integer containing the Keyfactor Command identifier for the security role. |
||||||||||||||||||||||||||||||||||||||||||||||||||
Name | Body | A string containing the short reference name for the security role. | ||||||||||||||||||||||||||||||||||||||||||||||||||
Description | Body | A string containing the description for the security role. | ||||||||||||||||||||||||||||||||||||||||||||||||||
Immutable | Body | A Boolean indicating if the role is immutable (true) or not (false). Only the built-in Administrators role is considered immutable. The value of this parameter cannot be changed. | ||||||||||||||||||||||||||||||||||||||||||||||||||
PermissionSetId | Body |
A string containing the Keyfactor Command reference GUID of the permission set to which the role is assigned (see Permission Sets). |
||||||||||||||||||||||||||||||||||||||||||||||||||
Permissions | Body |
An array of strings containing the permissions assigned to the role in a comma-separated list of Name:Value pairs. See Version Two Permission Model for an overview of the possible permissions. For example: "Permissions": [ "/portal/read/", "/dashboard/read/", "/certificates/collections/metadata/modify/6/", "/certificates/collections/private_key/read/6/" ], |
||||||||||||||||||||||||||||||||||||||||||||||||||
Claims | Body |
An array of objects containing the claims associated with the role.
|
Version 1 of the PUT /Security/Roles method includes the same capabilities as version 2, but offers support for managing legacy formatted Active Directory identities only and is retained for backwards compatibility. New applications should use the v2 endpoint, which supports both Active Directory and other identity providers.
Table 609: PUT Security Roles v1 Input Parameters
Name | In | Description |
---|---|---|
Id | Body |
Required. An integer containing the Keyfactor Command identifier for the security role.
|
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. |
Permission Set Id | Body | A string indicating the Keyfactor Command reference GUID of the permission set associated with the role (see Permission Sets). |
Permissions | Body |
An array of strings containing the permissions assigned to the role in a comma-separated list of Name:Value pairs. See Version One Permission Model for an overview of the possible permissions. For example: "Permissions": [ "AdminPortal:Read", "Dashboard:Read" ], |
Identities | Body |
An array of objects containing one or more identifiers for each security identity to associate with the role. Show identifier information. For example: "Identities": [ { "AccountName": "KEYEXAMPLE\\jsmith" }, { "AccountName": "KEYEXAMPLE\\mjones" } ] |
Table 610: PUT Security Roles v1 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 (false) or not (true). 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. |
Permission Set Id | A string indicating the Keyfactor Command reference GUID of the permission set associated with the role (see Permission Sets). |
Identities |
An array of objects containing information about the security identities assigned to the security role. Show identity details. |
Permissions |
An array of strings containing the permissions assigned to the role in a comma-separated list of Name:Value pairs. See Version One Permission Model for an overview of the possible permissions. For example: "Permissions": [ "AdminPortal:Read", "Dashboard:Read" ], |