core.configmanager: Add function for getting secrets from separate files

Idea is to enable easily retrieving of secret values from files outside
of the config, e.g. via the method used by systemd credentials.

CREDENTIALS_DIRECTORY is expected to be set by the process manager
invoking Prosody, so being unset and unavailable from prosodyctl is
going to be normal and a warning is reported in that case. Care will
have to be taken to make it clear that prosodyctl check will not work
with such values. An error is thrown if the directory is unavailable
when running under Prosody.
This commit is contained in:
Kim Alvefur 2025-01-16 15:21:34 +01:00
parent 2f37c443b8
commit 41a360ce2a
3 changed files with 22 additions and 3 deletions

View file

@ -60,7 +60,7 @@ TRUNK
- The configuration file now supports referring and appending to options previously set
- Direct usage of the Lua API in the config file is deprecated, but can now be accessed via Lua.* instead
- Convenience functions for reading values from files
- Convenience functions for reading values from files, with variant meant for credentials or secrets
## Changes