Security
Kilimanjaro's security surface unifies four concerns behind a single API: a closed RBAC enumeration carried in JWT claims, a comprehensive audit ledger queryable and exportable from every project, transport hardened to TLS 1.2+ with HSTS preload, and project-scoped API keys. The four-layer anti-injection posture is its own surface — see the threat model.
1. Identity model
1.1 Platform roles operate at two scopes
Kilimanjaro uses a closed RBAC enumeration scoped to either the org or the project. Roles are carried in JWT bearer tokens (or opaque session tokens) and enforced by the API gateway before any business logic runs.
This section specifies platform roles — the API-facing enumeration that governs what a caller may do. A separate enumeration — DB credential roles — governs Postgres operations at the storage layer; that enumeration is not visible to API callers.
1.2 Org-level roles
| Role | Description |
|---|---|
ORG_OWNER | Sole owner of the org. Full org control including billing ownership. Implicit PROJECT_ADMIN on every project in the org. Cannot be removed from the org by another member; ownership transfer is a separate flow. Exactly one ORG_OWNER per org at all times. |
ORG_ADMIN | Full org management except billing-ownership transfer. Implicit PROJECT_ADMIN on every project. Can invite and remove org members (including other ORG_ADMIN members, but not the ORG_OWNER). |
ORG_BILLING_ADMIN | Billing and subscription management. Can view and manage tier, payment methods, and invoice history. Views org-level metadata at the ORG_MEMBER floor for non-billing resources. No implicit project access. |
ORG_MEMBER | Default org member. Can view org-level metadata (org name, project list). No implicit project access — must be granted a project-level role per project. |
1.3 Project-level roles
| Role | Description |
|---|---|
PROJECT_ADMIN | Full project control: configure auth providers, manage policies, run migrations, manage project members, initiate project deletion. |
PROJECT_EDITOR | Read and write data per the project's JSON policies, with elevated trust. May access non-current object versions in storage where policy grants it. Cannot manage members, auth providers, or billing. |
PROJECT_MEMBER | Read and write data within the project's JSON policies. Cannot modify project settings. |
PROJECT_VIEWER | Read-only data access within the project's JSON policies. Writes are rejected at the RBAC check before policy evaluation. |
PROJECT_AUDITOR | Read-only data access at the PROJECT_VIEWER floor, plus explicit read access to the audit log (§2.4 and §2.5) without holding PROJECT_ADMIN. Intended for compliance reviewers who must not hold write authority. |
PROJECT_AUTHOR | Authoring authority on metadata system tables: Views, Forms, Workflows, Dashboards, and Maker-Checker policies. Manages Pin-folder hierarchy. Issues delegation grants within their approver authority. A separate-dimension cut on the role lattice — does NOT compose into the project-ladder hierarchy as a tier. Typical pattern: PROJECT_AUTHOR + (project-ladder role). |
PROJECT_ANALYST | Consumer authority on Pathmaker-authored surfaces: consumes Views, Dashboards, Forms within the Workspace-mode chrome; submits and edits cells within View permissions; participates as approver or approvee in Maker-Checker flows. Also a separate-dimension cut on the role lattice. Typical pattern: PROJECT_ANALYST alone (default Workspace landing) or PROJECT_ANALYST + PROJECT_AUTHOR (the canonical Business power-user). |
PROJECT_END_USER | The customer's customers — project-level end-user identity carried via Gate (IAK) authentication flows. Lives in a Trust Zone separate from the operator quartet (Architect / Warden / Pathmaker / Scout); bounded to user-collection tables; cannot cross to system or extension schemas. Subject to Native-mode auto-scoping policies. |
1.4 Service accounts and tokens
Service tokens carry a project-level role bounded to PROJECT_ADMIN, PROJECT_EDITOR, PROJECT_MEMBER, PROJECT_VIEWER, or PROJECT_AUDITOR. Service tokens are project-scoped — they are not org-level actors. A service token with PROJECT_ADMIN has the same API rights as a human PROJECT_ADMIN within that project.
PROJECT_AUTHOR, PROJECT_ANALYST, and PROJECT_END_USER are NOT service-token-bound. Author and Analyst authorities are human-mode capabilities operating through the Console and Workspace surfaces; End-User identity is bound to records in the end-user table family and issued via Gate flows.
The anon key (§4.1) is a special case: callers using the anon key receive subject.role = "anon" and are subject only to the project's JSON policies.
1.5 Workload identities
Operators and end-users are human principals; a workload identity is a machine one — a service, CI job, or agent authenticating as itself rather than borrowing a human's credentials or a static key. Workload identities carry swi_ (Standard) or cwi_ (Confidential, hardware-attested) subject prefixes, and they are not members of the role lattice above: a workload's authority is the scope granted at registration, evaluated at the point of use, not a roles claim. Their full model — bound-key and OIDC-federation for SWIs, hardware-attestation minting for CWIs, and the assurance tiers each reaches — is covered in Gate → Workload Identities.
1.6 Implicit grants and composition
| Caller's org role | Effective project role |
|---|---|
ORG_OWNER | PROJECT_ADMIN on all org projects |
ORG_ADMIN | PROJECT_ADMIN on all org projects |
ORG_BILLING_ADMIN | None — explicit project-level grant required |
ORG_MEMBER | None — explicit project-level grant required |
(any org role) → PROJECT_AUTHOR / PROJECT_ANALYST | None — explicit-grant-only; never auto-granted from an org role |
(any org role) → PROJECT_END_USER | None — bound to end-user records, never to operator identities |
Explicit project-level grants compound with implicit org-level grants along the project-ladder dimension; the highest effective role applies. PROJECT_AUTHOR and PROJECT_ANALYST are additive authorities on separate lattice dimensions — neither compounds into the project-ladder hierarchy. A user with PROJECT_MEMBER + PROJECT_AUTHOR holds both: data-access rights of PROJECT_MEMBER plus authoring rights on metadata tables.
Create the client once
import { createClient } from "@k9o/core";
const k9o = createClient({
orgSlug: "acme",
projectSlug: "task-app",
apiKey: process.env.K9O_API_KEY,
});Security · D3: Identity and RBAC
What the SDK has: end-user role grants (grant, list, revoke) under k9o.endUsers, the end-user list, and the organisation's member list. Roles are free strings (1 to 128 characters), not a fixed list.
// 1. Pick an end user.
const { data: users } = await k9o.endUsers.list({ limit: 1 });
const user = users[0]!;
// 2. Grant a role. Granting a role the user already holds is a 400.
const { data: grant } = await k9o.endUsers.roleGrants.grant({ endUserId: user.id, role: "task-app-viewer" });
console.log(grant.id, grant.role, `granted by ${grant.grantedBy}`);
// 3. List that user's active grants.
const { data: grants } = await k9o.endUsers.roleGrants.list({ endUserId: user.id });
console.log(grants.map((g) => g.role));
// 4. Revoke. The grant is kept and marked revoked; an unknown id answers { revoked: false }.
const { data: revoked } = await k9o.endUsers.roleGrants.revoke(grant.id);
console.log(revoked);eurg_7Kd2mQ task-app-viewer granted by usr_example
[ "task-app-viewer" ]
{ revoked: true, revokedAt: "2026-10-27T17:57:34.047Z" }- The grant and revoke answers have the fields
id,endUserId,role,grantedAtandgrantedBy, andrevokedandrevokedAt. - Granting and revoking need the project admin role; reading grants is open to a wider set of project roles. Listing end users needs the project admin role.
- Policy bundles:
k9o.policies(list, create, validate, get, update, delete, publish) is the SDK surface for the project's policy documents; authoring needs an authoring role and publishing needs a custodian role.
1.7 Role carriage in tokens
JWT bearer tokens carry roles and groups claims scoped to the issuing project:
{
"sub": "usr_abc123",
"iss": "https://api.k9o.io",
"aud": "k9o.api",
"proj_id": "proj_kQ3pZ9rL2sW8",
"org_id": "org_def456",
"roles": ["PROJECT_MEMBER", "PROJECT_AUTHOR"],
"groups": ["finance-team", "engineering-leads"],
"iat": 1746192000,
"exp": 1746195600
}
iss is the issuer configured for the deployment, and aud is k9o.api for operator and service tokens. End-user tokens issued through Gate declare a regional issuer and carry the project id as aud. ORG_OWNER and ORG_ADMIN callers receive "roles": ["PROJECT_ADMIN"] in every project JWT within their org, derived from the implicit-grant rule.
The roles array is the closed enumeration per record-type. For operator-class JWTs (subject.id = "usr_<base62>") it covers the project-ladder roles plus the Business-persona lattice cuts (PROJECT_AUTHOR / PROJECT_ANALYST). For end-user JWTs (subject.id = "eu_<base62>") it carries PROJECT_END_USER plus application-level role grants from the end-user-role-grants table; end-user JWTs never carry operator-class roles.
groups is the union of all groups the user belongs to drawn from the org's Group registry — both platform-sourced and IdP-federated groups appear uniformly. Both roles and groups reflect state as of token-issue time; group-membership changes take effect at the next token issuance. Service tokens carry "groups": []. Both claims are available in JSON-policy ABAC expressions as subject.roles and subject.groups.
1.8 API enforcement model
Every API endpoint carries a minimum caller role. The edge enforces the role check before forwarding the request to the origin. Callers that do not meet the minimum are rejected with K9O_ACCESS_DENIED (HTTP 403) before any business logic executes.
Role checks are additive with JSON-policy evaluation: RBAC checks first; if the RBAC check passes, the JSON policy is evaluated as the second access-control layer. A caller with PROJECT_ADMIN is still subject to the project's JSON policies unless the policy explicitly grants elevated access.
2. Audit log
2.1 Common event envelope
The audit-log query returns each event in a common JSON envelope:
{
"id": "evt_kQ3pZ9rL2sW8",
"type": "data.write.auth.signin",
"actorId": "eu_abc123",
"targetKind": null,
"targetId": null,
"payload": {},
"occurredAt": "2026-05-02T14:30:22.123Z",
"requestId": "req_ghi789",
"traceId": "trc_jkl012"
}
| Field | Type | Notes |
|---|---|---|
id | string | evt_ + base62 (12 chars) per the conventions resource-ID catalogue |
type | string | Dot-separated hierarchy (e.g., data.write.auth.signin, storage.bucket.deleted); the query's eventType filter matches it by prefix |
actorId | string | null | The identity that caused the event; null for platform-originated events |
targetKind, targetId | string | null | The resource the event acted on, when there is one |
payload | object | Event-specific payload; schema varies by type |
occurredAt | ISO 8601 | When the event was recorded |
requestId, traceId | string | null | Correlation identifiers for the originating request |
2.2 Event catalogue
Audit events are organised into eight families. The catalogue covers identity lifecycle, data operations, storage, security posture, project lifecycle, extension lifecycle, and end-user identity events (the data.write.auth.* family attached to Gate flows).
| Family | Prefix | Examples |
|---|---|---|
| Operator auth | auth.* | auth.session.created, auth.mfa.verified, auth.token.created, auth.identity_provider.test |
| End-user identity (Gate flows) | data.write.auth.* | data.write.auth.signup, data.write.auth.signin, data.write.auth.passkey_registered, data.write.auth.role_granted |
| Data plane | data.* | data.migration.applied, data.collection.created, data.export.completed, data.branch.merged |
| Storage | storage.* | storage.bucket.created, storage.object.deleted, storage.lifecycle.purged |
| Security posture | security.* | security.injection.detected, security.rls.blocked, security.custody.changed |
| Lifecycle | lifecycle.* | lifecycle.project.deprovisioned, lifecycle.org.deleted |
| Extensions | extension.* | extension.enabled, extension.purged, extension.hook_delivery |
| Approval (Maker-Checker) | data.write.approval.* | Approval chain events paired with Maker-Checker-gated actions |
The full per-event-type catalogue lives in the spec chapter linked above; the families and their payload schemas form the binding contract.
Forensic attribution. Every data.write.auth.* event captures the actual identity of both the actor and (where applicable) the affected end-user. Operator-class actors use usr_<base62> (admin functions like end-user creation by support staff); end-user actors use eu_<base62> (self-service flows). PII column values are excluded from payload — field names appear, field values do not — preserving the audit channel's PII-tightness while keeping forensic depth.
2.3 Storage and retention
Audit events are written to the project's system audit-log table using synchronous Postgres commit — audit events do not survive primary failover at the cost of being lost. Two retention tiers:
| Tier | Window | Storage | Access |
|---|---|---|---|
| Hot | 28 days (default) | Postgres audit-log table | Queryable via the audit-log query API |
| Cold | Up to 7 years (business-preference cap), unbounded under a legal-obligation basis | Long-term archival bucket | Retrievable only via export |
After the hot-tier TTL, events are tiered to cold storage automatically and the hot-tier rows are deleted.
The hot window is a per-project policy value, not a fixed default, and shortening it is treated as a destructive security action — an operator whose account is taken over could otherwise drop retention to erase the record of their own activity. So the two directions get two procedures: raising the window is safe and takes effect directly (POST .../audit-retention/increase), while reducing it (POST .../audit-retention/reduce, cancellable within a grace window via .../reduce/cancel) requires MFA step-up and a distinct second approver. A hard 28-day floor underneath all of this cannot be crossed by any tier, attestation, or business preference — it exists specifically to hold even against a single compromised operator. Requests below the floor return K9O_RETENTION_BELOW_FLOOR (400); a reduction beyond the business-preference cap returns K9O_RETENTION_BUSINESS_PREFERENCE_CAP_EXCEEDED (400); a second reduction while one is already pending returns K9O_RETENTION_REDUCTION_ALREADY_PENDING (409).
2.4 Audit log query API
GET /@<projectSlug>/audit-log
Returns a paginated list of audit events. Standard cursor pagination.
Request parameters:
| Parameter | Type | Description |
|---|---|---|
eventType | string | Prefix match on the stored event type (e.g., data.write.approval matches data.write.approval.approved); glob patterns are not supported |
actorId | string | Filter by actor |
after | ISO 8601 | Events after this timestamp (exclusive) |
before | ISO 8601 | Events before this timestamp (exclusive) |
limit | integer | Page size, 1 to 200 (default 50) |
cursor | string | Opaque cursor from the previous page's meta.cursor.next |
Results are newest first; meta.cursor.next carries the cursor for the next page when more events remain.
Auth: PROJECT_ADMIN or PROJECT_AUDITOR minimum. PROJECT_EDITOR and below (excluding PROJECT_AUDITOR) receive K9O_ACCESS_DENIED (403).
Create the client once
import { createClient } from "@k9o/core";
const k9o = createClient({
orgSlug: "acme",
projectSlug: "task-app",
apiKey: process.env.K9O_API_KEY,
});Security · D4: Audit Trails
k9o.audit.query reads the project's audit log, newest first, with filters (eventType, actorId, after, before), limit and a cursor. It needs the AUDIT_READER role at minimum.
// Filter and page. Each page's meta.cursor.next is the next page's cursor; null means done.
let cursor: string | undefined;
let total = 0;
for (let page = 1; page <= 3; page++) { // bounded here; drop the bound to read everything
const { data: events, meta } = await k9o.audit.query({
eventType: "data.write.access.insert",
after: new Date(Date.now() - 7 * 86_400_000).toISOString(),
limit: 25,
cursor,
});
total += events.length;
console.log(`page ${page}: ${events.length} events`);
cursor = (meta.cursor as { next: string | null }).next ?? undefined;
if (cursor === undefined) break;
}
console.log(`${total} events read`);page 1: 25 events
page 2: 25 events
page 3: 25 events
75 events read2.5 Audit log export
Exporting the audit log is an asynchronous job on the project's data-export surface:
POST /@<projectSlug>/exit/export
Creates the export job and returns 202 Accepted immediately with the job ID; poll the job, then download the file.
Request body:
{
"scope": { "auditLog": true }
}
| Field | Type | Notes |
|---|---|---|
scope.auditLog | boolean | Selects the audit log. The same call can select other data classes (collections, files, keyMetadata, subscriptions) in one job |
delivery.method | "signed_url" | "byos" | Optional. signed_url (default) is downloaded through the gateway; byos writes the archive to your own bucket |
Response (202):
{
"data": { "id": "xpj_kQ3pZ9rL2sW8", "status": "pending", "deliveryMethod": "signed_url" }
}
Poll for completion:
GET /@<projectSlug>/exit/export/<jobId>
{
"data": {
"id": "xpj_kQ3pZ9rL2sW8",
"status": "completed",
"scope": { "auditLog": true },
"deliveryMethod": "signed_url",
"artifactSize": 1048576,
"downloadPath": "/exit/export/xpj_kQ3pZ9rL2sW8/download",
"expiresAt": "2026-05-03T14:30:22Z",
"error": null
}
}
status moves from pending through running to completed, or to failed with error set. Once completed, fetch the file with an authenticated GET /@<projectSlug>/exit/export/<jobId>/download before expiresAt; the gateway streams it. A byos job has no downloadPath — the archive lands in your bucket.
Auth: PROJECT_ADMIN minimum.
2.6 SIEM integration
POST /@<projectSlug>/security/siem — create
PATCH /@<projectSlug>/security/siem — update
GET /@<projectSlug>/security/siem — read
DELETE /@<projectSlug>/security/siem — remove
Auth: PROJECT_ADMIN minimum on all four endpoints.
Create or update body (all fields optional on PATCH):
{
"enabled": true,
"webhookUrl": "https://siem.example.com/k9o-events",
"hmacSecretRef": "<reference to the stored signing secret>",
"eventTypes": ["security.*", "auth.*"],
"retryBudget": 5,
"format": "json"
}
| Field | Type | Notes |
|---|---|---|
enabled | bool | Optional |
webhookUrl | string | Required on create; HTTPS only |
hmacSecretRef | string | A reference to the stored HMAC signing secret, never the secret itself |
eventTypes | string[] | Glob patterns; absent or null = all event types |
retryBudget | integer | Optional, 1 to 20 |
format | "json" | "cef" | "leef" | Payload format |
POST returns 409 if a SIEM configuration already exists; use PATCH to change it. DELETE answers 200 with the cleared configuration row, not 204.
Delivery mechanics. Events are delivered as HTTP POST to webhookUrl within 5 seconds of emission. Each delivery carries an X-K9O-Signature header containing sha256=<HMAC-SHA256(body, secret)> — the SIEM endpoint must verify this signature before processing. Delivery is at-least-once. Failed deliveries (non-2xx response or > 10s timeout) are retried with exponential backoff (initial 30s, max 15min, for up to 48h). After 48h of delivery failure, forwarding pauses and a security.siem.delivery_failed audit event is emitted; the SIEM config remains enabled and delivery resumes automatically once the endpoint is reachable again.
Test endpoint
POST /@<projectSlug>/security/siem/test
Takes no body. It is a dry run: it reports what would be sent to the configured webhook and sends nothing.
{
"data": {
"dryRun": true,
"webhookUrl": "https://siem.example.com/k9o-events",
"format": "json",
"wouldSendSample": { "type": "k9o.siem.probe", "projectId": "proj_abc123", "timestamp": "2026-05-02T14:30:22Z" }
}
}
| Outcome | HTTP status | Code |
|---|---|---|
| Dry run returned | 200 OK | — |
| No webhook configured yet | 409 | K9O_STATE_CONFLICT |
3. Transport security
3.1 TLS requirements
All API and CDN traffic is carried over TLS. The platform enforces at the edge:
| Property | Requirement |
|---|---|
| Minimum version | TLS 1.2 |
| Preferred version | TLS 1.3 (negotiated by default) |
| TLS 1.2 cipher suites | Forward-secrecy only: ECDHE-RSA-AES-256-GCM-SHA384, ECDHE-RSA-AES-128-GCM-SHA256, ECDHE-RSA-CHACHA20-POLY1305 |
| TLS 1.3 cipher suites | Native forward secrecy; all RFC 8446 mandatory suites |
| TLS 1.0 / 1.1 / SSLv3 | Hard-rejected at the TCP layer; never negotiated |
SDK clients validate the server certificate against the system trust store. The SDK does not expose a TLS-verification-disable option in production configuration — any such option is a local-development-only affordance and is rejected by the edge for production project credentials.
3.2 HSTS
HSTS is enforced on all API and CDN endpoints:
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
The platform appears on the HSTS preload list. The 1-year max-age is the minimum for preload-list submission.
3.3 Certificate management
TLS certificates are managed via automated rotation. Rotation is transparent to callers — session-ticket resumption maintains in-flight connections across rotation events. Certificate expiry is monitored by the platform; an alert is raised at 30 days before expiry. Expired certificates are not served.
4. Credential security
4.1 API keys
Each project has two platform-level API keys:
| Key type | Description | Embed in client code? |
|---|---|---|
anon | Public key for unauthenticated access. Grants subject.role = "anon" claims; subject to JSON policies. | Yes — safe to expose |
service_role | Secret key for server-side service operations. May be granted elevated access via JSON policies. | No — server-side only |
Create the client once
import { createClient } from "@k9o/core";
const k9o = createClient({
orgSlug: "acme",
projectSlug: "task-app",
apiKey: process.env.K9O_API_KEY,
});Security · D2: Key Management
What the SDK has: the project's key inventory (k9o.keys.list, get, rotate), vault secrets (create, get, reveal, rotate, update, list, delete; see the Kibo vault tabs) and read-only custody status (D5).
// Metadata only: no key material, and not the identifier of an external key.
const { data } = await k9o.keys.list({ status: "all" }); // active key only unless you pass "all"
for (const k of data.items) {
// byokRef / hyokRef are null for a platform-managed key.
console.log(k.id, `v${k.version}`, k.status, k.custodyMode, k.rotatedAt, k.byokRef, k.hyokRef);
}
const { data: key } = await k9o.keys.get(data.items[0]!.id);
console.log(`${key.id} v${key.version} ${key.status} rotated ${key.rotatedAt}`);vkey_4f1c9a2e v1 active PLATFORM_MANAGED null null null
vkey_4f1c9a2e v1 active rotated null- Needs the project admin or auditor role and a person's credential (end-user, extension, service and workload tokens are refused). A key is
{ id, version, status, custodyMode, createdAt, rotatedAt, byokRef, hyokRef };statusisactive,rotatingorrevoked. For a BYOK keybyokRefis{ provider, region, externalKeyFingerprint }, for HYOKhyokRefis{ clusterId, clusterName, externalKeyFingerprint }. The list is not paged.
4.2 DB credential isolation (reference)
The platform operates six Postgres credential roles per project, each scoped to a single duty: data-plane reads and writes, DDL and migrations, read-only backup, streaming replication, bulk export, and destructive de-provisioning. DB credentials are never exposed as raw Postgres connections to API callers — they are an internal isolation primitive that bounds the blast radius of any single credential compromise.
4.3 Customer-managed and attested custody (SKR / BYOK / HYOK)
Beyond the default Platform-Managed custody, a project can move to SKR (Secure Key Release — keys released only to hardware-attested code), BYOK (customer keys in a cloud KMS), or HYOK (customer keys in a customer-administered HSM). Under BYOK and HYOK, data at rest in Postgres and object storage is encrypted under customer-held keys the platform never sees in plaintext; SKR keeps the key platform-managed but gates its release on attestation. The full custody ladder and its transition surface are documented in the Kibo reference. Every transition emits a security.custody.changed audit event with from and to values for forensic continuity.
Create the client once
import { createClient } from "@k9o/core";
const k9o = createClient({
orgSlug: "acme",
projectSlug: "task-app",
apiKey: process.env.K9O_API_KEY,
});Security · D1: Encryption-as-a-Service
What the SDK has: client-side field encryption in @k9o/kibo (encrypt, decrypt), which runs against the customer's own key service (plaintext and keys never reach the platform), and server-side encryption at the API, k9o.crypto.encrypt / decrypt / rewrap (SDK 1.5.0), where the platform encrypts a payload you send it.
import { encrypt, decrypt } from "@k9o/kibo";
const context = [{ key: "tenant", value: "acme" }]; // bound into the envelope; supply it again to decrypt
const credential = { secret: process.env.KMS_TOKEN!, expires_at_unix_secs: Math.floor(Date.now() / 1000) + 900 };
const { envelope } = await encrypt({
provider: "aws-kms",
posture: "byok",
kms_cred: credential,
key_ref: { version: 1, external_ref: "arn:aws:kms:eu-central-1:111122223333:key/example" },
provider_config: { aws_region: "eu-central-1" },
attestation_tier: "software",
encryption_context: context,
plaintext: new TextEncoder().encode("4111 1111 1111 1111"),
});
const { plaintext } = await decrypt({
kms_cred: credential,
provider_config: { aws_region: "eu-central-1" },
envelope,
strategy: "local_envelope",
attestation_tier: "software",
encryption_context: context,
});
console.log(new TextDecoder().decode(plaintext));4111 1111 1111 1111- It needs the customer's own key service, a short-lived credential for it, and the SDK's native engine.
Create the client once
import { createClient } from "@k9o/core";
const k9o = createClient({
orgSlug: "acme",
projectSlug: "task-app",
apiKey: process.env.K9O_API_KEY,
});Security · D5: HYOK
k9o.custody.status() is read-only. It needs the project admin or auditor role; changing custody is a Console action. The answer: mode, attached (an external key source is attached), provider (platform, external_kms or hsm), lastJob (the latest custody job, or null), and hsm (details of the hardware security module; present only when provider is hsm, otherwise null).
const { data: status } = await k9o.custody.status();
console.log(JSON.stringify(status));{"mode":"PLATFORM_MANAGED","attached":false,"provider":"platform","lastJob":null,"hsm":null}