Skip to content

Commit f98bc8f

Browse files
authored
Merge pull request #14557 from raboof/document-avoiding-secrets-in-the-store
docs: avoid secrets in the nix store
2 parents af71274 + 91cdd88 commit f98bc8f

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

doc/manual/source/SUMMARY.md.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
- [Build Trace](store/build-trace.md)
3030
- [Derivation Resolution](store/resolution.md)
3131
- [Building](store/building.md)
32+
- [Secrets](store/secrets.md)
3233
- [Store Types](store/types/index.md)
3334
{{#include ./store/types/SUMMARY.md}}
3435
- [Appendix: Math notation](store/math-notation.md)

doc/manual/source/store/secrets.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Secrets
2+
3+
The store is readable to all users on the system. For this reason, it
4+
is generally discouraged to allow secrets to make it into the store.
5+
6+
Even on a single-user system, separate system users isolate services
7+
from each other and having secrets that all local users can read
8+
weakens that isolation. When using external store caches the secrets
9+
may end up there, and on multi-user systems the secrets will be
10+
available to all those users.
11+
12+
Organize your derivations so that secrets are read from the filesystem
13+
(with appropriate access controls) at run time. Place the secrets on
14+
the filesystem manually or use a scheme that includes the secret in
15+
the store in encrypted form, and decrypts it adding the relevant
16+
access control on system activation.
17+
Several such schemes for NixOS can in the
18+
[comparison of secret managing schemes] on the wiki.
19+
20+
[comparison of secret managing schemes]: https://wiki.nixos.org/wiki/Comparison_of_secret_managing_schemes

0 commit comments

Comments
 (0)