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

Delete

DeleteAttribute: read-only and grant checks, then removal and LastChangeDate update

Specification

This operation requests the server to delete an attribute associated with a Managed Object. The request contains the Unique Identifier of the Managed Object whose attribute is to be deleted, the Current Attribute of the attribute. Attributes that are always REQUIRED to have a value SHALL never be deleted by this operation. Attempting to delete a non-existent attribute or specifying an Current Attribute for which there exists no attribute value SHALL result in an error. If no Current Attribute is specified in the request, and an Attribute Reference is specified, then all instances of the specified attribute SHALL be deleted.

Implementation

This operation can be applied to all supported objects. One or more attributes can be set at once.

Read-only attributes

The following attributes are read-only for DeleteAttribute (KMIP 2.1 ยง6.1.13). 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
  • Sensitive, Extractable, AlwaysSensitive, NeverExtractable
  • CryptographicUsageMask, ActivationDate, DeactivationDate
  • RotateAutomatic, RotateGeneration, RotateDate, RotateLatest
  • server-owned KMIP 1.x vendor attributes (names starting with y-)

Other rules

  • A Current Attribute that matches no instance returns Attribute_Instance_Not_Found if the attribute exists, else Attribute_Not_Found.
  • A request that deletes nothing returns Attribute_Not_Found.
  • A reference to Link clears every link. A Link with an empty linked identifier removes every link of that type.
  • UsageLimits, Link, LinkType, RotateInterval and RevocationReason can be deleted only by the object owner or by a user holding an explicit DeleteAttribute grant (Permission_Denied otherwise).
  • Every successful Delete updates the LastChangeDate.
  • KMIP 1.4 responses echo the deleted attribute.

First, for the demo purpose create a certificate:

  ckms certificates certify --generate-key-pair --subject-name C=yo --algorithm rsa2048 -c my_certificate

Delete the links on a certificate object.

Corresponding KMS CLI command:

  ckms attributes delete -i my_certificate --public-key-id xxxxxxxx-yyyy-yyyy-yyyy-zzzzzzzzzzzz --private-key-id xxxxxxxx-yyyy-yyyy-yyyy-zzzzzzzzzzzz --certificate-id xxxxxxxx-yyyy-yyyy-yyyy-zzzzzzzzzzzz

The request deletes the KMIP links of the public key and the private key of the underlying certificate. The DeleteAttribute operation being unitary, 3 requests are sent to the server, one for each link.

ckms attributes delete: one DeleteAttribute request per certificate link

Output is:

Attribute deleted successfully
          Unique identifier: my_certificate
[
  {
    "LinkType": "PublicKeyLink",
    "LinkedObjectIdentifier": "xxxxxxxx-yyyy-yyyy-yyyy-zzzzzzzzzzzz"
  }
]
Attribute deleted successfully
          Unique identifier: my_certificate
[
  {
    "LinkType": "PrivateKeyLink",
    "LinkedObjectIdentifier": "xxxxxxxx-yyyy-yyyy-yyyy-zzzzzzzzzzzz"
  }
]
Attribute deleted successfully
          Unique identifier: my_certificate
[
  {
    "LinkType": "CertificateLink",
    "LinkedObjectIdentifier": "xxxxxxxx-yyyy-yyyy-yyyy-zzzzzzzzzzzz"
  }
]
{
  "tag": "DeleteAttribute",
  "type": "Structure",
  "value": [
    {
      "tag": "UniqueIdentifier",
      "type": "TextString",
      "value": "my_certificate"
    },
    {
      "tag": "CurrentAttribute",
      "type": "Structure",
      "value": [
        {
          "tag": "Link",
          "type": "Structure",
          "value": [
            {
              "tag": "LinkType",
              "type": "Enumeration",
              "value": "PublicKeyLink"
            },
            {
              "tag": "LinkedObjectIdentifier",
              "type": "TextString",
              "value": "xxxxxxxx-yyyy-yyyy-yyyy-zzzzzzzzzzzz"
            }
          ]
        }
      ]
    }
  ]
}