Skip to content

distributed: gossip has no message authentication, and cache-warming would make that a content-injection path #206

Closed

Description

@scttfrdmn

internal/distributed gossip has no message authentication. Grep across the package for hmac, HMAC, sharedSecret, SharedSecret, authKey returns zero non-test hits.

So any host that can reach the gossip port can join the cluster, announce cache ownership for arbitrary keys, and — once #141/#142 land cache-warming reads that fetch from peers — serve arbitrary bytes as the contents of a cached object. That is the part that makes this a data-integrity issue rather than an availability one: a peer's response becomes file content the kernel hands to a reading process.

Today the exposure is bounded because the cache-coordination path is not wired (cache.NewFromConfig has no caller, #178) and executeLocally calls the backend directly. It stops being bounded the moment the v0.12.0 cache-warming issues land. This should be resolved before #142, not after — a peer-fetch path with unauthenticated peer discovery is a remote content-injection primitive, and retrofitting auth under a working feature is how it gets deferred indefinitely.

Design notes, to avoid the obvious wrong turns:

  • A shared cluster secret with HMAC on every gossip message is the proportionate answer for the deployment model here (a trusted HPC network, single tenant). Not TLS/mTLS — the cost of certificate distribution across compute nodes is what would make it never get deployed.
  • The secret has to come from a file or environment, never a YAML field in a config users are told to copy. configs/example.yaml is installed to /etc/objectfs/config.yaml by postinstall.sh, world-readable.
  • Replay protection matters for ownership announcements specifically: an HMAC that authenticates a stale "I own key K" is still wrong. Include a nonce or a monotonic sequence per node, which the gossip heartbeat work (A1-5: Populate NodeInfo stats via gossip heartbeat #132) is already touching.
  • Reject unauthenticated messages loudly and count them. A silent drop makes a misconfigured secret indistinguishable from a network problem.

Verification: an unauthenticated peer's join and its ownership announcements are both rejected; a replayed authenticated announcement is rejected; and — the one that catches the real failure — a node with the wrong secret fails to join with an error naming the reason, rather than joining a cluster of one.

Activity

  1. added
    type: security
    priority: high
    area: distributed
    needs-design
    effort: large
    on Aug 2, 2026
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

    area: distributedeffort: largeneeds-designpriority: hightype: security

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions