Mercurial > prosody-hg
comparison util/startup.lua @ 13627:2db7b3b65363
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.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 16 Jan 2025 15:21:34 +0100 |
| parents | a350f6332bd8 |
| children | 8228f5094f7a |
comparison
equal
deleted
inserted
replaced
| 13626:ac60c21015c7 | 13627:2db7b3b65363 |
|---|---|
| 264 -- luacheck: ignore 111/bare_sessions 111/full_sessions 111/hosts | 264 -- luacheck: ignore 111/bare_sessions 111/full_sessions 111/hosts |
| 265 bare_sessions = prosody.bare_sessions; | 265 bare_sessions = prosody.bare_sessions; |
| 266 full_sessions = prosody.full_sessions; | 266 full_sessions = prosody.full_sessions; |
| 267 hosts = prosody.hosts; | 267 hosts = prosody.hosts; |
| 268 | 268 |
| 269 prosody.paths = { source = CFG_SOURCEDIR, config = CFG_CONFIGDIR or ".", | 269 prosody.paths = { |
| 270 plugins = CFG_PLUGINDIR or "plugins", data = "data" }; | 270 source = CFG_SOURCEDIR; |
| 271 config = CFG_CONFIGDIR or "."; | |
| 272 plugins = CFG_PLUGINDIR or "plugins"; | |
| 273 data = "data"; | |
| 274 secrets = os.getenv("CREDENTIALS_DIRECTORY"); | |
| 275 }; | |
| 271 | 276 |
| 272 prosody.arg = _G.arg; | 277 prosody.arg = _G.arg; |
| 273 | 278 |
| 274 _G.log = logger.init("general"); | 279 _G.log = logger.init("general"); |
| 275 prosody.log = logger.init("general"); | 280 prosody.log = logger.init("general"); |
