-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
feat(settings): load wireguard inidivual fields as secret files #1348
Conversation
Thanks for the contribution! However, I am closing this because the implementation for secret files is not part of this PR, and because
|
Oh, I totally forgot to check-in the implementation at The PR #1120 is also interesting, but not what I would actually want: Secrets management is hard and I don't want a config file with my private key just dangling somewhere to be mounted. I want secrets to be in docker secrets since that is what the system is designed for (and I can use third party solutions to manage these secrets). If you are still interested I'll gladly add the implementation to this PR and I don't think this would hinder adding a wireguard config import funtionality. |
Sorry for forgetting the implementation:
|
I fixed & updated your code (compilation, some logic was wrong etc.); however whilst doing this, it still bugs be regarding the ini wireguard secret file to be added soon. Since both are from the 'secrets' settings source, which should have precedence? The precedence system works by source and I want to keep it that way to avoid having horrible shadowy logic here and there. I still see no point to have separate secret files instead of one standardized wireguard ini file as a secret file (most users would just bring over some wireguard ini file from somewhere). I'll change this to a draft PR, and will likely close it once we have a secret ini file setup soon-ish (after release v3.33.0). Although you can now build the image using your |
Thanks for the fixes! Personally I didn't have any Please do as you see fit with the PR, you are the maintainer 👍 |
Good points, I'll give it more thoughts then! 👍 I'll get back to you 😉 |
We'll have secret files for everything using this precedence (blocked by #1759):
Both 1 and 2 will be from the same "secrets" source, so there will have to be a bit of ugly logic there to read both and merge settings, but that's fine. You should also be able to specify a mix of all of them, for example have only a server public key in the ini file and the private key as a single secret file. Now I'm a bit shared if 1. or 2. should be first, but to respect existing order for non secret sources, I think having the ini secret file have precedence makes more sense. |
Totally agreed. If there is an ini file it trumps all. Ultimately that is what WireGuard uses for configuration. |
7793495
to
a194906
Compare
57a0645
to
059b128
Compare
6096b7a reads a wireguard config file from I've updated your branch to fill the second step
All in all, I think we should be good now 😉 |
FYI now, if a user sets a wireguard secret config file, all fields are extracted, not just private key, preshared key and addresses. This makes more sense than before where it would only extract sensitive fields. |
Currently docker secrets aren't supported for wireguard environment variables, but should.