mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[GH-ISSUE #1180] [FEATURE REQUEST] Allow reading key_seed from file #419
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#419
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TLATER on GitHub (May 25, 2025).
Original GitHub issue: https://github.com/lldap/lldap/issues/1180
Motivation
Hi, I'd like to declaratively configure my lldap configuration, and have that configuration in a git repository to track changes over time.
I'd prefer not to have the value my key is seeded from in what appears to be a deterministic RNG plaintext in a git repository.
Describe the solution you'd like
Much like the existing
LLDAP_KEY_FILE, it'd be nice if I could specify anLLDAP_KEY_SEED_FILEso that the plaintext secret can be read from e.g. systemd credentials.Describe alternatives you've considered
LLDAP_KEY_SEEDalready exists, of course, so I can read the secret from a file and insert it into the environment as part of a wrapping script. This exposes the secret as an env var, though, which isn't ideal.I can also use
LLDAP_KEY_FILEif I generate a key first, but #504 's outcome was basically saying that that is an awkward setup, which is whyLLDAP_KEY_SEEDeven exists. Perhaps a subcommand to just generate a key file without doing anything else would be a nicer solution, though?Alternatively I can turn the configuration file into a template, but managing this is quite a bit more awkward than even pre-generating a key.
I also worry slightly that the current configuration option itself is a footgun - unless I misunderstand the RNG docs and it isn't actually deterministic, I suspect many users are storing this secret in plaintext somewhere it should not be, unaware that it is supposed to be treated as a secret; the docs don't make this particularly clear.
@nitnelave commented on GitHub (May 25, 2025):
You're in luck! You can already use
LLDAP_KEY_SEED_FILE@TLATER commented on GitHub (May 25, 2025):
Ahhhh, sorry, I triple read the code around server creation to check if this exists and still missed it. In my defense, I'm waist-deep into figuring out the details of authelia configuration as well.
Thanks for the help :)
@nitnelave commented on GitHub (May 25, 2025):
I admit that it's not the most obvious, either from the code or (with a second read) from the documentation (config template).
If you want to improve the docs, that would be very welcome! The gist of it is that every variable has a
_FILEversion.@TLATER commented on GitHub (May 25, 2025):
Not tonight (or tomorrow night), but I'll keep a browser tab with this open to shame me into doing so sometime over the next week or two so I didn't waste your time for nothing ;)