Skip to content

Identity chain

kubectl access to your tenant passes through six layers. When access fails, find the first layer that is wrong.

flowchart TD
    ccdb["CCDB<br/>account + sponsored role"]
    ldap["Alliance LDAP<br/>user directory"]
    keycloak["Keycloak, realm atmosphere<br/>tenant group: &lt;RAP group&gt;"]
    rcs["RCS<br/>support ticket"]
    apiserver["kube-apiserver OIDC<br/>groups prefixed oidc:"]
    owner["Capsule TenantOwner<br/>Group oidc:&lt;RAP group&gt;"]
    rbac["Kubernetes RBAC<br/>admin in every &lt;tenant&gt;-* namespace"]

    ccdb -->|"account + roles"| ldap
    ldap -->|"user federation"| keycloak
    rcs -->|"adds you to the tenant group"| keycloak
    keycloak -->|"id_token with groups claim"| apiserver
    apiserver -->|"group matches tenant owner"| owner
    owner -->|"Capsule creates RoleBindings"| rbac
LayerWhat it does on KestrelIf it breaks
CCDB (ccdb.alliancecan.ca)Holds your account (CCI) and role (CCRI). Students, postdocs, staff and external collaborators need a role sponsored by a PI.Keycloak doesn’t know you, or RCS can’t find you. Fix the account or role in CCDB; contact accounts@tech.alliancecan.ca.
Alliance LDAP (dc=computecanada,dc=ca)Keycloak federates its users from here. No user is created in Keycloak directly. Tenant membership does not come from the RAP’s LDAP group.A new CCDB account isn’t visible in Keycloak yet. Wait for the sync, then follow up on the ticket.
Keycloak (keycloak.arbutus.alliancecan.ca, realm atmosphere, client kubernetes)Authenticates you and issues the id_token. Its groups claim includes your tenant group, which RCS manages on request.Login works but the tenant group is missing: you haven’t been added to the tenant’s Keycloak group yet. Ask your PI to request it (Managing membership).
kube-apiserver OIDCTrusts Keycloak as issuer and prefixes every group with oidc:.Expired or stale token (401): run kubectl oidc-login clean.
Capsule TenantOwnerNames oidc:<RAP group> as owner of the tenant. One Cloud RAP, one tenant.No tenant yet: see Requesting access.
Kubernetes RBACCapsule binds the admin ClusterRole (not cluster-admin) to the owner group in every tenant namespace. Every member gets it; there are no per-member roles.Forbidden outside your tenant’s namespaces is expected.

Your kubeconfig points at https://proxy.kestrel.arbutus.cloud, which is capsule-proxy. It filters cluster-scoped lists (such as kubectl get ns) to your tenant and forwards requests to the API server.

See Tenancy model for tenant naming and ownership.

Terminal window
kubectl auth whoami

The Groups row must include oidc:<RAP group>, with the RAP group’s case (for example oidc:CCInternal-RAID for tenant ccinternal-raid). This is the identity the API server resolved from your token. If the group is missing:

  1. Confirm RCS has added you to the tenant’s Keycloak group. This is the most common cause. See Managing membership.

  2. Clear the cached token and log in again:

    Terminal window
    kubectl oidc-login clean
    kubectl auth whoami
  3. If it is still missing, check your CCDB account and role (accounts@tech.alliancecan.ca).

An empty kubectl get ns is not a symptom: a new tenant has no namespaces until you create one.