Commit Graph

13 Commits

Author SHA1 Message Date
Oleksandr Bezdieniezhnykh 5e90512987 [AZ-197] Remove hardware ID binding from resource flow
Sealed-Jetson + SaaS architecture eliminates the credential-reuse-across-
machines threat that motivated hardware fingerprint binding. The binding's
only remaining effect was a real production failure mode on legitimate
hardware events.

Production:
- Drop PUT /users/hardware/set and POST /resources/check.
- Simplify POST /resources/get/{dataFolder?} (no Hardware field).
- Remove CheckHardwareHash, UpdateHardware, Security.GetHWHash.
- GetApiEncryptionKey signature: (email, password) — no hardwareHash.
- Drop SetHWRequest DTO and Hardware property from GetResourceRequest.
- Remove HardwareIdMismatch (40) and BadHardware (45) ExceptionEnum
  entries; numeric codes left as a gap, not for reuse.

Wire-compat policy: drop entirely (no Loader; no in-flight legacy
clients). Stale callers will see 404s, which is the right loud failure.

Tombstones:
- User.Hardware DB column kept (nullable, unused) — separate cleanup
  ticket for the migration per workspace "no rename without confirmation".
- User.LastLogin is now never written by app code (only writer was inside
  the deleted CheckHardwareHash); flagged in batch_06_review for a future
  ticket.

Tests:
- Delete e2e HardwareBindingTests (165 lines) and Azaion.Test
  UserServiceTest (sole test was CheckHardwareHashTest).
- Drop Hardware payloads + /resources/check preconditions from e2e
  ResourceTests, SecurityTests, ResilienceTests; drop hardwareId arg
  from Azaion.Test SecurityTest.
- Add SecurityTests.Hardware_endpoints_are_removed_AZ_197 (AC-2 regression
  asserting both removed routes return 404).

Docs:
- architecture.md: System Context note, ADR-003 new key formula, ADR-004
  retired with rationale.
- diagrams/flows/flow_hardware_check.md: tombstoned.

Also archives the four batch-1+batch-2 task files into _docs/02_tasks/done/
(file moves were missed by the batch_05 commit).

Code review: PASS — see _docs/03_implementation/reviews/batch_06_review.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-13 04:46:39 +03:00
Oleksandr Bezdieniezhnykh 88c7b288df [AZ-199] [AZ-200] [AZ-201] [AZ-202] Fix API bugs
Made-with: Cursor
2026-04-16 06:55:11 +03:00
Oleksandr Bezdieniezhnykh 5286b6b8e3 [AZ-198] Block disabled user login
Made-with: Cursor
2026-04-16 06:49:00 +03:00
Alex Bezdieniezhnykh 0458739126 fix reset hw endpoint 2025-05-02 11:17:45 +03:00
Alex Bezdieniezhnykh eb043e94a8 switch to hardware string from object 2025-05-02 10:14:40 +03:00
Alex Bezdieniezhnykh 55f4e8b3a6 add exceptions handler 2025-04-17 00:27:56 +03:00
Alex Bezdieniezhnykh c1f47f0e8d Revert "add correct business exception handling"
This reverts commit b1693b2894.
2025-04-16 20:47:01 +03:00
Alex Bezdieniezhnykh b1693b2894 add correct business exception handling
use <FrameworkReference Include="Microsoft.AspNetCore.App" /> instead of old nuget packages
2025-04-16 13:32:16 +03:00
Alex Bezdieniezhnykh f5e466108a renmove ResourceEnum, use filename only
add ToHash for encryption Key
2024-11-22 12:13:37 +02:00
Alex Bezdieniezhnykh 4bc76bbbac structure app by rest api standards
add getusers
tidy up BusinessException
2024-11-14 22:45:36 +02:00
Alex Bezdieniezhnykh ddbf8114ba db works, upload works 2024-11-12 22:16:50 +02:00
Alex Bezdieniezhnykh 85139b4fd2 add authorization 2024-11-11 21:07:28 +02:00
Alex Bezdieniezhnykh 121052a3ef Init commit
add security encryption and hashing: WIP
add endpoints: register user, get and save resources
add db main operations, User entity
2024-11-09 00:37:43 +02:00