Tenants are the top-level organizational units in Housecarl AuthZ. Each tenant operates in complete isolation with its own domains, policies, and user associations.
Any authenticated user can create a new tenant. This is a bootstrap operation that does not require any existing policy permissions.
housectl admin create "My Company" "Production environment for My Company"
rpc CreateTenant(CreateTenantRequest) returns (Tenant);
When you create a tenant, Housecarl automatically provisions everything you need to start working immediately. This happens atomically in a single transaction:
The tenant is created with the name and description you provide. Tenant names must be globally unique across the system.
You (the creating user) are automatically associated with the new tenant. This allows you to select this tenant when logging in and perform operations within the tenant context.
A domain named root is automatically created. This domain:
Two policies are automatically created in the root domain:
Grants you (the creating user) full access to all resources within the tenant:
| Field | Value | Description |
|---|---|---|
sub | Your UUID | Matches your user ID from the JWT |
action | .+ | Any action |
object | hc://.+ | Any Housecarl resource |
This policy uses your UUID (not username), so renaming your user account will not affect your access.
Grants the system root user (from the platform root tenant) administrative access to this tenant. This enables:
After creating a tenant, only you have access. Before inviting other users:
Users must be associated with a tenant before they can operate within it:
housectl tenant associate-user <tenant-id> <user-id>
# List all tenants (admin operation)
housectl admin list
# Get tenant details
housectl tenant get <tenant-id>
# Update tenant
housectl tenant update <tenant-id> --description "New description"
# Delete tenant (cascades to all associated resources)
housectl tenant delete <tenant-id>