security(auth,ws): fix Auth/TOTP/WebAuthn/bootstrap vulnerabilities, session idle TTL & real-time WS revocation

This commit is contained in:
tyuXX 2026-11-27 22:31:37 +00:00
parent e3f716d24f
commit 1b2e425a00
13 changed files with 1248 additions and 477 deletions

View file

@ -188,12 +188,12 @@ describe('Always-on background collectors & write-only Vault lock', () => {
});
api = createApiClient(activeServer);
// Before ANY user logs in, status is unauthenticated + write-locked, yet runtime collectors run immediately
// Before ANY user logs in, status is unauthenticated and omits internal vault state, yet runtime collectors run immediately
const preLoginStatus = await api.call('/api/auth/status');
expect(preLoginStatus.status).toBe(200);
expect(preLoginStatus.data.authenticated).toBe(false);
expect(preLoginStatus.data.vaultState).toBe('locked');
expect(preLoginStatus.data.vaultRuntimeReady).toBe(true);
expect(preLoginStatus.data.vaultState).toBeUndefined();
expect(preLoginStatus.data.vaultRuntimeReady).toBeUndefined();
const latestBeforeLogin = await waitFor(
() => activeServer!.monitoringService.getLatest('srv-1')?.sample,