Simpl-Resultat/src/hooks
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
..
useAdjustments.ts feat: add Budget and Adjustments pages with full functionality 2026-02-12 00:58:43 +00:00
useAuth.ts feat: Maximus Account OAuth2 PKCE + machine activation + subscription check (#51, #53) 2026-04-10 14:18:51 -04:00
useBalanceAccounts.ts feat(balance): account form vehicle field + category rename via custom_label (#203) 2026-06-01 20:50:40 -04:00
useBalanceOverview.test.ts feat(balance): add useBalanceOverview hook 2026-04-25 16:06:38 -04:00
useBalanceOverview.ts feat(balance): per-security drill-down + latent gain in accounts table (#216) 2026-06-06 13:49:57 -04:00
useBudget.test.ts feat(budget): adopt multi-level collapse on the Budget grid 2026-07-15 21:16:01 -04:00
useBudget.ts feat(budget): adopt multi-level collapse on the Budget grid 2026-07-15 21:16:01 -04:00
useCartes.test.ts feat(reports/cartes): Mensuel/YTD toggle on KPI cards + user guide section (#102) 2026-04-19 09:49:21 -04:00
useCartes.ts feat(reports/cartes): Mensuel/YTD toggle on KPI cards + user guide section (#102) 2026-04-19 09:49:21 -04:00
useCategories.ts feat: add 3rd level of category hierarchy 2026-02-25 19:54:05 -05:00
useCategoryMigration.test.ts feat(categories): merge custom categories into the standard taxonomy (#259) 2026-07-19 19:43:47 +00:00
useCategoryMigration.ts feat(categories): merge custom categories into the standard taxonomy (#259) 2026-07-19 19:43:47 +00:00
useCategoryTaxonomy.ts feat(categories): add categoryTaxonomyService + useCategoryTaxonomy hook (#116) 2026-04-20 20:53:15 -04:00
useCategoryZoom.ts feat: category zoom + secure AddKeywordDialog with context menu (#74) 2026-04-14 15:09:17 -04:00
useCollapsibleGroups.ts feat(reports): collapse category hierarchy at every level (socle + 3 reports) 2026-07-15 20:58:18 -04:00
useCompare.test.ts fix(reports): StrictMode-safe period sync + review polish (#253) 2026-07-05 19:37:22 -04:00
useCompare.ts feat(reports): adopt shared FilterPanel on Compare and Budget 2026-07-11 15:52:21 -04:00
useDashboard.ts feat(dashboard): converge home page on the Cartes report model 2026-07-11 17:13:23 -04:00
useDataExport.ts fix(export): preserve import sources and templates across data export/import 2026-08-14 10:58:52 -04:00
useDataImport.ts fix(export): preserve import sources and templates across data export/import 2026-08-14 10:58:52 -04:00
useEntitlement.ts feat(gating): license provider + entitlements matrix + useEntitlement (#297) 2026-07-19 21:05:10 -04:00
useFeedback.test.ts feat: feedback hub widget in Settings Logs card (#67) 2026-04-17 14:36:26 +00:00
useFeedback.ts feat: feedback hub widget in Settings Logs card (#67) 2026-04-17 14:36:26 +00:00
useHighlights.test.ts feat(reports/highlights): default reference month to previous month + YTD current year, user-changeable (#106) 2026-04-19 08:28:30 -04:00
useHighlights.ts feat(reports/highlights): default reference month to previous month + YTD current year, user-changeable (#106) 2026-04-19 08:28:30 -04:00
useImportHistory.ts feat: 12-month budget grid, import UX improvements, confirmation dialogs (v0.2.4) 2026-02-14 12:59:11 +00:00
useImportWizard.ts feat(import): recognise known bank layouts and report format drift 2026-08-13 14:54:46 -04:00
useIsPremium.test.ts fix(license): name key-entry errors, keep the edition off the activation token, flag revoked keys 2026-09-29 21:39:01 -04:00
useIsPremium.ts feat(gating): license provider + entitlements matrix + useEntitlement (#297) 2026-07-19 21:05:10 -04:00
useLicenseMachines.test.ts fix(license): send a derived machine identifier, never the OS machine id (#350) 2026-10-01 19:52:48 -04:00
useLicenseMachines.ts fix(license): name key-entry errors, keep the edition off the activation token, flag revoked keys 2026-09-29 21:39:01 -04:00
useReportsPeriod.test.ts feat(reports): extend useReportsPeriod with account filter foundation 2026-07-11 15:01:43 -04:00
useReportsPeriod.ts feat(reports): extend useReportsPeriod with account filter foundation 2026-07-11 15:01:43 -04:00
useSnapshotEditor.test.ts feat(balance): CSV import of holdings in detailed snapshot 2026-07-04 18:04:12 -04:00
useSnapshotEditor.ts fix(import): read amounts with an anchored parser and a real debit/credit rule 2026-08-13 13:37:06 -04:00
useTheme.ts feat: add dark mode with famille-website-inspired warm gray palette 2026-02-13 12:28:11 +00:00
useTransactions.ts feat: add transaction split adjustments across multiple categories 2026-02-16 23:51:36 +00:00
useTrends.ts feat(reports): adopt shared FilterPanel on the Trends page 2026-07-11 15:41:13 -04:00
useUpdater.ts feat: gate auto-updates behind license entitlement (#48) 2026-04-09 15:52:59 -04:00