-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/synapse: doc: suggest LoadCredential before nixops/sops #260212
base: master
Are you sure you want to change the base?
Conversation
nixops and similar are great, but require an upfront cost that is no longer necessary now systemd can read root-only files for restricted services through `LoadCredential` Suggest the native method first in the service readme for simplicity
Tip: you can use |
Don't we have a section in the NixOS manual that explains how to deal with secrets? (cc @NixOS/documentation-team ) I'm pretty sure that this is by far not the only module where you have an issue like this and I think it's far better to have a central place where (1) the general issue is described (i.e. why that shouldn't be in the Nix store) and (2) how to deal with it (i.e. "deployment" tooling such as sops-nix/agenix) and mechanisms for services (i.e. LoadCredential, SuppplementaryGroups etc.). Then, all modules could just reference this section of the manual and we don't need to duplicate this information everywhere (and risking that it is incomplete - as demonstrated by @martinetd in this case). If such a section exists, we should just link it here and remove the rest. Otherwise, I'd accept this patch as temporary improvement, but I'd really appreciate it if the docs team could add that to their backlog if possible :) |
not yet #142282 |
9583153
to
aee351d
Compare
Oh, that's nice I've updated it to that!
Agreed. There was something so I just built on it, but if there's something common it'd be better to share. Looking for 'LoadCredential" in all *.md files only found ths and a mention in nixos/modules/security/acme/default.md so I can confirm there doesn't seem to be anything yet. |
you can also inject arbitraty synapse command line arguments by adding spaces to an |
Actually just tested that and the command is escaped, so that doesn't work -- systemd tries to run Reverting the commit |
aee351d
to
9583153
Compare
In
This behavior is mentionned in the
|
Hmm, by reading the code, I think the path |
Description of changes
This is a bit selfish, but that's what I was looking for in the .md when I wanted to quickly add a user without adding the password in the store on a local machine. Happy to reword or try another way of describing it.
nixops and similar are great, but require an upfront cost that is no longer necessary now systemd can read root-only files for restricted services through
LoadCredential
Suggest the native method first in the service readme for simplicity
Note: it'd make more sense to set
$CREDENTIALS_DIRECTORY/matrix-shared-secret
instead of hardcoding/run/credentials/<service>
, but that doesn't pass types.path check. The service name is made explicit when setting LoadCredential anyway, so this constant should be safe to use.Things done
Cc @Ma27 @fadenb @mguentner @Ralith @sumnerevans @NickCao @dali99 (matrix team)