Generate a KMS key
Requires kms:create on the configuration, and a current license.
type is AES or RSA. Name algorithm for an exact choice, or leave
it out and let key_length or rsa_modulus decide; the defaults are
AES-256-GCM and RSA-2048. The reported algorithm is the key length
without the cipher mode, so an AES key reads as AES-256 with the mode
alongside it in cipher_mode.
usage_mask defaults to ["encrypt", "decrypt"].
A key is not exportable unless private_material_retrievable is set at
creation. That decision cannot be made later for a key that was
generated without it.
Authorizations
A machine credential, qk_ followed by its secret. Only a hash of the
secret is stored, so a key is displayed exactly once, when it is created
or rotated. A key reaches only the configurations it is linked to.
It may also be sent as Authorization: Bearer qk_..., which is
recognised by the prefix.
Path Parameters
The configuration's proxy slug. Sixteen random lowercase letters and digits unless one was pinned at creation.
"952zpx6vyig3sdyp"
Body
AES, RSA An exact choice, and the only way to ask for CBC. Derived from
type with key_length or rsa_modulus when omitted.
aes-128-gcm, aes-192-gcm, aes-256-gcm, aes-128-cbc, aes-192-cbc, aes-256-cbc, rsa-2048, rsa-4096 AES only, and ignored when algorithm is given.
128, 192, 256 RSA only, and ignored when algorithm is given.
2048, 4096 Defaults to ["encrypt", "decrypt"]. Duplicates are collapsed.
encrypt, decrypt, sign, verify A classification slug, as an alternative to the id.
Decide this now. A key generated without it can never be exported, and the setting cannot be granted afterwards.
After this instant, export is refused even for an exportable key.
Return the private half in this response, wrapped to
wrap_with_key_id. Requires private_material_retrievable.
An existing RSA key to wrap the export to. Required when
export_on_create is true.
Response
The new key. private_key_material is present only when
export_on_create was set and a wrap key was named.
The compact form returned by the list endpoint.
How every other KMS endpoint names this key.
A caller's own identifier, for reconciling against another system.
AES, RSA The key length, without the cipher mode.
"AES-256"
"RSA-2048"
active, revoked Whether the private half may ever leave this service. Fixed at creation: it can be withdrawn later but never granted, because the guarantee made when the key was generated has to keep holding.
What the key may be used for. Defaults to ["encrypt", "decrypt"] when a key is created without one.
encrypt, decrypt, sign, verify The AES mode. Absent for an RSA key, which has none.
gcm, cbc Present when the key carries a classification. Decrypting through it then requires the matching clearance.
Present only on a revoked key, and only when one was given.
The key this one replaced, when it came from a rotation.
After this, export is refused even for an exportable key. Present only on exportable keys.
How many times the private half has been exported. Present only on exportable keys.
RSA keys only, and always safe to hand out.
Present only in the response to an export, or to a create with
export_on_create. Never returned by a plain fetch.