Project

General

Profile

Bug #11322

WireGuard Public Key should not be entered by the user

Added by Jim Pingle about 1 month ago. Updated 30 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
WireGuard
Target version:
Start date:
01/27/2021
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.5.0
Affected Architecture:

Description

The WireGuard tunnel public key is derived from the private key. There isn't a compelling reason to allow the user to manually enter it separately, as it only presents an additional opportunity for error/misunderstanding.

We should make the field read only and populate it with the value derived from the private key automatically when saving.

The user will need to copy the value, however, so it must still be displayed. We could opt to not store the public key at all, but then that means we would need to run a shell command to get the public key on each page load when editing a WireGuard peer which seems undesirable.

Associated revisions

Revision 2ccdb454 (diff)
Added by Jim Pingle about 1 month ago

WireGuard: Make pubkey read only, populate automatically. Fixes #11322

While here, add a link to copy the public key to the clipboard.

Revision 4fdcc82b (diff)
Added by Jim Pingle about 1 month ago

WireGuard: Always derive public key. Issue #11322

If the user enters a different private key, using the supplied public
key would lead to a mismatch. So always derive the public key when saving.

History

#1 Updated by Jim Pingle about 1 month ago

  • Status changed from Assigned to In Progress

#2 Updated by Jim Pingle about 1 month ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 100

#3 Updated by Christian McDonald about 1 month ago

gitsync'ed and looking good so far

#4 Updated by Marcos Mendoza about 1 month ago

Tested on Jan 29 build. Looks good.

The "Copy" link is a little odd in that it scrolls the viewport when clicking it. I don't recall other places where the functionality is used, so I'm not sure if it's any different.

#5 Updated by Renato Botelho 30 days ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF