Organization Service Public Keys

Path:/organization/v3/service/keys

This endpoint manages Public Keys for a particular Organization Service.

POST

Adds a Public Key to an Organization Service.

Request

Requests will be a JWE encrypted JSON payload with the following attribute:

service_id (string):The identifier of the Organization Service in order to add the public key.
public_key (string):A PEM formatted RSA Public Key.
date_expires (string) [optional]:An ISO-8601 formatted date signifying the time when the public key expires and is no longer active.
active (boolean) [optional]:A boolean value that answers: “Is the public key active?”

Example:

{
    "service_id": "ce5ab88c-e79e-4049-bb36-4f8709122648",
    "public_key", "-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD38jQRiR5RffOHDcvU2Qp9X3qy
wKTYV0tKP/OpaA61BvtKudOlE1TUQNSmBBtzKSsVeA2SQ8BAwUF7smQn+uZpT90C
XMXnba7wNu7YfsmBIbjIjQ0M7xRm2z/jzVo0ltKog1RU2/5CY67Zw+wXcW7UuTCC
sv+nCk+H6gDCPl4TYwIDAQAB
-----END PUBLIC KEY-----",
    "date_expires": "2020-01-01T00:00:00Z",
    "active": true
}

Response

Responses will be a JWE encrypted JSON payload consisting the key ID for the key added to the Organization Service:

key_id (string):The MD5 fingerprint of the public key added to the Organization Service. This will be used to identify the public key in the future.

Example:

{"key_id": "e2:f4:14:25:24:45:66:a2:c1:6f:d6:0c:c9:00:09:66"}

Errors

403 Forbidden:If the Organization Service ID supplied belongs to an Organization other than the one identified by the provided credentials, a 403 Forbidden error will be returned.
400 Invalid / DIR-004:If the Organization Service ID supplied does not exist, a 400 Invalid Request response with the error code DIR-004 will be returned.
400 Invalid / KEY-001:If the Pubic Key provided is not valid, a 400 Invalid Request response with the error code KEY-001 will be returned.
400 Invalid / KEY-002:If the Pubic Key provided already exists for the provided Organization Service ID, a 400 Invalid Request response with the error code KEY-002 will be returned.

PATCH

Modifies a Public Key belonging to an Organization Service.

Request

Requests will be a JWE encrypted JSON payload with the following attribute:

service_id (string):The identifier of the Organization Service for which you wish to add a public key.
key_id (string):The MD5 fingerprint of the public key used to identify the public key.
date_expires (string) [optional]:An ISO-8601 formatted date signifying the time at which the public key expires and is no longer active.
active (boolean) [optional]:A boolean value that answers: “Is the current public key active?”

Example:

{
    "service_id": "ce5ab88c-e79e-4049-bb36-4f8709122648",
    "key_id", "e2:f4:14:25:24:45:66:a2:c1:6f:d6:0c:c9:00:09:66",
    "date_expires": null,
    "active": false
}

Response

There is no response data.

Errors

403 Forbidden:If the Organization Service ID supplied belongs to an Organization other than the one identified by the provided credentials, a 403 Forbidden error will be returned.
400 Invalid / DIR-004:If the Organization Service ID supplied does not exist, a 400 Invalid Request response with the error code DIR-004 will be returned.
400 Invalid / KEY-003:If the key ID supplied does not exist for the Organization Service, a 400 Invalid Request response with the error code KEY-003 will be returned.

DELETE

Remove an existing public key from an Organization Service.

Request

Requests will be a JWE encrypted JSON payload with the following attribute:

service_id (string):The Identifier of the Organization Service in order to delete a public key.
key_id (string):The Identifier of the public key to delete.

Example:

{
    "service_id": "ce5ab88c-e79e-4049-bb36-4f8709122648",
    "key_id": "e2:f4:14:25:24:45:66:a2:c1:6f:d6:0c:c9:00:09:66"
}

Response

There is no response data.

Errors

403 Forbidden:If the Organization Service ID supplied belongs to an Organization other than the one identified by the provided credentials, a 403 Forbidden error will be returned.
400 Invalid / DIR-004:If the Organization Service ID supplied does not exist, a 400 Invalid Request response with the error code DIR-004 will be returned.
400 Invalid / KEY-003:If the key ID supplied does not exist for the Organization Service, a 400 Invalid Request response with the error code KEY-003 will be returned.
400 Invalid / KEY-004:If the key ID supplied is the only remaining key for the Organization Service, a 400 Invalid Request response with the error code KEY-004 will be returned.

User Contributed

LaunchKey links to user contributed code as a resource to its community. LaunchKey does not in any way guarantee or warrant the quality and security of these code bases. User contributed code is supported by the creators. If you do find a link from the site to user contributed code that is malicious or inappropriate in any way, please report that link to LaunchKey immediately and we will investigate the claim. Submit any issue to LaunchKey support at https://launchkey.com./support. ×