Skip to content

docs: git-on-Solid — architectural patterns and security surfaces #1

Description

@melvincarvalho

Background

JSS supports git over HTTP via git-http-backend. As git-on-Solid usage grows (agent workflows, versioned data, lightweight collaboration), JSS docs would benefit from a clear treatment of how git and Solid compose — and how they don't.

This issue proposes a docs page covering the architectural patterns and security surfaces involved.

The architectural question

Git and Solid are different protocols with different security surfaces:

Aspect Solid Git
Resource model URL-addressable resources Content-addressed objects (SHA-keyed)
Access control Per-resource (WAC, ACP) Per-repository
State boundary All resources URL-accessible by design .git/ is internal protocol state, not transport
Read pattern GET single resource git clone (full object graph in one operation)

Two patterns emerge:

Pattern A — URL-flattening

Store the working tree (including .git/) as Solid resources. Each file in .git/ becomes individually addressable via Solid's normal serving semantics.

  • Pros: No extra server tooling; uses Solid's native model.
  • Cons: Exposes .git/HEAD, refs, and packed objects as URL-accessible. Read access to any one yields the full repository history. Git's repo-level access model is replaced by Solid's per-resource ACL, which doesn't naturally express "all of .git/ is internal."

Pattern B — Protocol gateway

Serve git through git-http-backend (smart-HTTP), block direct .git/ URL access at the server layer.

  • Pros: Preserves git's repo-level access model; clients use the standard git clone/push/pull protocol; .git/ internals are not URL-addressable.
  • Cons: Requires server-side git tooling.

JSS implements Pattern B.

Why this matters

Mixing protocols by URL-flattening one into another is a recurring web anti-pattern (early CGI exposing .htaccess, filesystem-mapped HTTP servers leaking dotfiles). The general principle: a protocol's "internal state" boundary should not become another protocol's "publicly addressable" surface.

For git, this matters specifically because the entire repo history is always present in .git/. There is no way to use Solid's per-resource ACL to expose "just the latest version" — once any .git/object/... is reachable, the full DAG is reachable.

Prior work

Proposed docs page

A new page under docs/ (e.g., docs/git-on-solid.md) covering:

  1. Overview — use cases including agent workflows (cf. GitFork-style ephemeral repos, https://gitfork.app), versioned personal data, and lightweight collaboration
  2. Two architectural patterns — the table above plus prose
  3. Security comparison — what each pattern exposes; ACL/repo-level model mismatch under URL-flattening
  4. JSS reference patterngit-http-backend behind Solid auth, minimal worked example
  5. Server-side dotfile policy — recommend blocking .git/, .env, .ssh/ by default
  6. Cross-references — Issue docs(features/charlie): embed SolidMap demo video #28, the gist, related Solid spec pages

Happy to draft the initial page if this issue gets a green light.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions