Simpl-Resultat/docs
le king fu e5662ad018
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 1m49s
PR Check — Rust / rust (pull_request) Successful in 9m19s
fix(license): send a derived machine identifier, never the OS machine id (#350)
Activation sent `machine_uid::get()` as is: /etc/machine-id on Linux,
MachineGuid on Windows. machine-id(5) calls that id confidential and asks
applications to send a keyed hash under a fixed, application-specific key
instead. The license server stores what it receives next to the license
email and the host name, lists it back and signs it into the activation
token.

- derive_machine_id: HMAC-SHA256 under a frozen key, 64 lowercase hex
  characters, pinned by two reference vectors. An empty OS id is refused,
  never hashed.
- Activation sends the derived identifier and requires the issued token to
  carry it. Nothing else originates a machine identifier.
- A machine activated before this change stays activated: a valid token
  whose claim is the raw id of this machine still reads "Activated" (D1).
- The machine list flags `is_this_machine` in Rust, for a row under either
  identifier (D3). `ActivationStatus` no longer carries an identifier and
  the unused `get_machine_id` command is removed: no command hands the OS
  id to the webview any more.
- After a deactivation the local token is dropped when it stood for the
  freed slot: any row of this machine takes it, except the old raw row
  while the token stands for the derived one.
- ADR 0020 records the derivation, the transition and the condition for
  removing the raw-id compatibility.

Behaviour changes beyond the issue text: the machine list and a
deactivation no longer fail on an unreadable OS id (best effort), the
activation status then reads "not activated" instead of failing, and the
unused `store_activation_token` command refuses a token issued for the
raw id.

No new dependency (hmac and sha2 were already declared); Cargo.lock is
untouched. Rust 151 -> 168 tests, vitest 1311 -> 1314.

Refs #350

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 19:52:48 -04:00
..
adr fix(license): send a derived machine identifier, never the OS machine id (#350) 2026-10-01 19:52:48 -04:00
archive docs: organize technical documentation into docs/ folder 2026-02-19 07:34:01 -05:00
analyse-onboarding-2026-09.md docs: add the onboarding analysis behind spec-onboarding-phase1 2026-09-30 21:21:14 -04:00
api-contract-prices.md fix(license): name key-entry errors, keep the edition off the activation token, flag revoked keys 2026-09-29 21:39:01 -04:00
architecture.md fix(license): send a derived machine identifier, never the OS machine id (#350) 2026-10-01 19:52:48 -04:00
audit-bilan-2026-05.md feat(balance): audit quick wins — terminology, optional symbol, movable snapshot date (#201) 2026-05-31 21:05:13 +00:00
guide-utilisateur.md fix(license): send a derived machine identifier, never the OS machine id (#350) 2026-10-01 19:52:48 -04:00
qa-refonte-seed-categories-ipc.md test(categories): complete test coverage for migration flow (#123) 2026-04-21 19:25:13 -04:00
qa-update-cycle.md fix(license): name key-entry errors, keep the edition off the activation token, flag revoked keys 2026-09-29 21:39:01 -04:00