Two Questions, Asked Separately
Every request that reaches a share has already been through authentication: Delta knows which Mac is asking, from proof it trusts (the tailnet's own record of who owns an address, or a ticket that Mac was issued; track 4 is about both). Authorization is the next question, and the share answers it, not the server. A request carries two names: the Mac Delta verified, and the app that says it is asking, in the X-Delta-App header. A share has three lists to hold them against: readers, writers and apps.
A Policy Is a Set of Macs, Described, Not Listed
readers and writers are both a Policy, and a policy never hard-codes machines. It accepts exactly five keys and refuses any other (a typo in a declaration fails that share's load instead of silently granting or denying):
| Key | Means | Resolved from |
|---|---|---|
fleet: true | every Mac in Delta's fleet | the registry's fleet groups, minus the household's Mac |
roles | whichever Mac holds a role, such as workbench or pippa | the port ledger's role placement |
groups | every Mac in a named registry group | the fleet registry |
members | the Mac where a named app's engine runs | the port ledger's placement of that member |
labels | specific Macs by fleet label | as written (rarely the right choice) |
Policy.labels() turns the description into a set of Macs on every call, from the registry as it is now. That is invariant 8 at work, no machine name in code, and it has a practical payoff: when an app's engine moves to another Mac, or the Pippa role moves with a hardware change, every share that named the member or the role follows it without a single declaration being edited.
The Rule, in Two Lines
The root class decides with two short methods:
can_read(mac, app): the app is allowed, and the Mac is this Mac or is among the readers.can_write(mac, app): the share iswritable(), the app is allowed, and the Mac is this Mac or is among the writers.
Three details hide in those lines. First, the Mac a share lives on always passes the Mac test, so an app on the owner's own Mac reads through the same rules without being listed. Second, the app test applies even there: being on the right Mac does not let the wrong app in. Third, writable() comes first, so no writers list, however generous, makes a read-only share writable. When a check fails, the server raises a named refusal, <mac> may not read <share> for <app>, and /v1/shares lists a caller only the shares whose readers include it.
The Apps List, and What It Is Worth
The root class defaults apps to ["*"], any app, which is right for the home folder: delta cp and any family app may read it. But the loader gives an app's share a different default: when a declaration names no apps, it gets [<its own repository>]. An app's share is private to that app unless the declaration widens it.
Be honest about what this list buys. The architecture document is: X-Delta-App is what the calling process says it is, on a Mac whose local token it holds. The Mac is verified by Delta; the app name is a claim made by a process that is already trusted to be on that Mac. The apps list keeps well-behaved apps in their lanes and makes mistakes loud. It is not a wall between two programs running under the same account, and a writer that must tell two such apps apart needs more than a header.
Three Shares, Three Audiences: Soul Vault
Soul Vault's declaration shows the whole vocabulary in one file. The store lives on the Mac that holds the Pippa role, and it is served three times, to three different audiences:
store: readers{"fleet": true}, writers{"fleet": true}, apps["cwkSoulVault"]. Every family Mac reads the vault and may ask the store to write a note, and only Soul Vault's own client may do either.household: readers{"groups": ["household"]}, no writers, andoptions.vaultsnarrowing it to two vaults. The household's Mac is outside Delta's fleet, sofleet: truenever includes it; the only way in for that Mac is a share whose declaration names its group. This one does, read-only, for exactly two vaults.vault-reader: readers{"groups": ["vault_reader"]}, the same two vaults, read-only: for a group of machines that run no Delta of their own and ask this Mac's gateway directly.
The household and vault-reader shares are a second child, ScopedStoreShare, whose writable() returns False. So a write call aimed at either is refused by the root's rule before the child's code is asked anything, and the child's own call refuses again for good measure. Least privilege here is not a promise in a comment; it is three declarations and one boolean.