Skip to main content

User and group management

Kube-DC separates Organization administration from Project access. Organization Admins manage members and Organization Groups, while Project roles control what those groups can do in each Project. Custom roles cover narrower requirements.

Security model​

Each Organization in Kube-DC has a dedicated identity domain:

  • Dedicated Keycloak Realm: Every organization gets its own Keycloak realm, acting as an independent OIDC provider. Users from different organizations cannot share credentials or sessions.
  • Isolated JWT Tokens: Authentication tokens are scoped to a single organization realm. A token issued for acme cannot be used to access example organization resources.
  • Separate Token Authentication: Each realm has its own signing keys, token policies, and session management. Credentials and sessions are scoped to their issuing organization.
  • Kubernetes RBAC Integration: JWT group claims are mapped to Kubernetes RoleBindings automatically. Access is enforced at the API server level, independent of the UI layer.
Organization authentication and Project authorizationA user authenticates against the Organization-specific Keycloak realm using OIDC. The realm issues a JSON Web Token containing Organization group claims. The Kubernetes API validates the token, and RoleBindings in each authorized Project backing namespace map those groups to the applicable Project roles.OIDCJWTUsersign inOrg realmKeycloakOIDC tokenKubernetes APIvalidates JWTRoleBindingsgroup claimsProject access
The Organization realm authenticates the user and emits group claims; the API validates that token, then Project RoleBindings authorize individual Kubernetes requests.

This model separates Organization identity and membership from Project workload access. Kubernetes RBAC is the authorization boundary; Project networking, quotas, and platform policy add workload isolation.

Standard Roles​

When an organization and its projects are created, Kube-DC automatically provisions a set of standard roles. These cover the most common access scenarios without any manual configuration.

Organization-Level Roles​

RoleGroupPermissions
{org}-adminorg-adminManage members, billing, shared quota, Projects, and Organization Groups within this Organization; receives admin in every Project
{org}-useruserRead the Organization and Project list; receives user in every Project

Project-Level Roles​

Every project receives these four roles automatically:

RoleDescriptionKey Permissions
adminProject administrationManage the supported namespaced resource set and namespaced RBAC; controller-owned quota objects remain read-only
developerWorkload managementManage supported workloads, volumes, Services, and managed services; raw Kubernetes Secrets are read-only; no RBAC management
project-managerOperations and oversightRead and monitor Project resources, use the VM console, update selected managed security resources, and create or update KMS keys; no Project membership or quota management
userRead-only accessRead Project resources and logs; no raw Secret access or VM console

Automatic Role bindings​

When a project is created, these bindings are configured automatically:

SubjectRoleEffect
{org}:org-adminadminOrganization admins receive the standard admin role in every Project
{org}:useruserOrganization members receive the standard user role in every Project

Additional Project roles, including admin, developer, and project-manager, can be assigned through Organization Groups.

Manage users​

The Users section in the console is available to organization administrators under the Manage Organization menu.

User list​

The users page shows all members of the organization with their assigned roles, status, and join date. Organization admins can:

  • Create User: Add a new user directly to the organization
  • Assign Groups: Grant elevated per-project access through organization groups
  • Delete: Remove a user from the organization
  • Pending Requests tab: review and approve self-service join requests
Permission Required

Only users with the org-admin role can create, delete, or modify other users. Regular users can view the list but cannot perform management actions.

Create a user​

Organization administrators can create users directly from the UI without any external tooling.

Steps:

  1. Navigate to Manage Organization → Users
  2. Click Create User in the top-right corner
  3. Fill in the required fields:

Create new user form

FieldDescription
UsernameUnique login name (letters, numbers, ., _, -; minimum 3 characters)
EmailUser's email address
First NameGiven name
Last NameFamily name
PasswordInitial password (minimum 8 characters)
RolesInitial Organization role: User (read-only) or Organization Admin (Organization management and full Project access)
Enable user accountWhen checked, the user can log in immediately after creation
  1. Click Create User

The user is created in the organization's Keycloak realm and can log in to the Kube-DC console immediately. They receive automatic read-only access (user role) to all projects unless assigned to an organization group for elevated access.

Default Role

New users are created with the User role by default, which grants read-only access to all projects. To grant elevated project access, use Organization Groups after creation.

Assign groups to a user​

After creating a user, you can assign them to organization groups to grant elevated access to specific projects.

Steps:

  1. In the Users list, find the user and click Assign Groups
  2. Select the action: Assign groups or Remove groups
  3. Choose from the available groups:
    • Realm Groups (org-admin, user): Organization-wide roles
    • Organization Groups: Project-specific elevated access groups you have created
  4. Click Assign Groups to apply

Group assignments and removals affect newly issued tokens. An access token that was already issued keeps its existing group claims until it expires, which is 15 minutes by default. Sign out and sign in again to obtain updated claims immediately.

Handle join requests​

Users who discover Kube-DC independently can request to join an organization through the Join Request flow on the login page. Organization administrators are notified and can approve or deny these requests from the Pending Requests tab.

Steps:

  1. Navigate to Manage Organization → Users → Pending Requests
  2. Review pending requests (name, email, requested date)
  3. Click Approve to add the user to the organization with the default user role, or Deny to reject the request

Approved users are automatically added to the user group and receive read-only access to all projects.

Delete a user​

  1. In the Users list, click Delete next to the user
  2. Confirm the deletion in the dialog

The user is removed from the Organization's Keycloak realm, which blocks new logins and token refresh. An access token that was already issued can remain valid until its expiry, which is 15 minutes by default.

Organization groups​

Organization Groups define elevated access per Project. Each group connects a Keycloak group claim to Kubernetes RoleBindings in the selected Projects' backing namespaces.

