Skip to content

Root pod (--single-user) leaks .idp/ and .quota.json in container listing #350

Closed

Description

@melvincarvalho

Summary

When --single-user is used at the new default (root pod, #348), the data-root and pod-root coincide. Server-internal state directories that previously lived as siblings of the pod (.idp/, .quota.json, etc.) are now inside the pod's container, and they appear in the LDP container listing for /.

Their contents are still ACL-gated for read, but the listing leaks their existence to anyone who can fetch the pod root, and gives attackers free path-fingerprinting (e.g. probe /.idp/keys/ to detect a JSS install).

Reproduce

jss start --single-user --idp --port 4443
curl http://localhost:4443/ -H 'Accept: application/ld+json' | jq '.contains[]."@id"'

Output on a fresh root-pod install:

http://localhost:4443/.acl          ← legitimate (Solid pod ACL)
http://localhost:4443/.idp/         ← LEAK — OIDC keys/accounts/sessions
http://localhost:4443/.quota.json   ← LEAK — quota sidecar
http://localhost:4443/hub/
http://localhost:4443/inbox/
http://localhost:4443/private/
http://localhost:4443/profile/
http://localhost:4443/public/
http://localhost:4443/settings/

.acl is supposed to appear (it's a regular Solid pod resource). .idp/ and .quota.json are not.

Why this didn't show up before #348

Named-pod mode (/me/) puts the pod under a subdirectory of the data root, so internal sidecars like <root>/.idp/ and <root>/me/.quota.json weren't sibling to the listed container. The root-pod default added in #348 collapses the two layers, exposing the internal files.

Proposed fix

In the container listing builder (src/ldp/container.js / wherever entries are enumerated before generateContainerJsonLd), filter out a denylist of server-internal names before emitting ldp:contains:

  • .idp (OIDC state)
  • .quota.json (quota sidecar — already skipped at the per-resource level, but still listed)
  • Any future internal control directories (.well-known writes, .git if present from --git, etc.)

The filter should fire for any container, not just the root pod — internal sidecars are inappropriate to expose anywhere they happen to coincide.

Out of scope

  • Hardening the routing layer to also 404 direct GETs of these paths (defense-in-depth) — separate issue if wanted.
  • Backwards-compatibility for clients that may depend on seeing .quota.json in listings — none known; the field is internal.

Acceptance

  • GET / (root pod) returns an LDP listing that does not include .idp/ or .quota.json as ldp:contains entries.
  • .acl still appears (legitimate Solid resource).
  • Existing per-pod listings (named-pod mode) also drop these internal entries if any happen to be present.
  • A regression test pinning the denylist behavior so a future internal directory can't silently re-expose state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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