mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-10-27 16:02:05 +00:00
2.1 KiB
2.1 KiB
SeedPass Auth, Lock/Unlock & Access-Control Review (Item 6)
Status: Done
Date: 2026-02-25
Scope Reviewed
src/seedpass/core/manager.pysrc/seedpass/api.pysrc/seedpass/core/api.pysrc/seedpass/core/config_manager.py
Exit Criteria Check (Item 6)
- Lock/unlock/timeout/quick unlock behavior reviewed with tests:
Done
Findings
Completed in this pass
- Added explicit locked-state gate for protected HTTP API routes.
- Sensitive endpoints now reject access with
423 Vault is lockedwhen lock flags are set.
- Sensitive endpoints now reject access with
- Added explicit HTTP unlock endpoint.
- New route:
POST /api/v1/vault/unlockusingX-SeedPass-Password.
- New route:
- Added API regression tests for lock enforcement and unlock flow.
- Entry/password endpoints blocked while locked.
- Unlock endpoint clears locked state path.
- Tightened admin/config access controls while locked.
- Config, relay, checksum, and selected profile-management routes now require unlocked state.
- Restricted sensitive config key exposure/update.
password_hashandpin_hashaccess/update blocked via generic config API.
- Added unlock-attempt throttling on API unlock route.
- Repeated failed unlock attempts now return
429after threshold.
- Repeated failed unlock attempts now return
Validation
pytest -q src/tests/test_api_new_endpoints.py src/tests/test_api.py src/tests/test_vault_lock_flag.py src/tests/test_inactivity_lock.py src/tests/test_unlock_sync.py- Result:
65 passed
Existing posture
- Core manager has
lock_vault()/unlock_vault()and publishes lock events. - Inactivity timeout enforcement exists via
AuthGuard. - Quick unlock behavior is configurable and covered by existing tests.
Policy decisions
- Non-sensitive fingerprint list/select routes remain available while locked to support pre-unlock profile selection.
- Admin/config/data routes are lock-gated.
- Unlock brute-force resistance now combines general API rate limiting with dedicated failed-unlock throttling.
Evidence
src/tests/test_api_new_endpoints.pysrc/tests/test_vault_lock_flag.pysrc/tests/test_inactivity_lock.pysrc/seedpass/api.pysrc/seedpass/core/manager.py