UI review: docs, summary and plan

Summary of U1-U18, change log row, APP_UI README, UI architecture,
accepted risk of the token in localStorage.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ayurishchevandClaude Sonnet 5.5 committed 2026-10-07 13:14:40 +03:00
1 parent 32d6b0e525
commit 9443ab6fce
6 files changed
+195 -16

No files matched your search

+6 -3
View File
@@ -58,10 +58,13 @@ This includes:
- Add `Logout` button to the sidebar.
- Conditionally render Sidebar only if logged in (optional, or just redirect).
#### [MODIFY] [main.js](../../APP_UI/src/main.js)
- Setup `axios` interceptors:
#### [MODIFY] [composables/useApi.js](../../APP_UI/src/composables/useApi.js)
- `axios` interceptors (there is no global interceptor in `main.js`):
- **Request**: Add `Authorization: Bearer <token>`.
- **Response**: On `401 Unauthorized`, clear token and redirect to `/login`.
- **Response**: On `401 Unauthorized` from the monitoring or profiler API, clear token and redirect to `/login`. The `/api/auth` client does not do this: `401` there means a wrong current password or 2FA code (change-password, change-username), which the form shows as an error.
#### Token storage (accepted risk)
- The JWT is kept in `localStorage`, so a script running on the page (XSS) can read it. Mitigations: no `v-html` with data, CSP `script-src 'self'` and `X-Frame-Options` in the container nginx (`APP_UI/default.conf.template`). `HttpOnly` cookies would need a cookie scheme and CSRF protection in `APP_CORE`; not planned. Open item: `POST /auth/disable-2fa` does not ask for the password or a 2FA code.
## Backups