feat(sessions): implement user session management with session tracking and revocation

- Introduced new database schema for user sessions and session events.
- Implemented session management page with filtering, sorting, and revocation capabilities.
- Added backend services for creating, revoking, and expiring user sessions.
- Implemented session cookie handling and security measures.
- Created tests for session management functionalities and security features.
This commit is contained in:
KodekaTeam committed 2026-09-11 13:34:01 +07:00
1 parent b731194014
commit 87fdbb493b
33 files changed
+2878 -1296

No files matched your search

@@ -28,6 +28,16 @@ test("redeploy endpoints require container write authorization", () => {
assert.match(routes.slice(previewStart, previewStart + 180), /containerReadAccess/);
});
test("internal deployment jobs retain browser session authentication", () => {
const helperStart = routes.indexOf("function buildInternalJobHeaders");
assert.ok(helperStart >= 0, "internal job header builder should exist");
const helper = routes.slice(helperStart, helperStart + 900);
assert.match(helper, /"x-doktainer-request": "1"/);
assert.match(helper, /const cookie = headers\.cookie/);
assert.match(helper, /nextHeaders\.cookie = cookie/);
});
test("redeploy restores the stored current revision without invoking source rebuild", () => {
assert.match(redeployService, /redeployContainerCurrentRevision/);
assert.match(redeployService, /getRollbackSnapshot\(input\)/);