GET
/vault/custody-trustGet Custody Trust
Returns the values your key's trust policy must name before kibo can use the key: the AWS principal kibo calls from and the external id it sends, and the issuer and subject of the identity kibo federates as.
Read them before you grant kibo access to a BYOK key.
Needs PROJECT_ADMIN.
Parameters
| projectId * | query | The project's id. |
Responses
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | The values your trust policy names. | |
| 403 | The caller isn't a `PROJECT_ADMIN` of the project. | |
| 404 | No such project. | |
| 410 | The project's keys were destroyed. |
Response body (200)
| awsPrincipal | string | null | AWS: the principal the role's trust names. Absent until this deployment has one. Example: "arn:aws:iam::444455556666:role/kibo-custody" |
| externalId * | string | AWS: the role's trust requires this as Fixed for the project. Example: "k9o-mfrggzdfmztwq2lknnwg23tpobyxe43uov3ho6dzpiyx2mzqgu4a" |
| tenantIssuer | string | null | GCP and Azure: the token issuer to trust. Absent until this deployment has one. Example: "https://kibo.de01.k9o.example/tenant" |
| tenantSubject * | string | GCP and Azure: the only subject to accept. Example: "k9o:project:3f2b8c1e-5d4a-4e6f-9a7b-1c2d3e4f5a6b" |
TypeScript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.custody.trust()Showing example in TypeScript
Response example (200)
{
"awsPrincipal": "arn:aws:iam::444455556666:role/kibo-custody",
"externalId": "k9o-mfrggzdfmztwq2lknnwg23tpobyxe43uov3ho6dzpiyx2mzqgu4a",
"tenantIssuer": "https://kibo.de01.k9o.example/tenant",
"tenantSubject": "k9o:project:3f2b8c1e-5d4a-4e6f-9a7b-1c2d3e4f5a6b"
}