Import a key
This key management operation allows importing of a public key to the keys repository and treats it as a trusted key afterwards.
Allowed users
Allowed
Required access scope
keymgmt:imp
Import a public key
POST
https://my.ence.do/api/keymgmt/import
Import a public key and save it in the keys repository.
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer JWT_TOKEN |
Content-Type* | String | application/json |
Request Body
Name | Type | Description |
---|---|---|
descr | String | Base64 encoded additional description |
label* | String | Label of a key |
mode | String | Key operation mode (for NIST ECC only) |
pubkey* | String | Base64 encoded external public key |
type* | String | Type of key to create |
Possible pubkey
type
pubkey
typeType | Description |
---|---|
SECP256R1 | NIST P-256 ECC key |
SECP384R1 | NIST P-384 ECC key |
SECP521R1 | NIST P-521 ECC key |
SECP256K1 | SEC2-v2 ECC key |
CURVE25519 | CURVE25519 ECC ECDH only key |
CURVE448 | CURVE4ECC ECDH only key |
ED25519 | ED25519 ECC EdDSA only key |
ED448 | ED448 ECC EdDSA only key |
Possible key mode
(for NIST ECC keys only)
mode
(for NIST ECC keys only)Check the list here.
Response data for successful operation
Name | Type | Description |
---|---|---|
| String | Key ID, 32 chars hex string |
Log entries
Event | Result | Source |
---|---|---|
LOG_TYPE_FAILED_SCOPE_CHECK | LOG_RESULT_FAILED | 403 |
LOG_TYPE_KEY_IMPORT | LOG_RESULT_ERROR | 400 |
LOG_TYPE_KEY_IMPORT | LOG_RESULT_FAILED | 406 |
LOG_TYPE_KEY_IMPORT | LOG_RESULT_OK | 200 |
Last updated