Skip to main content
When the service runs with CYBORGDB_SERVICE_ROOT_KEY set, the Python SDK exposes per-index user provisioning on EncryptedIndex. These calls require the client to be using the root API key.
See Multi-Tenancy & RBAC for the operator-side playbook (modes, key kinds, KMS-backed constraint).

create_user

Mint a per-user API key scoped to this index.

Parameters

Returns

Dict[str, str] with two keys:
The api_key is shown only in this response and is never persisted by the service. Hand it to the user securely. If lost, revoke and re-mint.

Example

Exceptions

  • ValueError: invalid permissions, missing root key, RBAC not enabled, or service-side failure.

list_users

List the users provisioned for this index.

Returns

A list of dicts, each with:

Example

Exceptions

  • ValueError: missing root key, RBAC not enabled, or service-side failure.

delete_user

Revoke a user. Erases their wrapped DEK(s) for this index — even a captured cdbk_… token becomes useless on the next request. No propagation lag.

Parameters

Example

Exceptions

  • ValueError: invalid user_id, missing root key, RBAC not enabled, or service-side failure.