case 4711 - JWT signing key generated by the server; AYANOVA_JWT_SECRET removed
The LAN/IIS and Linux templates shipped a placeholder secret printed in the manual, and installs that kept it signed logins with a public key; any setting also invited short or reused values (security review F1). The setting is now ignored (one warning at boot if still present): the server generates a key once (48 random bytes) into jwt-signing.key in the data folder (beside the app if there is none; owner-only on Linux) and reuses it, so sign-ins also survive a restart where the server used to make a new key each boot (standalone, Linux desktop). If the file cannot be used, a temporary key is used for that run. Templates and dev launch configs drop the setting; manual updated (key page rewritten, setting steps removed from install pages); changelog line. Checked locally: token forged with the old placeholder 401; key file created and reused after restart (old token 200); auth and 2FA tests pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -164,20 +164,6 @@ The [AYANOVA_BACKUP_PG_DUMP_PATH](ops-config-backup-pgdump-path.md) property spe
|
||||
A. if AyaNova server will be doing the automatic daily backups using AyaNova's Backup feature, confirm this path stated matches the path to YOUR PostgreSQL database backup utility pg_dump. The `18` in the path is the PostgreSQL version number: if you installed a different version, change it to match (for example `C:\\Program Files\\PostgreSQL\\17\\bin`)
|
||||
B. otherwise, If you already have a backup solution in place for your PostgreSQL databases AND WILL NOT BE USING AYANOVA'S Backup feature, remove this
|
||||
|
||||
OPTIONAL EDIT:
|
||||
|
||||
Modify the 32 character [AYANOVA_JWT_SECRET](ops-config-jwt-secret.md) property of the configuration which ensures that the logged in User's session can survive a restart of the AyaNova server. If this is not set AyaNova will invalidate all login tokens any time the server restarts by generating a new random JWT secret on boot.
|
||||
|
||||
Change this from the default of "11111YourRandom32CharacterSecret" to be unique to your site (must be 32 characters).
|
||||
|
||||
```json
|
||||
{
|
||||
...existing properties...
|
||||
"AYANOVA_LOG_LEVEL": "Info",
|
||||
"AYANOVA_JWT_SECRET": "11111YourRandom32CharacterSecret"
|
||||
}
|
||||
```
|
||||
|
||||
After editing, saving and exiting out of NotePad, open the config.json file AGAIN to confirm that the changes were saved correctly and that the file is still specifically labeled with the name and extension config.json
|
||||
|
||||
### 5\. Boot and test the server
|
||||
|
||||
Reference in New Issue
Block a user