Skip to content
qibdo qibdo
v1
API version
  • v1
Theme
Book a demo

Generate Kubernetes Token

POST
/vault/v1/workspaces/{workspace}/engines/qibdo/kubernetes/{source_role}/tokens
curl --request POST \
--url https://example.com/vault/v1/workspaces/example/engines/qibdo/kubernetes/example/tokens \
--header 'Content-Type: application/json' \
--data '{ "workspace": "example", "source_role": "example", "kubernetes_namespace": "example", "cluster_role_binding": true, "ttl_seconds": "example" }'

Issues a short-lived workload-identity ServiceAccount token bound to the workspace workload-identity engine mount and the supplied the vault backend role. The bound ServiceAccount, allowed namespaces, and audience scopes are configured out-of-band by a vault administrator. Bound to a QibdoLease.

workspace
required
string

The workspace to issue the workload-identity ServiceAccount token under.

source_role
required
string

The pre-configured workload-identity role that binds the ServiceAccount, allowed namespaces, and audience scopes.

Media type application/json

Request payload for Generate Workload Qibdo Token

Carries the input fields required to generate workload qibdo token.

object
workspace
required

The workspace to issue the workload-identity ServiceAccount token under.

string
source_role
required

The pre-configured workload-identity role that binds the ServiceAccount, allowed namespaces, and audience scopes.

string
kubernetes_namespace

Optional workload-identity namespace for the ServiceAccount binding. Required when the role allows multiple namespaces; ignored when the role pins a single namespace.

string
cluster_role_binding

Whether the role binding is cluster-wide (true) or namespace-scoped (false).

boolean
ttl_seconds

Optional override of the role’s default TTL in seconds.

string
Example generated
{
"workspace": "example",
"source_role": "example",
"kubernetes_namespace": "example",
"cluster_role_binding": true,
"ttl_seconds": "example"
}

OK

Media type application/json

Response payload from Generate Workload Qibdo Token

Carries the output produced by generate workload qibdo token.

object
token

The raw bearer token. Returned exactly once — clients MUST persist it before the lease expires.

stringOutput only
service_account_name

The bound ServiceAccount name as resolved by the engine.

stringOutput only
service_account_namespace

The bound ServiceAccount namespace as resolved by the engine.

stringOutput only
lease

The lease metadata that governs the token’s lifetime.

object
id

The unique identifier of the lease (UUID).

stringOutput only
workspace_id

The workspace this lease belongs to (UUID, weak reference to taxonomy).

stringOutput only
principal_id

The principal (IAM user / service account) the lease was issued to.

stringOutput only
ttl

Initial time-to-live for the lease.

stringOutput only
/^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$/
max_ttl

Maximum total lifetime including renewals — capped by the engine.

stringOutput only
/^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$/
renewable

Whether the lease can be renewed.

booleanOutput only
revocable

Whether the lease can be revoked early.

booleanOutput only
issued_at

Timestamp when the lease was issued.

string format: date-time Output only
expires_at

Timestamp when the lease expires (may be extended by RenewQibdoLease).

string format: date-time Output only
status

Current lifecycle status of the lease.

string format: enum Output only
Allowed values: LEASE_STATUS_UNSPECIFIED LEASE_STATUS_ACTIVE LEASE_STATUS_RENEWED LEASE_STATUS_REVOKED LEASE_STATUS_EXPIRED
source_type

The engine that produced this lease (database / cloud_aws / cloud_gcp / cloud_azure / ssh / kubernetes).

string format: enum Output only
Allowed values: LEASE_SOURCE_TYPE_UNSPECIFIED LEASE_SOURCE_TYPE_DATABASE LEASE_SOURCE_TYPE_CLOUD_AWS LEASE_SOURCE_TYPE_CLOUD_GCP LEASE_SOURCE_TYPE_CLOUD_AZURE LEASE_SOURCE_TYPE_SSH LEASE_SOURCE_TYPE_KUBERNETES
source_role

Engine-specific role identifier the lease was issued against (e.g., the vault database role name for database leases).

stringOutput only
engine_lease_id

The engine-side lease identifier (e.g., vault lease ID). Used as the prefix key for bulk-revoke operations.

stringOutput only
created

Timestamp when the lease metadata row was created (server-managed).

string format: date-time Output only
updated

Timestamp when the lease metadata was last modified (server-managed).

string format: date-time Output only
location_id

Weak reference to a topology Location — where this resource resides. Defaults to the global location when omitted at creation and is immutable thereafter. Only the global location is available in this release.

stringOutput only
Example
{
"lease": {
"status": "LEASE_STATUS_UNSPECIFIED",
"source_type": "LEASE_SOURCE_TYPE_UNSPECIFIED"
}
}

Default error response

Media type application/json

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.

object
code

The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

integer format: int32
message

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.

string
details

A list of messages that carry the error details. There is a common set of message types for APIs to use.

Array<object>

Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.

object
@type

The type of the serialized message.

string
key
additional properties
any
Example generated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}