Your suggested change has been received. Thank you.

close

Suggest A Change

https://thales.na.market.dpondemand.io/docs/dpod/services/kmo….

back

Related APIs

Encrypting Private Keys (wrapprivatekey)

search

Encrypting Private Keys (wrapprivatekey)

The POST /v1/cckm/GoogleWorkspaceCSE/endpoints/{id}/wrapprivatekey API is called to encrypt the end user' private key. This API returns an opaque binary object (wrapped private key) that is uploaded by the user to Google using the Gmail API client libraries.

Syntax

curl -k 'https://127.0.0.1/api/v1/cckm/GoogleWorkspaceCSE/endpoints/{id}/wrapprivatekey' -H 'Content-Type: application/json' --data-binary $'{\n  "private_key": "<private key>",\n  "perimeter_id": "<perimeter id>"\n}' --compressed

Request Parameters

Parameter Type Description
id string ID of the endpoint. To find out the ID of an endpoint, refer to Viewing KACLS Endpoints.
private_key string PEM encoded PKCS#1 or PKCS#8 (unencrypted) RSA private key.
perimeter_id string ID of the perimeter to encrypt with the key.

Example Request

curl -k 'https://127.0.0.1/api/v1/cckm/GoogleWorkspaceCSE/endpoints/7d03-4e2d-c1583936-a0ae-3a1ae2d2e200/wrapprivatekey' -H 'Content-Type: application/json' --data-binary $'
{
    "private_key": "-----BEGIN RSA PRIVATE KEY-----\\<a long string of characters>\\n-----END RSA PRIVATE KEY-----",
    "perimeter_id": ""
}' --compressed

Example Response

{
"wrapped_private_key":
    "LpyCSy5ddy82PIp/87JKaMF4Jmt1KdrbfT1iqpB7uhVd3OwZiu+oq8kxIzB7Lr0iX4aOcxM6HiUyMrGP2P
    G8x0HkpykbUKQxBVcfm6SLdsqigT9ho5RYw20M6ZXNWVRetFSleKex4SRilTRny38e2ju/lUy0KDaCt1hDU
    T89nLZ1wsO3D1F3xk8J7clXv5fe7GPRd1ojo82Ny0iyVO7y7h1lh2PACHUFXOMzsdURYFCnxhKAsadccCxp
    CxKh5x8p78PdoenwY1tnT3/X4O/4LAGfT4fo98Frxy/xtI49WDRNZi6fsL6BQT4vS/WFkybBX9tXaenCqlR
    BDyZSFhatPQ==",
}

Response Codes

Response Code Description
2xx Success
4xx Client errors

Refer to HTTP status codes for details.