Files
TORCH/torch-config.example.json
T
google-labs-jules[bot]andPR0M3TH3AN 456bc2df18 feat(security): add authentication and host binding to dashboard
This commit addresses the missing authentication vulnerability in the
dashboard server.

Changes:
- Added Basic Authentication support via TORCH_DASHBOARD_AUTH env var
  or dashboard.auth config field.
- Defaulted dashboard host binding to 127.0.0.1 for better security.
- Added --host CLI argument to allow overriding the bind address.
- Used crypto.timingSafeEqual for secure credential comparison.
- Fixed a potential crash when parsing malformed Authorization headers.
- Added comprehensive unit tests for dashboard authentication.
- Updated documentation in README.md and torch-config.example.json.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 17:24:33 +00:00

67 lines
1.7 KiB
JSON

{
"nostrLock": {
"namespace": "torch-example",
"relays": [
"wss://relay.damus.io",
"wss://nos.lol",
"wss://relay.primal.net"
],
"ttlSeconds": 7200,
"queryTimeoutMs": 30000,
"publishTimeoutMs": 15000,
"minSuccessfulRelayPublishes": 2,
"minActiveRelayPool": 2,
"relayFallbacks": [
"wss://relay.snort.social",
"wss://relay.nostr.band"
]
},
"dashboard": {
"defaultCadenceView": "daily",
"defaultStatusView": "active",
"auth": "admin:password"
},
"scheduler": {
"firstPromptByCadence": {
"daily": "scheduler-update-agent",
"weekly": "bug-reproducer-agent"
},
"memoryPolicyByCadence": {
"daily": {
"mode": "required",
"retrieveCommand": "node torch/scripts/memory/retrieve.mjs",
"storeCommand": "node torch/scripts/memory/store.mjs",
"retrieveSuccessMarkers": [
"MEMORY_RETRIEVED"
],
"storeSuccessMarkers": [
"MEMORY_STORED"
],
"retrieveArtifacts": [
".scheduler-memory/latest/daily/retrieve.ok"
],
"storeArtifacts": [
".scheduler-memory/latest/daily/store.ok"
]
},
"weekly": {
"mode": "required",
"retrieveCommand": "node torch/scripts/memory/retrieve.mjs",
"storeCommand": "node torch/scripts/memory/store.mjs",
"retrieveSuccessMarkers": [
"MEMORY_RETRIEVED"
],
"storeSuccessMarkers": [
"MEMORY_STORED"
],
"retrieveArtifacts": [
".scheduler-memory/latest/weekly/retrieve.ok"
],
"storeArtifacts": [
".scheduler-memory/latest/weekly/store.ok"
]
}
}
}
}