POST Security Roles ID Copy

The POST /Security/Roles{id}/Copy method is used to copy an existing security role in Keyfactor Command to create a new security role. This method returns HTTP 200 OK on a success with the details of the new security role.

Tip:  The following permissions (see Security Roles and Claims) are required to use this feature:

/security/modify/

The user must hold a role containing this permission in the Global Permission Set (see Permission Sets).

Important:  This has been deprecated since it supports Active Directory identities only. It is retained for backwards compatibility, but all new development should use methods that provide support for alternate identity providers and the newer claims-based authentication model that accompanies this. These newer methods support both Active Directory and other identity providers. There is not an equivalent function to this among the newer methods. Instead, use the v2 versions of GET /Security/Roles/{id} and POST /Security/Roles (see GET Security Roles ID and POST Security Roles).

Table 636: POST Security Roles {id} Copy Input Parameters

Name

In

Description
id Path Required. The Keyfactor Command reference ID of the security role from which to copy role information.

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.

role Body

An array containing information about the new security role to create. ClosedShow role details.

Table 637: POST Security Roles {id} Copy 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 SetId 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. ClosedShow 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:

Copy
"Permissions": [
   "AdminPortal:Read",
   "Dashboard:Read"
],
Tip:  See the Keyfactor API Reference and Utility which provides a utility through which the Keyfactor APIClosed 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. endpoints can be called and results returned. It is intended to be used primarily for validation, testing and workflowClosed A workflow is a series of steps necessary to complete a process. In the context of Keyfactor Command, it refers to the workflow builder, which allows you automate event-driven tasks when a certificate is requested or revoked. development. It also serves secondarily as documentation for the API. The link to the Keyfactor API Reference and Utility is in the dropdown from the help icon () at the top of the Management Portal page next to the Log Out button.