Read this when changing configuration encoding, runtime loading, backup behavior, or administrator configuration access.
| File | Key symbols |
|---|---|
index.php |
LoadEncryptedConfig('cfg/config.bin') during bootstrap |
src/OpenMind/System/OMUtils.php |
LoadEncryptedConfig, Encrypt, Decrypt |
src/OpenMind/Api/AdminController.php |
Admin read/save and backup restoration |
scripts/generate-config-bin.sh |
First-time runtime config generation |
cfg/config.ini |
Plaintext source used by the generator |
OMUtils to load cfg/config.bin.config(), then deletes the temporary file.cfg/config.ini into a previously absent cfg/config.bin..old, writes the encoded replacement, and restores the backup if writing fails.| Boundary | Mechanism | Location |
|---|---|---|
| Runtime config presence | Bootstrap throws when the required file is absent | OMUtils::LoadEncryptedConfig() |
| Sensitive config disclosure | admin role required before reading plaintext |
AdminController::load() |
| Sensitive config mutation | admin role and CSRF validation required |
AdminController::save() |
| Partial replacement failure | Backup rename and restore attempt after write failure | AdminController::saveConfiguration() |
| Generator overwrite | Script exits if cfg/config.bin already exists |
scripts/generate-config-bin.sh |
cfg/config.bin.cfg/config.bin.old.base64_encode(gzcompress()); decoding is gzuncompress(base64_decode()).See configuration spec and commands.