-
Notifications
You must be signed in to change notification settings - Fork 48
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
[FEATURE] Private information storage in config files #99
Comments
Actually, we can create a
|
Well, actually, the pgp approach can be used with pre-deploy hooks, but it will be a very complicated script because of synchronization and merging logic. I've came up with this questions, which should be answered before the actual implementation:
|
I guess what makes this use case complicated is the need to edit an encrypted file.
(The decrypted file's location is gitignored just in case) Then editing the encrypted file could be done without relation to Dotter - I haven't worked with encrypted files at all, but is there no way to conveniently edit one? This probably depends on your chosen format and whatnot, but I imagine the solution to that can be separate from Dotter? |
Well, I did it with pre and post deploy hooks. The scripts contains a single passphrase, which is stored in Post-hook encrypts all changed |
Is your feature request related to a problem? Please describe.
Some times config files contain sensitive information: port numbers for
sshd
, somewireguard
settings, even passwords for web-interfaces are sometimes placed in config files.That's reasonable. If someone has access to your home folder, he/she definitely will be able to retrieve this information from the state of the programs. However, publishing this data will make you more vulnerable to targeted attacks.
Describe the solution you'd like
Here I propose
dotter
module for sensitive information storage with the following architecture:.dotter/Unprotected.toml
and.dotter/Protected.toml
files.Unprotected.toml
is a regulardotter
config file, where variables can be set in plaintext. This file should be added to `.gitignore'Protected.toml
contains data fromUnprotected.toml
in encrypted form. The contents of the files are kept in sync bydotter
.dotter
first checks, that the files are in sync, and then useUnprotected.toml
as a regular config.Sidenotes:
For me the reasonable security model looks like this:
For this model it is ok to either ask for password, then
dotter
is started, or store password in.gitignore
d file.IMO, the easiest way to perform encryption reasonably safe is to use
gpg
orsequoia-pgp
.As a
pgp
software, they provide text file encryption out-of-the-box.Maybe, we can just decrypt
Protected.toml
as a text file and then parse it as a regular config.Describe alternatives you've considered
By now I'm solving this task in a very hacky way: I put all the private info in the system keyring (
secret-tool store
) and use{{command_output "secret-tool lookup"}}
in the templates.It works smoothly on one machine, but this approach detaches parts of the config from the git history, making some undeployments irreproducible. More other, migration from one machine to another (or OS reinstalling on the same machine) will be a huge pain.
Additional context
I'm willing to implement this feature myself, but (1)I'm not enough familiar with the codebase and (2)now I'm having finals, so I'll be ready to start only when I pass them.
The text was updated successfully, but these errors were encountered: