Multi-Tenancy CLI

With multi-tenancy, managing a cluster or projects/tenants requires unique authentication and authorization. The basic entity is the security boundary, and cluster management and project management are separate entities.

As part of multi-tenancy authentication and authorization:

  • All API/CLI commands have strict permission handling.
  • API access and JWT token generation is integrated into lbcli.
  • A JWT bearer token (public-key) sign-in is required.
  • The API traffic requires mandatory TLS encryption.
  • There is an audit trail for all API/CLI actions.

Role Based Access Control (RBAC) for multi-tenancy includes the following roles:

  • Cluster Admin
  • Cluster Viewer
  • Tenant Admin
  • Tenant Viewer

Multi-Tenancy and Lightbits

Multi-tenancy features close integration with the Lightbits Kubernetes CSI plug-in, including:

  • One or more K8s clusters per tenant.
  • One or more K8s namespaces per tenant within a K8s cluster.
  • Fine-grained tenant separation based on K8s security within a K8s namespace.

The Lightbits K8s plugin features CSI credentials handling as well, including:

  • Full support for centralized and secure storage provider credentials handling, rotation, and revocation.
  • Credentials (JWTs) stored as K8s “secrets”.
  • CSI sidecars that provide the CSI plugin with the right JWT for every CSI call.
  • OpenStack integration is only with a single tenant.

  • Multi-tenancy separation is only for the control path (the data path is managed via ACLs and IP ACLs).

  • JWTs have an expiration (30 days is the default), and can be set as desired.

  • For single tenants, the cluster admin JWT can be used for all actions.

Make note of the system:cluster-admin JWT generated by the installation (this will be different for every installation; it is only an example.)

Bash
Copy

Key Features

"Projects" (tenants) support

  • Strict separation at the API/CLI level (resource names, visibility).
  • Lightbits API/CLI management by admins separate from tenants' access.

Authentication (authN)

  • All accesses authenticated by pubkey signed JWT bearer tokens.
  • Integration with K8s secrets management, LB CSI plugin.
  • API access JWT tokens generation integrated into lbcli.

Authorization (authZ)

  • Every API/CLI action explicitly authorized by the policy module.

Role Based Access Control (RBAC)

  • Access rights granted based on one or more of the roles assigned to an account.
  • Roles assigned from a limited number of predefined roles.

Common Multi-Tenancy CLI Examples

Create a new project (as cluster-admin). Note the encrypted (https, port 443) endpoints and usage of the system jwt.

Bash
Copy

List projects (as cluster-admin):

Bash
Copy

Create a public/private RSA256 key pair:

Bash
Copy

Create the first credential in the project (as cluster-admin):

Bash
Copy

List credentials in the project (as cluster-admin):

Bash
Copy

Create a project:admin JWT for new project:

Bash
Copy

Create a volume in the project as project:admin:

Bash
Copy

Create project:viewer JWT for a new project:

Bash
Copy

List volumes in the project as project:admin or project:viewer:

Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard