OTP security hardened
This commit is contained in:
@@ -6,12 +6,24 @@ Address SA-007 and use linklog.example.com as default LINKLOG_PUBLIC_URL.
|
||||
### Assistant outcome
|
||||
Hardened the production Compose deployment by removing direct host port publication, keeping the app on the external Traefik network, and using `linklog.example.com` as the default public hostname. Added `docker-compose.local.yml` for explicit local direct-port development, updated `.env.example`, backend defaults, README deployment instructions, and SA-007 status.
|
||||
|
||||
### User
|
||||
Fix SA-009: TOTP enrollment has no recovery codes or reset workflow.
|
||||
|
||||
### Assistant outcome
|
||||
Implemented ten one-time hashed TOTP recovery codes, a password-protected `/api/user/otp/recover` workflow, password reauthentication for normal OTP disablement, one-time code consumption, and profile-page controls for saving and using recovery codes. Updated SA-009 and the deployment checklist.
|
||||
|
||||
### User
|
||||
Continue SA-06: Store session credentials in the narrowest available extension storage, minimize token lifetime, support refresh-token rotation, and clear all session material on logout or token invalidation.
|
||||
|
||||
### Assistant outcome
|
||||
Implemented SA-006 session hardening: access tokens now default to 15 minutes, refresh tokens are hashed and persisted separately with device and family binding, rotation revokes prior family state and detects reuse, and password reset revokes sessions. The extension uses Firefox session storage for credentials, refreshes on 401, clears session and legacy local token keys on invalidation/logout, requests only the configured backend origin, and uses a self-only extension-page CSP.
|
||||
|
||||
### User
|
||||
Also allow an admin to reset (disable) OTP for any user.
|
||||
|
||||
### Assistant outcome
|
||||
Added an administrator-only OTP reset endpoint and admin UI action. Resetting a user clears the OTP seed, disables OTP, and deletes all recovery codes. The operation never returns OTP secrets or recovery material and is covered by authorization, missing-user, state, and recovery-code invalidation tests.
|
||||
|
||||
### User
|
||||
Implement SA-006 permission changes: remove `<all_urls>` and unnecessary `tabs`, request exact access to the configured self-hosted backend, and keep page capture behind `activeTab`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user