Commit Graph
14 Commits
Author SHA1 Message Date
agessaman fd338f5bca Merge branch 'feat/repeater-poll' into observer-firmware-poll 2026-11-28 16:44:40 -08:00
agessaman 1ce7002aa2 feat(poll): sign each target's state, misses and requested flag
Beacon moves targets on all three: admin_stop/not_direct drop the
observer, 3+ misses ranks it as failing, admin_stop/login_failed on a
requested target update the request, and requested counts against seats.
Each target in the signed message is now

  <node_id>:<state>:<misses>:<1 if requested, else 0>

sorted by node_id. The values are the ones the JSON writes. The reference
verifier checks their shape, refuses duplicate node_ids, and its
firmware-signed vector now carries mixed states.
2026-11-28 16:44:37 -08:00
agessaman 5e2d815cec Merge branch 'feat/repeater-poll' into observer-firmware-poll 2026-11-28 16:11:33 -08:00
agessaman 6279d037ef feat(poll): sign request_slots and max_slots in claims
Beacon sizes requested-target assignments from these two counts, so the
claim signature now covers them:

  corescope-claim/v1|<origin_id>|<poll_url>|<timestamp>|<community>|
    <accepts_requests>|<request_slots>|<max_slots>|<sorted node_ids>

The message builder takes ClaimOptions so the signed values are the ones
the JSON writes, clamped the same way; a claim without max_slots is not
signed. The reference verifier requires both as integers and its
firmware-signed vector is regenerated.
2026-11-28 16:11:30 -08:00
agessaman 24f1db67e6 Merge branch 'feat/repeater-poll' into observer-firmware-poll 2026-11-28 16:01:44 -08:00
agessaman f16e4f55f1 feat(poll): sign the community and request opt-ins in claims
The claim signature now covers community and accepts_requests, so a relay
cannot flip either without breaking it:

  corescope-claim/v1|<origin_id>|<poll_url>|<timestamp>|<community>|
    <accepts_requests>|<sorted node_ids>

Booleans are written true/false. The reference verifier and its
firmware-signed test vector follow.
2026-11-28 16:01:35 -08:00
agessaman 525e58215c Merge branch 'feat/repeater-poll' into observer-firmware-poll 2026-11-28 15:37:10 -08:00
agessaman 382731bb55 fix(poll): tighten claim host parsing and the reference verifier
- poll_url needs an http(s) URL with a non-empty host
- verify_poll_claim.py: 1 h freshness window by default, ReplayGuard for
  per-node replay, v == 2 and at most 8 nodes, 64 KiB input cap, and
  clean rejection of deeply nested JSON
- document which claim fields the signature covers
2026-11-28 15:37:01 -08:00
agessaman 71b071f657 Merge branch 'feat/repeater-poll' into observer-firmware-poll 2026-11-28 15:21:30 -08:00
agessaman 5445c2f8f1 feat(poll): sign JSON claims with the node key
A claim naming its analyzer (poll_url) now carries "sig", an Ed25519
signature by the node key over a field-built message:

  corescope-claim/v1|<origin_id>|<poll_url>|<timestamp>|<sorted node_ids>

so a receiver can check that the claim came from origin_id and names that
analyzer and target list, even after a relay re-encodes the JSON. A claim
whose signature fails its own check is not sent and retries after 60 s.

- poll_url is left out when the host has a byte outside [a-z0-9.:[]-]
- the signed message is built in the claim buffer, off the loop stack
- kClaimJsonMax 3328, sized for a fully escaped policy version
- a claim result from before a poll.url change no longer updates the new
  analyzer's claim timers
- scripts/verify_poll_claim.py: reference verifier with a firmware-signed
  test vector; CI installs cryptography for it
2026-11-28 15:21:08 -08:00
agessaman b754f815b7 Support switching Observer firmware to and from poll 2026-11-28 08:58:53 -08:00
agessaman 6c7df5a760 build: enable automatic reduced TLS for observer releases 2026-11-10 19:48:18 -08:00
agessaman 86ecda65fc build: pin and cache reduced TLS release archives 2026-11-10 19:48:16 -08:00
agessaman 75610dfc6e build: select reduced TLS for non-PSRAM observers 2026-11-10 19:48:14 -08:00