CYBORGDB_SERVICE_ROOT_KEY set, the Go 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).
CreateUser
Mint a per-user API key scoped to this index.Parameters
Returns
Example
Errors
- Returns error if
permissionsis empty/invalid, the client is not using the root key, or RBAC is not enabled.
ListUsers
List the users provisioned for this index.Returns
[]UserInfo — each contains UserID (hex) and Permissions (subset of {"read", "write"}).
Example
Errors
- Returns error if the client is not using the root key, or RBAC is not enabled.
DeleteUser
Revoke a user. Erases their wrapped DEK(s) for this index — even a capturedcdbk_… token becomes useless on the next request. No propagation lag.
Parameters
Example
Errors
- Returns error if
userIDis invalid, the client is not using the root key, or RBAC is not enabled.