Most repository managers grew one repository type at a time, and it shows: permissions for Docker work one way, for Maven another, for git a third. Depotify has one rule engine for all 21 tools. Learn it once, audit it once, explain it once to your security team.

Who and what

Who a rule is about:

SubjectMeans
user:aliceone account
group:releaseeveryone in a group
role:release-managereveryone with a role
deploy-key:cia key that belongs to a machine, not a person
ownerthe repository's owner
authenticatedanyone signed in
anonymousanyone not signed in
*everybody

What a rule allows or denies — the same words in every tool, so a rule reads the same whether it protects a Debian repository or a git branch:

AreaRights
Repositoriesread, write, create, rename, delete, administer
Branches and tagscreate, update, force-push, delete; create, move, delete tags
Files and pathsread, write, see metadata, move, delete, delete one's own, take back, delete permanently, wipe, wipe shared content, lock a revision, place a retention hold
Packagesmark (deprecate, dist-tags, yank), replace with a better-signed copy, verify
Remote and mirrorsfetch from upstream, create, sync, detach and push mirrors
Jobssee and manage other people's scheduled jobs
Securityreview held files, read reviews
Every right explained, in the product itself
Every right explained, in the product itself

Each right means one thing. Being allowed to write does not mean being allowed to delete, and being allowed to delete does not mean being allowed to wipe — destroying data is always a right of its own.

A rule file you can read

{ match: "releases",
  owner: "user:alice",
  rules: [
    { id: "read",          allow: ["repo.read"],  who: ["*"] },
    { id: "write",         allow: ["repo.write"], who: ["group:release"] },
    { id: "ci-upload",     path: "ci/**",     allow: ["path.write"], who: ["deploy-key:ci"] },
    { id: "stable",        path: "stable/**", allow: ["path.write"], who: ["role:release-manager"] },
    { id: "stable-closed", path: "stable/**", deny:  ["path.write"], who: ["*"],
      note: "stable builds are published by release managers only" },
    { id: "own-folder",    path: "{principal}/**", allow: ["path.delete"], who: ["authenticated"] }
  ] }

Rules apply to a repository, a branch or tag pattern, a path pattern, or a combination. {principal} gives everyone a folder of their own with one line. A note is shown to the person who is refused, so a denial explains itself.

The most specific rule wins

When several rules match, Depotify does not take the first one or the last one. It takes the most specific: a rule on a path and a branch beats a rule on a path, which beats a rule on a branch, which beats a rule on the whole repository; a narrower pattern beats a wider one; a named person beats a group, a group beats everyone. On an exact tie, deny wins. When nothing matches, the answer is no.

Sensible things are implied — the owner administers, writing implies reading — and dangerous things never are: no right implies deleting a tag or a path, wiping, or reviewing.

Edit with confidence

Rules can be edited as text in the browser, by the people named as administrators of that tool:

The rules of a repository: effect, rights, who, path, the rule's name and its note
The rules of a repository: effect, rights, who, path, the rule's name and its note
  • Every change is checked before it is saved — an unknown right, a bad pattern, a rule that allows and denies at once is refused with every problem listed.
  • Two administrators editing at once cannot overwrite each other: a save based on an outdated version is refused instead of silently winning.
  • A change that would take your own administration away is refused — nobody locks themselves out by accident, and the site's superuser can always repair the rules.
  • Templates for the usual cases — read-only group, uploaders, maintainers, wipers, a protected folder, personal folders — fill in a working rule set.
  • The previous version is kept, and every change is in the audit log.

The simulator: ask before it happens

The simulator: denied — by which rule, and why
The simulator: denied — by which rule, and why

"Can the CI key push to stable/ in releases?" The simulator answers with the decision, the rule that made it, an explanation in plain words and the full trace of every rule considered. Everyone can ask about themselves; administrators can ask about anyone. It is the same code that makes the real decision, so the answer is never an approximation.

How people sign in

Depotify signs people in the way your organisation already does:

  • with a password kept by the server, or with the password of your company directory (LDAP, Active Directory);
  • with the Kerberos ticket of a Windows or realm sign-in — no password typed;
  • through single sign-on: any OpenID Connect provider, or FFS's own identity provider, which gives several Depotify servers one sign-in (see API & automation);
  • with a second factor — an authenticator app, a security key or a passkey — for everyone or for the groups you choose. Programs can then be limited to access tokens: a password alone no longer opens a repository.

Groups from the directory or the provider can count as Depotify groups, so the rules below can name them. Someone who leaves loses access by itself: removed from the directory, within a minute; closed at FFS's identity provider, on every server at once.

Private means private

  • A read that is not allowed is answered as if the thing did not exist — a private repository does not reveal its name, its files or its size.
  • A write or delete that is not allowed says why: the rule and its note.
  • Repositories can be readable by anonymous visitors — a public download area beside private ones, on the same server.
  • Access tokens narrow a person's rights further with scopes; they never widen them. See API & automation.

Security review

Files fetched from public upstreams can be held for review by rules of their own: until someone with the review right approves them, they cannot be downloaded. Reviewing is never implied by any other right — only a rule that names it grants it.

The audit log

Every action — allowed, denied or failed — is recorded with who, from which address, what, on which resource, when, the outcome and the reasons. The log is searchable in the browser per tool, by resource, user, action and outcome, and over the API.

The audit log, filtered per tool
The audit log, filtered per tool