-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Q&A: environmentFile definition inside config #49
Comments
I assume Anyways, under this assumption, you'll have a store-path with the email password and the secret key inside. Store paths are readable by every user (and thus essentially every process) on your system. This is the reason stuff like agenix/sops-nix exists in the first place fwiw. So, personally I'd rather not do this in production. |
Yeah, I realized this earlier today. Keeping this open for other ideas |
There are essentially two things you can do:
{ config, ... }:
{
sops = {
secrets = {
email_password = {};
authentik_secret_key = {};
db_password = {};
ldap_outpost_token = {};
tls-key = {};
};
templates = {
server-env.content = ''
AUTHENTIK_EMAIL__PASSWORD=${config.sops.placeholder.email_password}
AUTHENTIK_SECRET_KEY=${config.sops.placeholder.authentik_secret_key}
AUTHENTIK_POSTGRESQL__PASSWORD=${config.sops.placeholder.db_password}
'';
};
};
services.authentik = {
enable = true;
environmentFile = config.sops.templates.server-env.path;
# ...
};
} Never used agenix, so I have no idea if they also have a feature like this. Right now, secret management is effectively an excercise left to the reader, but with a few implementations almost everyone uses (i.e. agenix and sops-nix). In the context of this repository, there's nothing left to discuss, really, so I'll close this. |
Was wondering if this is OK in production?
I generate/bootstrap the authentik secret using agenix-rekey while the email password is an agenix secret, so getting this to work is very useful for me.
The text was updated successfully, but these errors were encountered: