openapi: "3.1.0" info: title: Kryptkeeper API version: "1.2.1" description: Enterprise PKI and Crypto Trust Platform REST API license: name: Apache-2.0 identifier: Apache-2.0 servers: - url: /api/v1 description: Default # Scope (W1-01/G-5): this document covers the hub's own JSON REST surface, # served under /api/v1 (plus the root-scoped meta paths and /scim/v2/* # below, which override `servers` per-path). It deliberately EXCLUDES the # RFC-defined protocol servers mounted at /acme, /ocsp, /crl, # /.well-known/est, /scep, /cmp (RFC 4210), /wstep (MS-WSTEP) and /xcep # (MS-XCEP) — those use RFC/SOAP content-types and auth models, not this # REST API's conventions, and don't fit an /api/v1-scoped contract # document. /metrics (Prometheus text exposition) is excluded for the same # reason: telemetry, not a JSON REST resource. /scim/v2/* (W6-02) is # included despite being root-scoped and its own RFC (7644): it uses this # API's JSON conventions (application/scim+json is JSON) and its own # UserProvider, not a separate protocol engine, so it fits this document's # shape even though its auth (scimBearerAuth) is deliberately separate. security: - bearerAuth: [] components: securitySchemes: bearerAuth: type: http scheme: bearer description: Bootstrap token, JWT, OIDC, or API key (kk__) scimBearerAuth: type: http scheme: bearer description: >- SCIM's own shared-secret token (APP_SCIM_TOKEN, W6-02) -- a trust boundary deliberately separate from bearerAuth. An ordinary operator session (bootstrap/JWT/OIDC/API key) is never accepted here. schemas: CredentialSourceConfig: type: object description: Everything about a source that is not secret. properties: base_url: { type: string, description: "vault_kv2: the Vault or OpenBao address." } namespace: { type: string, description: "vault_kv2: X-Vault-Namespace." } mount: { type: string, description: "vault_kv2: the KV v2 mount path (default secret)." } approle_mount: { type: string, description: "vault_kv2: the AppRole auth mount (default approle)." } ca_cert_pem: { type: string, description: "vault_kv2: pins a private server CA (public material)." } plugin_id: { type: string, description: "plugin: the enabled credentials plugin." } cache_ttl_seconds: type: integer minimum: 0 maximum: 300 description: "0 (default) fetches at every use and keeps nothing; otherwise the fetched credential is held in memory this long." CredentialSource: type: object properties: id: { type: string } name: { type: string } kind: { type: string, enum: [vault_kv2, plugin] } tenant: { type: string } credential_ref: { type: string } config: { $ref: "#/components/schemas/CredentialSourceConfig" } created_at: { type: string } updated_at: { type: string } PrivilegePreflight: type: object required: [checked_at, mode, rows, ok, privileged_all] properties: checked_at: { type: string, format: date-time } mode: { type: string, enum: [none, nopasswd, password, helper] } roles: { type: array, items: { type: string, enum: [scan, install] } } ok: { type: boolean } privileged_all: { type: boolean } rows: type: array items: type: object required: [capability, status] properties: capability: { type: string, description: "ssh_auth, sudo_present, requiretty, nopasswd, password, helper_present, helper_sha, helper_sudo, command:, verb:" } status: { type: string, enum: [ok, fail, skipped] } detail: { type: string } fix: { type: string } PrivilegeBundle: type: object required: [mode, user, sudoers, checklist, warnings] properties: mode: { type: string, enum: [helper, nopasswd, password] } user: { type: string } sudoers: { type: string } helper: { type: string, description: POSIX sh helper source (helper mode only) } helper_sha256: { type: string } helper_path: { type: string } checklist: { type: array, items: { type: string } } warnings: { type: array, items: { type: string } } ESTLabel: type: object description: A named EST endpoint bound to one template (W26-06). properties: label: { type: string } template_id: { type: string } description: { type: string } created_by: { type: string } created_at: { type: string, format: date-time } updated_at: { type: string, format: date-time } url: { type: string, description: "/.well-known/est/