Method: digest

Returns the checksum ("digest") of an unwrapped Data Encryption Key (DEK).

SHA-256("KACLMigration" + resource_identifier + unwrapped_dek)

See also: rewrap

HTTP request

POST https://KACLS_URL/digest

Replace KACLS_URL with the Key Access Control List Service (KACLS) URL.

Path parameters

None.

Request body

The request body contains data with the following structure:

JSON representation
{
  "authorization": string,
  "reason": string,
  "wrapped_key": string
}
Fields
authorization

string

A JWT asserting that the user is allowed to unwrap a key for resource_name. See authorization tokens.

reason

string (UTF-8)

A passthrough JSON string providing additional context about the operation. The JSON provided should be sanitized before being displayed. Max size: 1 KB.

wrapped_key

string

The base64 binary object returned by wrap.

Response body

If successful, this method returns a checksum of the unwrapped DEK with the resource_name and "KaclMigration" prepended to allow validation of correctness.

If the operation fails, a structured error reply should be returned.

JSON representation
{
  "checksum": string
}
Fields
checksum

string

SHA-256 of the unwrapped DEK with the Resource ID and "KaclMigration" prepended. This string should be a 43-character base64 string.

Example

Request

POST https://mykacls.example.com/v1/digest

{
   "wrapped_key": "7qTh6Mp+svVwYPlnZMyuj8WHTrM59wl/UI50jo61Qt/QubZ9tfsUc1sD62xdg3zgxC9quV4r+y7AkbfIDhbmxGqP64pWbZgFzOkP0JcSn+1xm/CB2E5IknKsAbwbYREGpiHM3nzZu+eLnvlfbzvTnJuJwBpLoPYQcnPvcgm+5gU1j1BjUaNKS/uDn7VbVm7hjbKA3wkniORC2TU2MiHElutnfrEVZ8wQfrCEpuWkOXs98H8QxUK4pBM2ea1xxGj7vREAZZg1x/Ci/E77gHxymnZ/ekhUIih6Pwu75jf+dvKcMnpmdLpwAVlE1G4dNginhFVyV/199llf9jmHasQQuaMFzQ9UMWGjA1Hg2KsaD9e3EL74A5fLkKc2EEmBD5v/aP+1RRZ3ISbTOXvxqYIFCdSFSCfPbUhkc9I2nHS0obEH7Q7KiuagoDqV0cTNXWfCGJ1DtIlGQ9IA6mPDAjX8Lg==",
   "authorization": "eyJhbGciOi…"
   "reason": "{client:'drive' op:'read'}"
}

Response

{
   "checksum": "4973b23de90101423de73b994ae273b0194ae273b94ae24ae273423de9b94ae2"
}