PUT Certificates ID Owner

The PUT /Certificates/{id}/Owner operation updates the certificate owner for a specified certificate. The optional certificate owner is a security role defined in Keyfactor Command (see Security Roles and Claims). On success, the operation returns 204 with no content. The certificate history will be updated on the certificate details for actions on this operation.

Tip:  The following permissions (see Security Roles and Claims) are required to use this feature:
/certificates/collections/change_owner/
OR
/certificates/collections/change_owner/#/
OR
/certificate_stores/change_owner/
OR
/certificate_stores/change_owner/#/
OR
/certificates/expanded_change_owner/
AND
/security/read/ (in the permission set containing the security role to which the certificate owner will be set)

In addition, the operation checks the following to determine whether the user has permissions to change owner on the specified certificate ID:

For Change Owner permission:

  • The security roles assigned to the requesting user
  • The current certificate owner assigned to the certificate, if any

For Expanded Change Owner permission:

  • The permission sets associated with the user's roles
  • The permission sets associated with the certificate owner role, if defined

The change owner action succeeds only if all applicable permission checks pass.

See Change Owner and Certificates for more information about change owner permissions.

Permissions for certificates can be set at the system-wide or resource-specific level. The appropriate level depends on how the certificates are accessed. See Certificate CollectionClosed The certificate search function allows you to query the Keyfactor Command database for certificates from any available source based on any criteria of the certificates and save the results as a collection that will be available in other places in the Management Portal (for example expiration alerts and certain reports). Permissions and Application Permissions for more information.

In permission strings, # represents a specific resource identifier. In /certificates/collections/ permission strings it refers to a certificate collection ID (for example, CollectionId) and in /certificate_stores/ permission strings it refers to a certificate store application ID (for example, containerId).

Table 328: PUT Certificates {id} Owner Input Parameters

Name

In

Description

Id Path Required. An integer specifying the Keyfactor Command reference ID for the certificate to update.
CollectionId Query

An optional integer that specifies the certificate collection (CollectionId) to validate whether the user has sufficient permissions to perform the action. If a CollectionId is not provided, the user must have appropriate permissions granted system-wide or via certificate store applications.

Providing a CollectionId allows the system to check the user's permissions at the certificate collection level. Permissions are evaluated in the following order:

  1. System-wide certificate permissions
  2. Granular certificate permissions

Use either ContainerId or CollectionId, not both. If both are specified, CollectionId takes precedence, and the ContainerId is ignored (defaults to 0).

See Certificate Collection Permissions for more information.

ContainerId Query

An optional integer that specifies the certificate store application (ContainerId) to validate whether the user has sufficient permissions to perform the action. If a ContainerId is not provided, the user must have appropriate permissions granted system-wide or via certificate collections.

Providing a ContainerId allows the system to check the user's permissions at the application level. Permissions are evaluated in the following order:

  1. System-wide certificate permissions
  2. System-wide certificate store application permissions
  3. Granular certificate store application permissions

Use either ContainerId or CollectionId, not both.

See Application Permissions for more information.

NewRoleId Body

An integer indicating the Keyfactor Command reference ID of the security role to assign as the certificate owner. Set this value to null to clear an existing certificate owner. The value cannot be unset if the enrollment pattern or system-wide settings Certificate Owner Role policy has been configured as Required.

Note:  To assign a certificate owner, one of NewRoleId or NewRoleName is required, not both.
NewRoleName Body

A string containing the name of the security role to assign as the certificate owner. This name must match the existing name of the security role.

Set this value to null or blank to clear an existing certificate owner. The value cannot be unset if the enrollment pattern or system-wide settings Certificate Owner Role policy has been configured as Required.

Note:  To assign a certificate owner, one of NewRoleId or NewRoleName is required, not both.