Skip to content

Groups

A group gives several people and bots the same permissions. It has members, each with an optional expiry, and group permissions, each a cluster, a role and a scope with an expiry of its own. Here's how to create one, fill it and empty it in Groups, and what each change does on the clusters.

How a group works

kubelatch turns every combination of a member and a group permission into one permission of that member: a derived permission. Four members and five group permissions are twenty derived permissions, kept in step with the group:

  • Whoever joins receives every group permission at once.
  • A permission added to the group reaches every member at once.
  • Whoever leaves, and whatever the group stops giving, is revoked at once.

Every change reconciles the clusters it touches, as a direct permission does. For the proxy, the reconciler, the CLI and the audit log a derived permission is a permission like any other. Outside the group it can't be extended or revoked: you change it from its group, and Remove from the group, in its line's menu, takes the member out from any list (Read a permission).

Direct permissions still exist, for one-off access and for cluster-admin. A person can hold the same role on the same scope directly and through a group, or through two groups; that's valid, and the redundant one says so under its line (Overlaps).

Groups have no edition limit.

Before you start

  • You're a kubelatch administrator.
  • A group permission follows the same rules as a direct one: protected namespaces, scope, PSA, custom roles on the current bootstrap (The rules).

The Groups list

Groups is the directory of what each group gives. Its first line counts the groups and how many accounts and clusters they reach: 6 groups give access to 26 accounts on 2 clusters. Each row says:

Column What it shows
Group The name, which opens the group's page, and the id under it when it isn't the name in lowercase.
Gives One line per cluster: the role and where, such as developer prod › shop, payments, or viewer staging › whole cluster. Two lines at most, then and N more. admin and cluster-admin are in bold.
Members The first three members as avatars, and how many active members it has. A disabled account counts but isn't shown.
Until When the first access the group gives ends: the earlier of a membership's expiry and a group permission's. Under it, N never end counts the accounts whose access through the group has no end; Never when nothing it gives ends.

A line under a row says what needs a look: Gives no permission: its 2 members receive nothing., Has no members: its 3 permissions reach nobody. and, for each sign-up domain rule that adds people to it, Anyone who signs up with @acme.com joins (14).

The search box finds a group by its name, id or description, and by a member's login, a role or a cluster. The filters keep the groups where something expires this week, the ones whose access never ends, the ones that give nothing and the ones without members; each says how many groups it keeps, and they add up. The row menu has Open, See in Permissions (what the group gives), Add members and Delete. On a phone the list keeps the name, a line with the members and what the group gives, and the expiry.

Create a group

  1. Open Groups and click Create a group. The form opens in a panel on the right. The command palette (⌘K) has Create a group too, and every group by name; the link Create it as a group, under the form in Permissions, opens the same panel.
  2. Fill in the form:

    Field What to put
    Name What people read in the interface, up to 80 characters.
    Id Proposed from the name as you type it. You can edit it until you create the group: lowercase letters, digits and hyphens, 1 to 63 characters, starting with a letter or a digit. It never changes afterwards, and it's never reused, not even after the group is deleted.
    Description Optional, up to 200 characters.
  3. Click Create. You land on the group's page with the notice Group "…" created.

The group's page has Edit (name and description) and Delete at the top, and four figures: Members and Group permissions (those not expired), Effective permissions (the derived permissions active now) and Clusters (where the group has active permissions). Below come the Members and Group permissions cards, and Details, with the id, the creation date and See in Permissions, which opens Permissions on what the group gives.

Add members

  1. On the group's page, in Members, click Add members.
  2. Under Accounts, pick one or more accounts in the Add an account… selector. Each shows as a chip you can remove. People and bots can join; disabled accounts and current members don't show up.
  3. Under Membership expires, choose 8 h, 7 days, 30 days, 90 days, Date… or Never. Never is the default, because each group permission carries its own expiry. A date can be at most 10 years away; for a membership that never ends, leave it without an expiry. Every account you add at once gets the same expiry.
  4. Optionally, write why under Reason and the ticket under Ticket (The reason and the ticket). Every account you add at once gets the same ones. No environment requires them on a membership: what the environment's rules require goes on the group permissions.
  5. Click Add N members.

Each new member receives the group's permissions at once. The addition is all or nothing: if one account can't join, none does, and the panel says Refused at "…". under the button, with the reason.

