Skip to content
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

Reorder default config file #1210

Open
perguth opened this issue Dec 3, 2024 · 1 comment
Open

Reorder default config file #1210

perguth opened this issue Dec 3, 2024 · 1 comment

Comments

@perguth
Copy link

perguth commented Dec 3, 2024

For newly created config files, move private keys to the end:

Order items from "high probability of mangling" to "purely technical"/"super secret" content.

This approach is more hackerspace-friendly. I think most ideally the private key would have its own file even. Then we could revert the main config file permissions to a more user friendly g+r.

@ri-gilfanov
Copy link

ri-gilfanov commented Dec 16, 2024

I think most ideally the private key would have its own file even.

@perguth , hi. You can export the private key to the separate file with the PEM extension. Try use the following command in your unix-like system:

yggdrasil -useconffile /etc/yggdrasil/yggdrasil.conf -exportkey >> /etc/yggdrasil/yggdrasil.pem

Then, you can replace the PrivateKey parameter with the PrivateKeyPath parameter in /etc/yggdrasil/yggdrasil.conf:

PrivateKeyPath: /etc/yggdrasil/yggdrasil.pem

You can also generate a PEM file with a random private key:

yggdrasil -genconf | yggdrasil -useconf -exportkey >> random-private-key.pem

In general, you can separate a configuration delivery and the key generation:

cp -u /your/custom/yggdrasil.conf /etc/yggdrasil/yggdrasil.conf

if [ ! -f /etc/yggdrasil/yggdrasil.pem ]; then
    yggdrasil -genconf | yggdrasil -useconf -exportkey >> /etc/yggdrasil/yggdrasil.pem
fi

I think it is not difficult to make a deb/rpm package with a similar solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants