Roles and grants
Ownership, roles and Grants decide who can see, change, connect to and read what is in a namespace.
Ringleader’s access model has three layers. Namespaces are the tenancy boundary, ownership lets you control what you create, and Grants open specific objects to specific people. Roles decide which verbs you hold in a namespace, ownership narrows the write verbs to your own objects, and Grants widen access to chosen peers.
The fields of a Grant are in the Grant reference. The built-in roles, the reach of each kind of role binding and the rules of a custom organization role are in Roles and RoleBindings.
Ownership
Workstation, Secret, WorkstationConfig, ConfigMap, Grant, ServiceAccount, Integration, WorkstationPool and WorkstationPoolLease are owner-scoped personal kinds. Like a Unix file, you own what you create. On every write, Ringleader stamps the owner from your verified identity, and a client cannot forge it. For a namespace-member, that has these consequences:
- You may create, update and delete your own objects of those kinds.
- Peers may
getandlistthem, because reads are open within the namespace. They cannot update or delete them. - A
Secretis the exception, in the stricter direction. Every read returns its redacted projection, yours included. Seeing the values takes--reveal, which needs ownership, theaccessverb or a Grant. - Owning something does not stop a peer from referencing what they can already read. A workstation that names a
WorkstationConfiginspec.configs, or ascriptsorfilesentry that names aConfigMap, gets those bytes whoever wrote them. - Where a configuration applies by selector rather than by name, ownership decides reach. One an admin wrote applies to every matching workstation in the namespace. One a member wrote applies only to workstations that member owns, and stops applying to a workstation they lose. An admin who loses their admin rights does not stop: their configuration narrows to the workstations they own, like any member’s. A member’s
ConfigMaplikewise supplies content to a selector-applied configuration only where that member wrote the configuration. - A
ServiceAccountis an identity rather than something a workstation consumes, so it has a rule of its own. Suspension says when it stops working.
A namespace-admin is not restricted by ownership. That covers your personal namespace and the admins of a shared one. They manage every object in the namespace, whoever created it.
Either way, you can read your teammates’ resources but cannot modify or delete them. As a namespace-member you fully control your own. As a namespace-reader you create nothing in the namespace except your own device-local SSH keys and port-forward bindings, and never a workstation, Secret or configuration.
Organization administrators
org-admin is a built-in role that an OrgRoleBinding binds to a subject for one organization. It is the root of its organization and nothing more. One binding makes someone an administrator of every namespace of the organization, including ones created later, so there is no setup to maintain per namespace.
An org-admin may:
- Create and manage the organization’s namespaces. Their
spec.orgmust be the administrator’s own organization, which makes the boundary structural rather than a convention. - Administer membership across every namespace of the organization. They bind and unbind users to
namespace-reader,namespace-memberornamespace-admin. - Write organization-scoped roles (
OrgRoleandOrgRoleBinding), bounded by the escalation guard: every rule they grant must be one they already hold. - Write the organization’s CloudAccounts, which say which cloud identity to use for cloud federation.
- Write the organization’s policies (
OrgPolicy), which say what a workstation file may name anywhere in the organization. A namespace’s own policies can narrow that, and cannot widen it. Policy and OrgPolicy has the fields. - List the organization’s members with
rl user get. The list is limited to their own organization. A normal member gets a403, and another organization’s users are invisible, not merely filtered.
An org-admin may not grant themselves more than they hold, write global roles, or reach any other organization. They are not a wildcard.
The access verb
Reading a Secret’s values, not just its redacted projection, is gated by a distinct access verb. It is the same verb that admits objects which consume the Secret. Places that name a Secret lists the fields that consume one, including an Integration’s credentialRef, inject.value and mcp.credentialRef. You hold access on your own Secrets automatically, and a Grant with rights: [access] extends it to a peer. To read a Secret’s values, run rl secret get db --reveal, which requires the access right.
Grants
A Grant is a namespaced object that opens an object to specific subjects. It is the only way a peer gains one of these:
- SSH access to a workstation you own (
rights: [ssh]). - Value access to a Secret you own (
rights: [access]). - The right to lease a workstation from a pool you own (
rights: [lease]). - The right to place one workstation, which is to set the
providerConfigkeys a member may not set. Only an admin can grant it (rights: [cloudconfig]). - The right to build workstations through a Restricted cloud identities that sets
requireUse(rights: [use]). Only someone who holds theuseverb can grant it.
There is no namespace-wide SSH fan-out. SSH to a workstation is ownership, which is automatic, plus Grants, which are explicit. A lease Grant opens the pool, never its members, because a member is reached through the lease that holds it. Access for a lease holder says what the right lets a holder do.
No Grant reaches a node-bound workstation, which runs on its owner’s computer where no other device can reach it. A Grant that names one is refused, and a Grant that selects by label or * leaves it out.
Create and revoke Grants with the share and unshare commands rather than writing them by hand. Workstation and Secret sharing shows how.
Grant scope
Every Grant carries a scope. Ringleader sets it from the rights you held when you created the Grant, and never trusts it from the client:
owner: created byshareandunshare. It reaches your own objects and those of any service account you own in the namespace, only while you still own them or the account. A Grant can therefore never hand out more than you could yourself. If the account gets a new owner or is deleted, the Grant stops reaching its objects.admin: created with--admin, which needs namespace-admin rights. For SSH it reaches any workstation in the namespace. For every other right it reaches your own objects and those owned by any service account in the namespace, and never an object a teammate owns. An admin can share a service account’s Secrets and pools. An admin-scope Grant on a teammate’s Secret does nothing, because an admin has no authority over a teammate’s plaintext. The same holds for a teammate’s pool.
Secret sharing says what an admin-scope Grant on a teammate’s Secret does, and which shapes of Grant are refused or accepted.
Two rights have no owner scope, cloudconfig and use, and a member’s Grant of either is refused. The cloudconfig Grant shows how an admin writes one.
Ringleader checks that a Grant never grants more than its creator could grant directly each time it decides access. An owner-scope Grant stops applying once you no longer own its target, or no longer own the service account that owns it. An admin-scope Grant does not depend on your rights today. It keeps applying after you lose your admin rights, to any workstation for SSH, and to service accounts’ objects for every other right.
Give someone a role
Give someone a role in one namespace when you are a namespace-admin or an org-admin. A new member’s first role comes from the organization’s default. You need this to move someone between roles or to put them in another team’s namespace.
- Write a
RoleBindingin the namespace, naming the person and a built-in role, as Example: a RoleBinding shows. The built-in roles are listed in the reference. - Save the file as
bob-team-a.yamland runrl apply -f bob-team-a.yaml.
To make someone an administrator of every namespace of the organization, write an OrgRoleBinding instead, as Example: an OrgRoleBinding shows.
Create a custom organization role
Create a custom role when the built-in roles give a person or a service account too much or too little. You must be an org-admin, and you can only grant rules you already hold.
- Write an
OrgRoleand anOrgRoleBindingthat binds it, as Example: a custom OrgRole shows. Each rule names API groups, resources and verbs, as Custom organization roles explains. - Save the file as
ci-bot.yamland runrl apply -f ci-bot.yaml.
Next steps
- Workstation and Secret sharing: open a workstation or a Secret to a teammate with a Grant.
- Organizations and domains: how people get their first role.
- Roles and RoleBindings: the built-in roles, how far a binding reaches and the rules of a custom role.
- Grant: the fields of a Grant, and the
cloudconfigright. - ServiceAccount and IdentityProvider: the non-human identities you bind these same roles to.