Key sync runs inside the app: scheduler addon task every 10 min, plus write guards
The per-member key seed ran from a steward cron on the co-op agent VM, shelling into this app over the Cloudron API. That made a member-facing function depend on a separate machine's uptime and paths (it went silently stale once, exiting 127 on schedule while the job looked healthy). - CloudronManifest.json: addons.scheduler gains librechat_key_sync (cd /app/code/librechat/api && node /app/data/sync-keys.js, */10 * * * *). Official addon set (postgresql, mongodb, localstorage, oidc, sendmail) and the dockerImage pin are untouched. - sync-keys.js: refuse to write unless CREDS_KEY can first decrypt an existing key row, and unless each fresh ciphertext round-trips back to the plaintext. Scheduled runs get a different environment than an interactive exec, so a wrong or absent CREDS_KEY must fail loudly instead of overwriting working member keys.
This commit is contained in:
1 parent
f7a4fdb48d
commit
4e28b7a612
2 files changed
+42
-3
No files matched your search
@@ -22,6 +22,12 @@
|
||||
},
|
||||
"sendmail": {
|
||||
"supportsDisplayName": true
|
||||
},
|
||||
"scheduler": {
|
||||
"librechat_key_sync": {
|
||||
"schedule": "*/10 * * * *",
|
||||
"command": "cd /app/code/librechat/api && node /app/data/sync-keys.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"checklist": {
|
||||
|
||||
Reference in new issue
Block a user