Keyboard shortcuts

Press โ† or โ†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Sovereign, high-performance data protection

Modify

ModifyAttribute: read-only and grant checks, then replacement of the value

Specification

This operation requests the server to modify an attribute value associated with a Managed Object. The request contains the Unique Identifier of the Managed Object whose attribute is to be modified, along with the attribute and its new value. Unlike SetAttribute, ModifyAttribute is intended to replace the value of an existing attribute โ€” it does not create the attribute if it is absent.

Read-Only attributes SHALL NOT be modified using this operation.

Implementation

This operation can be applied to all supported objects.

  • The attribute must already exist, else Attribute_Not_Found. Exempt: Name, Sensitive, Extractable, ActivationDate, AttributeIndex and the rotation attributes.
  • A Current Attribute is honoured; one that matches no instance returns Attribute_Instance_Not_Found.
  • Without a Current Attribute, the single Name instance is replaced; several instances return Invalid_Field; none adds it.
  • Every successful Modify updates the LastChangeDate.

Supported attributes

The following KMIP attributes can be modified:

AttributeNotes
ActivationDatePre-Active objects only. If the new date โ‰ค now the object automatically transitions to Active (KMIP spec ยง3.22).
CryptographicParametersReplaces the cryptographic parameters structure.
CryptographicUsageMaskReplaces the bitmask of allowed cryptographic usages.
DeactivationDateSets or replaces the deactivation date.
LinkReplaces the linked object identifier for the given link type.
NameReplaces the first Name entry if one exists, otherwise adds it.
ObjectGroupReplaces the object group string.
VendorAttributeReplaces a vendor attribute value identified by vendor ID + attribute name.

Read-only attributes

The following attributes are read-only for ModifyAttribute and SHALL NOT be modified. Any attempt returns an Attribute_Read_Only error before the object is touched:

  • UniqueIdentifier, ObjectType, ShortUniqueIdentifier, KeyFormatType, KeyValuePresent, OpaqueDataType
  • CryptographicAlgorithm, CryptographicDomainParameters, CryptographicLength, DigitalSignatureAlgorithm, NISTKeyType, Digest, RandomNumberGenerator, ProtectionStorageMasks
  • CertificateType, CertificateLength, CertificateAttributes, X509CertificateIdentifier, X509CertificateSubject, X509CertificateIssuer
  • InitialDate, LastChangeDate, OriginalCreationDate, ArchiveDate, DestroyDate, CompromiseDate, CompromiseOccurrenceDate, Fresh
  • State (use Revoke and Destroy to change it)
  • AlwaysSensitive, NeverExtractable
  • RotateGeneration, RotateDate, RotateLatest

Sensitive, Extractable, UsageLimits, CryptographicUsageMask, ActivationDate, DeactivationDate, Link, LinkType, RotateInterval and RevocationReason can be modified only by the object owner or by a user holding an explicit ModifyAttribute grant. A Get grant is not enough: the refusal is Permission_Denied.

Example - Modify the name

  ckms attributes modify -i my_symmetric_key --name my_new_name
{
  "tag": "ModifyAttribute",
  "type": "Structure",
  "value": [
    {
      "tag": "UniqueIdentifier",
      "type": "TextString",
      "value": "my_symmetric_key"
    },
    {
      "tag": "NewAttribute",
      "type": "Structure",
      "value": [
        {
          "tag": "Name",
          "type": "Structure",
          "value": [
            { "tag": "NameValue", "type": "TextString", "value": "my_new_name" },
            { "tag": "NameType", "type": "Enumeration", "value": "UninterpretedTextString" }
          ]
        }
      ]
    }
  ]
}

Example - Modify the activation date on a Pre-Active key

ActivationDate can only be modified on Pre-Active objects. Setting a date that is in the past or equal to the current time will automatically transition the object to the Active state.

  ckms attributes modify -i my_preactive_key --activation-date 1773571883
{
  "tag": "ModifyAttribute",
  "type": "Structure",
  "value": [
    {
      "tag": "UniqueIdentifier",
      "type": "TextString",
      "value": "my_preactive_key"
    },
    {
      "tag": "NewAttribute",
      "type": "Structure",
      "value": [
        {
          "tag": "ActivationDate",
          "type": "DateTime",
          "value": "2026-03-15T10:11:23+00:00"
        }
      ]
    }
  ]
}

Example - Read-only attribute rejection

Attempting to modify a read-only attribute such as State will return an Attribute_Read_Only error:

{
  "tag": "ModifyAttribute",
  "type": "Structure",
  "value": [
    {
      "tag": "UniqueIdentifier",
      "type": "TextString",
      "value": "my_symmetric_key"
    },
    {
      "tag": "NewAttribute",
      "type": "Structure",
      "value": [
        {
          "tag": "State",
          "type": "Enumeration",
          "value": "Active"
        }
      ]
    }
  ]
}