Tenant Onboarding & Governance¶
Before creating an OpenBaoCluster, the target namespace must be provisioned with the necessary RBAC. The operator supports two governance models: Self-Service (decentralized) and Centralized Admin (strict control).
In this model, namespace owners can onboard themselves without cluster-admin intervention. This relies on the Confused Deputy prevention logic: users can only provision the namespace they already have access to.
Prerequisites¶
Ensure the openbaotenant-editor-role is bound to your user (this is aggregated to the standard admin and edit ClusterRoles by default).
Steps¶
-
Create an
OpenBaoTenantresource in your own namespace, targeting that same namespace:apiVersion: openbao.org/v1alpha1 kind: OpenBaoTenant metadata: name: my-tenant-onboarding namespace: team-a-prod # (1)! spec: targetNamespace: team-a-prod # (2)!- Your namespace.
- MUST match metadata.namespace.
-
Apply the resource:
-
The Provisioner controller will detect this valid request and create the necessary
RoleandRoleBindinginteam-a-prodto allow the operator to manage resources.
Security Note¶
If you attempt to target a different namespace (e.g., targetNamespace: kube-system), the controller will block the request and update the status with a SecurityViolation error.
In this model, cluster administrators explicitly declare which namespaces are valid tenants. This is useful for strict environments where users should not self-provision.
Steps¶
-
As a cluster administrator, create an
OpenBaoTenantresource in the operator's namespace (typicallyopenbao-operator-system):apiVersion: openbao.org/v1alpha1 kind: OpenBaoTenant metadata: name: team-b-authorization namespace: openbao-operator-system # (1)! spec: targetNamespace: team-b-prod # (2)!- Trusted namespace.
- Can be any namespace.
-
Since the request originates from the trusted operator namespace, the controller allows cross-namespace provisioning.
3. Verifying Provisioning¶
Check the OpenBaoTenant status:
Look for:
status.provisioned: true: RBAC successfully applied.status.lastError: detailed error message if provisioning failed.- Conditions:
Type: Provisioned,Status: False,Reason: SecurityViolation: You attempted an unauthorized cross-namespace provisioning.
4. How It Works (Security Model)¶
The operator uses a Trust-But-Verify approach:
- Trust: The Operator's own namespace (
openbao-operator-system) is trusted. Resources created there can target any namespace. - Verify: Resources created in user namespaces are verified. They must target their own namespace (
metadata.namespace == spec.targetNamespace). - Isolation: The Provisioner uses a delegated ServiceAccount with minimal permissions. It cannot list all namespaces in the cluster; it only acts on namespaces explicitly discovered via valid
OpenBaoTenantCRs.