feat(dashboard): add optional login authentication (#319)

Add session-based username/password auth for CCS dashboard:
- Backend: Express session middleware with bcrypt password verification
- Frontend: React AuthContext, login page, protected routes
- Config: dashboard_auth section in config.yaml + env var overrides
- Security: Rate limiting (5 attempts/15min), persistent session secret
- 16 unit tests for auth middleware

Auth disabled by default for backward compatibility.
This commit is contained in:
kaitranntt committed 2026-01-13 13:27:38 -05:00
1 parent dcc5c5d4ed
commit 464b410e8b
18 files changed
+1110 -21

No files matched your search

+5
View File
@@ -81,11 +81,13 @@
"postinstall": "node scripts/postinstall.js"
},
"dependencies": {
"bcrypt": "^6.0.0",
"boxen": "^5.1.2",
"chalk": "^4.1.2",
"chokidar": "^3.6.0",
"cli-table3": "^0.6.5",
"express": "^4.18.2",
"express-session": "^1.18.2",
"get-port": "^5.1.1",
"gradient-string": "^2.0.2",
"js-yaml": "^4.1.1",
@@ -104,8 +106,11 @@
"@semantic-release/npm": "^13.1.3",
"@semantic-release/release-notes-generator": "^14.1.0",
"@tailwindcss/vite": "^4.1.17",
"@types/bcrypt": "^6.0.0",
"@types/chokidar": "^2.1.7",
"@types/express": "^4.17.21",
"@types/express-rate-limit": "6.0.0",
"@types/express-session": "^1.18.2",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.19.25",
"@types/ws": "^8.5.10",