Files
pyMC_Repeater/tests
agessaman 2050f1b71e feat(acl): keep ACL entries across restarts and implement setperm
Firmware keeps its ACL in /s_contacts, so a key provisioned over serial with
`setperm <pubkey> 3` logs in with a blank password forever after. Ours was
RAM-only and setperm was a stub, so that workflow could not work.

- New acl_entries table, keyed by the local identity's full 32-byte public
  key rather than its 1-byte hash, which collides between identities. An
  identity_label ("repeater", "room_server:<name>") lets an identity adopt
  its rows after a key change, as firmware's ACL survives a new private key.
  Shared secrets are derived on load, never stored.
- The repeater stores every entry with permissions, a room server admins
  only (firmware saveFilter). A write happens only when an entry's stored
  permissions change, so a returning admin costs no I/O.
- setperm follows ClientACL::applyPermissions and firmware's replies: atoi
  permissions stored as the whole byte, a guest role deletes by key prefix,
  other roles need the full key. It refuses an empty prefix and a key that
  is not a valid ed25519 point, both of which firmware accepts.
- `get acl` works from the web CLI (the serial stand-in, passed local=True)
  and still errors remotely. It was unreachable: "get " matched it first.
- A full table evicts the least active non-admin, as firmware putClient,
  instead of refusing; it still refuses when every entry is an admin.
- Room servers keep a stored admin through inactivity eviction and do not
  push to entries that have not logged in since load, as firmware skips
  clients with no activity.
- Deleting a room server drops its stored entries.
2026-10-02 10:48:10 +01:00
..