DefGuard / DefGuard/client

Implement wireguard keys based polling auth

Aperta
#299 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
369
Fork
39
Merge medio
23h 22m
PR unite (30g)
34

Descrizione

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/

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.