Joining checks the group's permissions again, as if each were granted directly to the new member. If one no longer passes, for example because someone removed the PSA label from its namespace, nobody joins until you revoke that group permission or fix the namespace. The panel then names that permission instead of an account: This group permission blocks adding members: developer on shop in prod. Revoke or fix it first.

The Reason column shows a member's ticket, as a link to the tracker, and its reason between quotes: OPS-7 · "December on-call".

To add one account, open its page in Users and use Add to a group in its Access card: choose the Group, when the membership expires (Never by default) and, optionally, the Reason and the Ticket, and click Add. The card also lists the groups the account is in, each with the expiry of its membership.

Add group permissions

  1. On the group's page, in Group permissions, click Add permissions.
  2. Fill in the same form as Grant permissions, without accounts: Cluster, Scopes (several namespaces at once, or whole cluster (*)), the role under What, Until when (30 days by default, or what the rules of the cluster's environment say), Reason and Ticket, which that environment may require.
  3. A line counts what will be added, for example "2 group permissions: developer on apps, web in kind, until …". The ones the group already has are left out, and the form says so.
  4. Click Grant N permissions.

Every member receives them at once. If one entry is refused, nothing is added, and the form names the entry under the summary.

In Pro, Where also offers An environment and A label in this form, as in Grant permissions: the group's permission then follows the set, and a cluster that enters it gives the permission to every member at once. In Group permissions it's one line that unfolds into the clusters of the set, with the same menu as any permission on a set (Permissions on a set): Extend the permission on staging, Check again and Revoke the permission on staging. What it puts on a cluster can't be extended or revoked alone: the routes of a group permission answer 409 grant.set_derived. As every group permission, it never gives privileged access.

Under What, a native role whose group the chosen cluster gives privileged access is disabled, with the reason under it, before you choose it (Grant a native role). A role kubelatch writes on a privileged namespace is refused as soon as you choose it: A group permission cannot do this.

In Group permissions, each permission is a line with its role, where and until when (Read a permission). Under a native role's line go the cluster groups it sends. On a cluster whose identity template is not the default, a line such as Each member enters as oidc:{email} leads to that cluster's Identity in the cluster card.

The group permissions of Backend: developer on shop and payments in prod and viewer on the whole of staging, each with its expiry and its menu.

cluster-admin is never given through a group

Under What, cluster-admin is disabled with cluster-admin is personal: it cannot be given to a group. It's the audited emergency access: a decision about one person, for one intervention, for 8 h at most. A group would hand it to whoever joins later, without anyone granting it to them. Grant it directly (Grant emergency access with cluster-admin).

Two expiries

A derived permission expires at the earlier of two dates: the membership's and the group permission's.

Membership expires Group permission expires Derived permission expires
Never In 30 days In 30 days
In 7 days Never In 7 days
In 7 days In 30 days In 7 days
Never Never Never

When the date passes, the derived permission moves to Expired in Permissions, like any other. An expired membership or group permission stays on the group's page marked Expired, so you can extend the membership or remove what's left over.

To extend a member, choose Extend in their row menu, pick the new expiry and click Save changes. The new date applies to every permission the group gives them, in place: the same permission, with its new expiry, and an expired derived permission comes back to life the same way. If the new date is later than the current one, whether the membership has expired or not, joining's check of the group's permissions runs again first: if one no longer passes, nothing changes. An AI agent's session whose derived permission came from the expired one doesn't come back: its own expiry was bounded by the old date.

To extend a group permission, choose Extend in its row menu. Every member gets the new expiry, capped by their own membership, and an expired permission comes back for them. kubelatch checks the permission again as if it were new: the role's maximum, Pod Security and protected namespaces. Until you revoke a permission, even expired, the group still has it, and the form leaves it out.

Remove a member or revoke a group permission

  • Remove, in a member's row menu, asks first: Revokes the N permissions the group gives them.
  • Revoke, in a group permission's row menu, asks first: Its N members lose the permission.

Both revoke the derived permissions involved and reconcile their clusters within seconds. The person's credentials keep working for the rest of their permissions. If they're left with none on a cluster, the proxy responds 403 … has no active permissions on cluster …. An AI agent whose ceiling came from a revoked permission loses it on its next call.

The audit log keeps the whole story: group.member.remove or group.grant.revoke, and one grant.revoke per derived permission, with the group, the member and the group permission (The control plane). The revoked permissions stay under Revoked in Permissions.

To remove several members, tick them in Members (Shift and a click tick a range) and choose Remove N in the bar that the first tick brings up under the list. The confirmation lists each member with the permissions they lose and the clusters that reconcile, and takes an optional reason. Revoking several group permissions works the same way with Revoke N: the confirmation lists them by cluster and says how many members lose each. Both are all or nothing, up to 500 at once: if one can't go, nothing changes, the alert names it and its row says why. A member who already left, or a permission already revoked, counts as done.

To extend several, tick members or group permissions and choose Extend N in the bar; the choices and the confirmation are those of Extend permissions. Each one goes through the same checks as from its row menu, and a batch is all or nothing, up to 50 at once.

Move members to another group

Tick members in Members and choose Move N to another group… in the bar. The dialog asks for the Destination group and the Expiry in the new group: Keep each one's expiry, One date for all or No end, and takes an optional reason. It lists who moves, with the permissions each one gains and loses; someone already in that group reads already in "ops": only leaves "backend". A membership there that has lapsed stays as it is, so that member leaves "backend" and gains nothing, and with Keep each one's expiry a member whose own membership has lapsed keeps the dialog waiting for One date for all or No end. Joining runs the destination's checks, as adding members does, and refuses a disabled account. It's all or nothing, up to 500 at once: if one can't move, nothing changes and the alert names it.

The control log reads the move as one line, for example "ana moved 3 members from "backend" to "ops"", over one group.member.remove and one group.member.add row per member (The control plane).

Members a domain rule added

A domain rule puts the people it signs up in its group. On the group's page they carry the pill domain {domain} beside them and, in Reason, "Added by the rule of {domain}." Their membership expires as the rule said when they signed up, and you change it like any other: Extend or Remove. A rule only acts when someone signs up, so a member you remove isn't added back. Removing the rule removes the memberships it added that are still live, and a group can't be deleted while a rule points at it.

Delete a group

Delete, on the group's page or in its row menu in Groups, opens a confirmation read when it opens. It names who leaves and what they lose: Removes alice, carol, dave, erin, frank and 12 more. They lose developer on prod (shop, payments) and viewer on all of staging. When a sign-up domain rule adds people to the group, it says that those who joined through it no longer join. The button reads Remove 17 and delete. A group with nothing in it says The group has no members and gives no permission. and the button reads Delete. The button waits until the group is read.

Deleting removes every member, revokes every group permission, the ones on a set included, and every derived permission, and reconciles the clusters. The id isn't reused. The audit rows and the revoked permissions stay.

Disabled accounts

A disabled account keeps its memberships and its derived permissions, as it keeps its direct ones. None of them count while it's disabled: the member shows Account disabled on the group's page. Enable brings them all back without touching the group (Disable and enable).

A disabled account can't join a group: it doesn't show up in the selectors, its page has no Add to a group, and the API answers 409 group.subject_disabled.

See where a permission comes from

  • Every list of permissions: the line says direct, or via and the group, as a link to the group. A derived permission's menu offers Open Backend and Remove from Backend instead of Extend and Revoke (Read a permission).
  • The group's page: See in Permissions opens Permissions with only what that group gives (?group=<id>).
  • Users: the Access column, for example 2 groups · 1 direct, and the Access card of the account's page, which lists its groups with the expiry of each membership and every permission they give it (Users and bots).
  • Home: each permission in My clusters that comes from a group says via and the group, for example via Backend.

Owners

In Pro, an administrator names the Owners of a group: people, or another group whose members count while their membership lasts. Without being administrators, a group's owners see it in Groups and add, extend, move and remove its members; a move takes members between two groups they own.

An owner never gives themselves access: adding themselves, moving themselves or lengthening their own membership answers that an owner cannot give access to themselves. Only an administrator adds or moves a bot, or lengthens its membership. While the group has a native role permission, until it is revoked, only an administrator adds or moves anyone into it, or lengthens any membership: only an administrator grants a native role, and an owner would hand it out through the group. An owner removes anyone, themselves and a bot included, and shortens any membership.

A group that owns something keeps its members for the administrators: while it owns prod, its owners change none of them, and the answer names what it owns. Owning a group gives no say over its permissions: those belong to the owners of each permission's place (Owners), who never grant to a group they are a member of, and only an administrator changes a group's native role permission. Creating, renaming and deleting groups stays with the administrators; deleting a group also removes its owners and what it owned as an owner. Each owner's change leaves its usual row in the control log, with as: owner and the scope that allowed it (The control plane).

Via the API

Every operation above exists in the JSON API under /api/groups, and GET /api/grants?group=<id> lists a group's derived permissions. The routes are in HTTP API and the errors in Errors.