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

Add pre-shared key option to genconfig #35

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

itoffshore
Copy link

This PR is based on an old previous PR & adds a --psk option to genconfig for pre-shared keys:

  • fixes missing json import

  • includes python black code formatting

  • bumps the wg-meshconf version to 2.5.2

  • lower cased some help message to be uniform with the default --help option from argparse

  • updates README with:

    • how to install wg-meshconf as an isolated app with pipx
    • new optional --psk functionality (disabled by default to not interfere with existing user configuration)

The pre-shared keys are not stored in the database as they should be being rotated periodically ( they are re-generated every time genconfig is run with --psk).

From a security perspective storing the pre-shared keys along side the private keys defeats their purpose.

itoffshore and others added 13 commits July 2, 2023 15:45
This change does not add the pre-shared keys to the database but from
a security perspective this should not be done anyway.

If private keys exist the configuration is not overwritten so re-running
`genconfig` does not overwrite existing configuration.

TODO: add an option to generate new configuration (keys should be regularly
      rotated)

---

* pre-shared keys are recommended to help towards quantum resistance

  - https://www.wireguard.com/known-limitations/#post-quantum-secrecy

* this commit is based on:

  - k4yt3x#10

  (with the missing json import added)
add pre-shared key generation
* updates version number
* adds --psk / -p options to `wg-meshconf genconfig` to make the new
  functionality optional & disabled by default to not breaks existing
  user configuration.

* the new pre-shared key functionality does not store the generated keys
  as storing them in a spreadsheet alongside the private keys defeats the
  purpose. When using the new --psk option the keys are re-generated (as
  keys should be rotated periodically)
make new pre-shared key functionality optional
* fixes from the python 'black' formatting module
run black formatting module against the codebase
* as per the contributing guidelines
@ww7
Copy link

ww7 commented Apr 11, 2024

It seems a problem if configs already deployed to remote peers with old PresharedKeys.
Any chance to implement a workaround to keep old PresharedKeys when adding new peers?

@itoffshore
Copy link
Author

It seems a problem if configs already deployed to remote peers with old PresharedKeys. Any chance to implement a workaround to keep old PresharedKeys when adding new peers?

Hi @ww7 , more recently I've started using & contributing documentation to netbird

There is an option for post-quantum cryptography with pre-shared keys rotated every 2 minutes with rosenpass.eu

Also useful is mutual TLS to remove the need for a VPN. I use mTLS with Knot DNS (it works perfectly)

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

Successfully merging this pull request may close these issues.

2 participants