Use Organization Groups when you need to:

  • Grant admin, developer, or project-manager access to specific Projects
  • Manage teams: one group can span multiple Projects with a different role in each

Create an Organization group in the console​

  1. Navigate to Manage Organization → Organization Groups
  2. Click Create Group and provide a group name
  3. Configure project permissions:

For each project permission entry:

  • Project: Select the target project from the dropdown
  • Roles: Select one or more roles to grant in that project (admin, developer, project-manager, user)

You can add multiple project permissions to a single group. Click Update Group to save.

  1. Assign users to this group through Users → Assign Groups

Create an Organization group with kubectl​

For infrastructure-as-code workflows, Organization Groups can be managed as Kubernetes CRDs:

apiVersion: kube-dc.com/v1
kind: OrganizationGroup
metadata:
name: backend-team # Group name (also becomes the Keycloak group name)
namespace: acme # Organization namespace
spec:
permissions:
- project: production
roles:
- developer # Manage supported workloads in 'production'
- project: staging
roles:
- admin # Full admin access in 'staging'
- project: monitoring
roles:
- project-manager # Monitor resources and use approved management actions

Apply the group:

kubectl apply -f organization-group.yaml

When this resource is created, Kube-DC automatically:

  1. Creates a Keycloak group backend-team in the organization's realm
  2. Creates RoleBindings in each specified Project's backing namespace
important
  • OrganizationGroup must be created in the Organization API namespace, not a Project backing namespace
  • The group name must be unique within the organization
  • Standard groups (org-admin, user) are managed automatically and cannot be overridden through OrganizationGroup

Controller lifecycle​

OrganizationGroup controller lifecycleCreating an OrganizationGroup creates a Keycloak group in the Organization realm and RoleBindings for every Project and role in spec.permissions; new tokens that carry the group claim receive that Project access. Updating the resource reconciles RoleBindings across affected Project backing namespaces. Deleting the resource removes the Keycloak group and all associated RoleBindings.CreateOrganizationGroupReconcilecontrollerCreate outputsKeycloak groupProject bindingsUpdatepermissionschangedReconcilecontrollerUpdate outputsaffectedRoleBindingsDeleteOrganizationGroupReconcilefinalreconciliationDelete outputsdelete Keycloakdelete bindings
The OrganizationGroup controller keeps the Organization-realm group and all selected Project RoleBindings aligned across create, update, and delete reconciliation.

Custom Project Roles​

The four standard Project roles cover most scenarios. A holder of the Project admin role can create a custom Kubernetes Role when a narrower permission set is required.

Edit roles in the console​

Navigate to Manage Organization → Project Roles to view and edit roles per project:

Edit Role interface

In the role editor, define permission rules by:

  • API Group: select Core API Group for pods and services, or apps, kubevirt.io, or another group
  • Resources: select the resource types, such as configmaps, secrets, and services
  • Verbs (Actions): Select allowed operations: get, list, watch, create, update, patch, delete

Multiple permission rules can be added to a single role. Click Review to preview before saving.

Create a custom Role with kubectl​

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: ci-deployer
namespace: acme-production # Backing namespace: {org}-{project}
rules:
- apiGroups: ["apps"]
resources: ["deployments", "replicasets"]
verbs: ["get", "list", "create", "update", "patch"]
- apiGroups: [""]
resources: ["pods", "services", "configmaps"]
verbs: ["get", "list", "watch"]
Role Scope

Kubernetes Roles are namespace-scoped. To use the same custom role across multiple Projects, create it in every target Project's backing namespace before referencing it from an OrganizationGroup.

After the role exists in the Project's backing namespace, reference it from an OrganizationGroup:

spec:
permissions:
- project: production
roles:
- ci-deployer # Custom role name

Permission reference​

Organization API scope​

Resourceorg-adminuser
organizationsget, list, patch, update, watchget
projectsfull CRUDget, list
organizationgroupsfull CRUDNone

Project API scope​

Resourceadmindeveloperproject-manageruser
virtualmachinesfull CRUDfull CRUDget, list, watchget, list
podscreate, get, list, watch, deletecreate, get, list, watch, deleteget, list, watchget, list
pods/loggetgetgetget
VM console/VNC✅✅✅❌
servicesfull CRUDfull CRUDget, list, watchget, list
deploymentsfull CRUDfull CRUDget, list, watchget, list
secretsfull CRUDget, listget, list❌
configmapsfull CRUDfull CRUDget, listget, list
persistentvolumeclaimsfull CRUDfull CRUDget, list, watchget, list
RBAC (roles, bindings)full CRUD❌❌❌
Pod exec, attach, or port-forward❌❌❌❌
VM/VMI port-forward❌❌❌❌
networkpolicies❌❌❌❌

Troubleshooting​

User cannot log in after creation

  • Verify the account is enabled (check the user's status in the Users list)
  • Ensure the correct organization URL is being used for login

User can log in but sees no projects

  • The user may only have the user role, which provides read-only access
  • Verify they are assigned to the correct organization group for elevated project access
  • Verify the user belongs to the expected identity group and inspect the RoleBinding in the target Project's backing namespace

Organization Group not granting access

  • Confirm the OrganizationGroup is created in the Organization API namespace, not a Project backing namespace
  • Verify the project name in spec.permissions matches exactly (case-sensitive)
  • Inspect the OrganizationGroup status and the RoleBindings in the target Project's backing namespace; reconciliation is asynchronous

Permission changes not taking effect

  • Group membership is carried in the user's access token
  • Sign out and sign in again to obtain updated claims immediately; otherwise, an existing token can retain old access until its default 15-minute expiry

Custom role not appearing in Organization Group editor

  • The role must exist in the target Project's backing namespace before it can be referenced
  • Create the role with kubectl apply first, then reference it from the OrganizationGroup