Skip to content

Authenticate store permission classes - #53

Merged
jhuntwork merged 2 commits into
mainfrom
store-permission-identity
Aug 23, 2026
Merged

Authenticate store permission classes#53
jhuntwork merged 2 commits into
mainfrom
store-permission-identity

Conversation

@jhuntwork

@jhuntwork jhuntwork commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Store identity v3 collapses materially different runtime permissions: modes such as 0600 and 0644, or 0700 and 0755, can identify the same content. Because manifest v4 signs that v3 hash and full verification recomputes it, those access-class differences are neither authenticated nor detected. Review should establish a new identity contract without changing the meaning of any artifact Mere already reads.

Store identity v4 prefixes mere-store-content-v4\0 and records a little-endian u16 canonical mode of mode & 07555 for files and directories. This authenticates user, group, and other read/execute classes plus setuid, setgid, and sticky bits. Write bits remain normalized away because admission removes them; ownership, timestamps, ACLs, xattrs, and symlink modes remain outside identity.

New packages use manifest v5, which selects store hash v4 and retains the domain-separated signature envelope. Manifest v1 through v4 and store hash v1, transitional, v2, and v3 keep their frozen readers and meanings. Older Mere versions are intentionally unable to consume manifest-v5 packages.

Packaging, import, installation, activation, and both full-verification paths share an explicit manifest-to-hash mapping. Newest-first manifest detection has one owner, and v5 cannot be interpreted with v3 hashing.

Archive round-trip coverage exposed that staged extraction recreated directories with default permissions. The merge now restores ordinary directory modes through no-follow handles while preserving the existing separate policy for special bits, so the mode hashed before packaging is the mode verified after extraction.

Store identity now distinguishes the read, execute, and special permission classes that survive admission, so packages with materially different runtime access cannot share a store path. Write bits, ownership, and other environment-dependent metadata remain outside identity.

Manifest v5 selects the additive v4 identity while every prior manifest and hash format keeps its original meaning. Archive extraction now preserves ordinary directory permissions so packaged intent and verified realized state remain identical.
The specification now records every store-hash domain prefix and clarifies the directory record shape, so independent implementations can reproduce v4 without inferring protocol bytes from source. It also identifies both manifest formats that use the domain-separated signature envelope.
@jhuntwork
jhuntwork merged commit 691b887 into main Aug 23, 2026
2 checks passed
@jhuntwork
jhuntwork deleted the store-permission-identity branch August 23, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant