Adding Google Cloud Key Rings
Use the post /v1/cckm/google/add-key-rings
API to add the list of Google Cloud key rings to a project linked with a Google Cloud connection. These key rings can be managed through CCKM on the CipherTrust Manager.
Syntax
curl -k '<IP>/api/v1/cckm/google/add-key-rings' -H 'Authorization: Bearer AUTHTOKEN' -H 'Content-Type: application/json' --data-binary $'{\n "project_id": "<project_id>",\n "connection": "<connection>",\n "key_rings": [\n\x09\x09{\n\x09\x09\x09"name": "<key-ring-with-full-url>"]\n}' --compressed
Request Parameters
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
connection | string | Name or ID of the Google Cloud connection on the CipherTrust Manager. |
key_rings | array of JSONs | Names of the Google Cloud key rings to be added. |
project_id | string | Name or ID of the project in which the Google Cloud key ring is to be added. To determine the project ID, run the post /v1/cckm/google/get-projects or get /v1/cckm/google/projects API. Refer to Fetching a Project from GCP or Viewing Google Cloud Projects. |
Example Request
curl -k 'https://127.0.0.1/api/v1/cckm/google/add-key-rings' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhOGY3N2IxZS1lOTY2LTQwMjEtODRjMC01YjZiNjAzMTBmOWEiLCJzdWIiOiJsb2NhbHwzM2Y5ZDFmNi04MjJiLTQ0NTItOGM4MC1mYzM0ZGYyZTI3OGQiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiNjcyMjMzMDAtYjU2ZC00ZmVmLTkwMDEtZGE1NGY2ZDdiMzY4Iiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6ImFmMTFhYjM0LTFiNmQtNGY0Zi04ZTEzLTAxOGQ2ZGJlOTZlZiIsImlhdCI6MTYyMDE5NTM4OSwiZXhwIjoxNjIwMTk1Njg5fQ.PLhevpNJb6SRNJwkSZ8k_n_YpZlyU6-Fv8kkYfvsh3Q' -H 'Content-Type: application/json' --data-binary $'{\n "project_id": "gemalto-kyloeng",\n "connection": "gcp-connection",\n "key_rings": [\n "name": "projects/gemalto-kyloeng/locations/global/keyRings/demo-key-ring"\n}' --compressed
Example Response
{
"id": "5cb2782e-6825-454b-9ae8-559318a1ae64",
"uri": "kylo:kylo:cckm:gcp-ring:5cb2782e-6825-454b-9ae8-559318a1ae64",
"account": "kylo:kylo:admin:accounts:kylo",
"application": "ncryptify:gemalto:admin:apps:kylo",
"devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
"createdAt": "2021-05-05T06:19:44.595961569Z",
"updatedAt": "2021-05-05T06:19:44.595961749Z",
"key_rings_data": [
{
"name": "projects/gemalto-kyloeng/locations/global/keyRings/demo-key-ring",
"key_ring_id": "demo-key-ring",
"location": "global",
"project_id": "gemalto-kyloeng",
"project_name": "projects/gemalto-kyloeng",
"connection": "gcp-connection",
"cloud_name": "gcp",
"organization_name": "organizations/123456789012",
"organization_display_name": "123456789012"
}
]
}
The sample output displays that the Google Cloud key ring projects/gemalto-kyloeng/locations/global/keyRings/demo-key-ring
is added to "project_id": "gemalto-kyloeng"
at "location": "global"
over the specified Google Cloud connection.
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.