The only way to give a gateway a printer was to edit printers.toml and restart it. A printer added from the console now arrives as a provision_printer message, is checked by actually connecting to it (so a mistyped access code is reported to the operator, not discovered later), and only then is saved to the gateway's own SQLite file and joined to the running fleet - no restart. remove_printer undoes it. Both are answered with a command_result carrying the request id. The access code exists only on the gateway: the cloud relays it once and keeps nothing, which is the platform's rule for printer credentials. The store file is created owner-only; the message type's Debug and the fleet entry's Debug redact the credential; and an unparseable message from the cloud is no longer logged with its payload, because the message that fails to parse is exactly the one carrying an access code. The cloud may not choose a certificate path or serial port on the gateway's disk, so provision_printer cannot carry them. Startup now reads printers.toml (strict, as before; a missing file is fine) and the store (a bad stored entry is skipped, not fatal), so the gateway comes up with its fleet with the API unreachable. Discovery treats stored printers as already configured. rusqlite (MIT, bundled SQLite) passes cargo deny.
21 lines
312 B
Plaintext
21 lines
312 B
Plaintext
/target
|
|
*.db
|
|
*.db-journal
|
|
*.sqlite
|
|
*.sqlite3
|
|
.env
|
|
*.log
|
|
printers.toml
|
|
/certs/pinned/
|
|
|
|
# Generated by the daemon from what the printers report, and it holds their
|
|
# access codes.
|
|
go2rtc.yaml
|
|
go2rtc.yaml.tmp
|
|
continuum.toml
|
|
go2rtc.yaml.pid
|
|
|
|
# The local store holds printer access codes.
|
|
continuum.db
|
|
continuum.db-*
|