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

Implement wireguard keys based polling auth #299

Open
j-chmielewski opened this issue Sep 10, 2024 · 0 comments
Open

Implement wireguard keys based polling auth #299

j-chmielewski opened this issue Sep 10, 2024 · 0 comments

Comments

@j-chmielewski
Copy link
Contributor

j-chmielewski commented Sep 10, 2024

Initial implementation of configuration polling uses auth tokens. Since client application does not implement regular user authentication frontend, there is no reasonable way to implement token expiration and updates. Because of this, those tokens are issued indefinitely which is not ideal. The tokens would also have to be reissued if they ever get lost.

To mitigate those issues it should be possible to implement an authentication mechanism based on wireguard keys. Basic idea, to be researched and implemented if no significant flaws are found:

  • client stores wg private key
  • core stores corresponding wg public key
  • client uses private key to sign a (timestamp, nonce) tuple
  • client includes signed tuple in polling request
  • core uses public key to verify the signature
  • core verifies timestamp is within acceptable range (5 minutes?)
  • core stores the nonce to db as "consumed"
  • core removes from db nonces older than acceptable range

Potential solution: https://signal.org/docs/specifications/xeddsa/

@j-chmielewski j-chmielewski converted this from a draft issue Sep 10, 2024
@j-chmielewski j-chmielewski moved this to Refined & Ready in Backlog & Roadmap Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Refined & Ready
Development

No branches or pull requests

1 participant