Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

TENANT.BIND

Last updated
TENANT.BIND tenant-id username
Group
Tenancy
Complexity
O(N) where N is the number of users bound to the tenant
Arity
3 (exactly, counting the command name)
Flags
admin, write
HotKV Cloud
Scale
On-Premise
requires the multi-tenancy license feature

TENANT.BIND adds a user name to a tenant’s list of users, on every node. Binding a user that is already bound does nothing. The user does not have to exist in the ACL yet.

The binding is a record of which users belong to which tenant. It does not change what the user may do or which keys it sees: keep each tenant’s users to their own keys with ACL key patterns, for example ACL SETUSER acme-app on >secret ~acme:* +@all -@dangerous.

Simple string OK in RESP2 and RESP3, or one of these errors:

Case Error
No such tenant ERR tenant not found
No license that includes multi-tenancy NOLICENSE multi-tenancy requires a HotKV license. Contact sales@hotkv.com
127.0.0.1:6379> TENANT.BIND acme acme-app
OK
127.0.0.1:6379> TENANT.BIND nosuch acme-app
(error) ERR tenant not found

HotKV-only command.

TENANT.UNBIND, ACL SETUSER