Access model
Organizations, teams, roles, grants, owners and duties, and why people see only the part of Wardn they work on.
Wardn answers two questions for every request: can this person see it, and may they do it. The answers come from a small number of ideas that add together: an organization role, a team role, grants on places, ownership, and duties. This page explains each and the rules that keep them predictable. The decisions behind it are recorded in the project's access-model and least-privilege-visibility decisions.
The mental model
who you are what you hold what you can reach
─────────── ───────────── ──────────────────
organization role ──┐
(Owner, Admin, │
Contributor, Viewer) ├─ add together ─▶ permissions ─▶ on places: teams, apps,
team role ──┤ deployments, clusters,
(owner, lead, member) │ environments, pipelines
grants and ownership ──┘
nothing ever deniesPermissions are named thing:action, such as deployment:sync or guardrail:manage. A role is a named set of them. A place is where a role applies. A person's access is the sum of every role they hold on every place that reaches the thing in question. Because nothing denies, two grants can never conflict.
Three layers, three names
| Layer | What it is | Who has it |
|---|---|---|
| Organization role | Owner, Admin, Contributor or Viewer. | One per person. |
| Team role | Owner, Lead or Member of one team. | One per person per team. |
| Extra access | A role granted on a place, to a person, a group or a team, with an optional end date. | Any number. |
All three appear together on a person's page and add up.
Organization roles
Reading is not part of an organization role, except for the Owner. What each holds across the organization:
| Role | Holds everywhere |
|---|---|
| Owner | Everything, including every duty. |
| Admin | Managing members and invitations, creating roles, teams, clusters, environments, apps, pipelines, integrations and API tokens, and approving new apps. Admins own what they create and see what they administer. |
| Contributor | Nothing by itself. Acts through teams, grants and ownership. |
| Viewer | Nothing by itself, and only ever reads. A Viewer cannot be a lead, owner, approver or signer. |
Team roles
Every member of a team can read the team, its apps, their deployments and pipelines, and (if a Contributor or above) sync and roll back those deployments. A lead also approves for the team and adds or removes plain members. A team owner runs the team: its people, its leads and who may act for it. A team keeps at least one owner.
Managing is not doing
Two powers are kept apart.
- Managing a thing is creating it, editing it, deleting it and deciding who may act on it. Owners manage.
- Duties are the powers that carry risk: approving a release or a remediation, signing off or releasing a held snapshot, adding a guardrail exception, bypassing a guardrail, editing auto-approve rules, opening a terminal in a pod. They are held by the people designated for them, not by seniority.
An Admin who is not designated cannot perform a duty. The organization Owner holds every duty, for emergencies. Only the approval duty can be passed on, by a delegation that names both people; nobody approves or signs off their own work.
Owners and delegation
You own what you create. The creator of a team, cluster, environment, pipeline, app or deployment becomes its owner, in the same transaction that creates it. A thing can have several owners; any owner can add or remove the others, and the last owner stays. The creator has no special standing afterwards.
An owner of a place designates who holds a duty there by granting the matching role to a person, group or team:
- "The QA group signs off the Payments pipeline."
- "Casey approves for Payments."
- "Drew approves for Payments until Friday." A grant with an end date lapses by itself.
Two limits keep delegation safe:
- You can only give away what you hold. A role can be granted on a place only by someone who holds the power to grant it there. Duties other than bypass can be given without holding them.
- You can only undo what you could do. A lead can add and remove plain members but not people who hold approval, lead or owner access.
Least-privilege visibility
Reading follows the same model: a person sees only what they work on.
| Reading comes from | What it reaches |
|---|---|
| Teams | The team, its apps, those apps' deployments and pipelines, and the clusters the team owns. |
| Grants on places | The place and what it contains: an environment holds clusters, a cluster or an app holds deployments. |
| Ownership | What you own and what it contains. |
Only the Owner sees everything. An Owner can widen someone's reading with the built-in Organization reader role, or by granting read on chosen places.
The rules follow from "something you cannot see does not exist for you":
- Reading something out of reach answers 404, the same as something that does not exist. Acting on it does too.
- Acting on something you can see but not change answers 403 with the reason.
- Lists, counts and searches include only what you can see. A list of nothing is empty, not refused.
- A reference to something you cannot see keeps its id and loses its name, so a screen can say "a deployment you can't see".
- Shared places keep their context. If you can read a deployment but not its cluster or environment, you see a limited view of that cluster or environment: name, health, whether the operator is online, versions, and only your own deployments there.
- People are not a directory. You see your teammates and the people attached to what you can see. Whoever hands out access gets a picker for finding people. The full member list is for those who manage members.
Activity follows the same rule
The whole Activity feed is for the Owner and Organization readers. Everyone else sees entries about what they can see, and their own actions. Export, counts and the live event stream apply the same filter.
API tokens and agents
An API token acts for the person who made it and never reaches further. It also has a ceiling of permissions and places, an expiry, an optional rate limit and a record of its calls. Agents are held to the same rule, and can never be an approver, a bypasser or open a terminal. See API tokens.
What is not built yet
The design describes more than the product does today:
| Design | State |
|---|---|
| Covering a duty on the spot | Built for approving: a person who holds the approval duty can delegate it to a Contributor or above for up to 90 days (createDelegation), and both names show on what the person approves. Bypass and other duties are not delegated this way; grant the role with an end date instead. |
| Placing teams on clusters, app approval before deploying, shared deployments with waiting promotions, out-of-place warnings, transfer previews | Not built; they arrive with the cluster, app and deployment resources. |
| An Auditor role (read Activity only) | Use Organization reader, which reads everything. |
Check it yourself
wardn can-i deployment:sync --scope deployment --on <deployment-id>For a place you cannot see, the answer is no, with the same reason as for a place that does not exist.