Skip to content

Commit

Permalink
Issue openmediavault#1737: Add support for WPA3 authentication for wi…
Browse files Browse the repository at this point in the history
…reless connections (openmediavault#1739)

Fixes: openmediavault#1737

Signed-off-by: Volker Theile <votdev@gmx.de>
  • Loading branch information
votdev committed May 5, 2024
1 parent 80c42de commit 0575558
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 4 deletions.
4 changes: 3 additions & 1 deletion deb/openmediavault/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
openmediavault (7.0.5-1) stable; urgency=low
openmediavault (7.1.0-1) stable; urgency=low

* Issue #1736: Add support to create yearly scheduled shared
folder snapshots.
* Issue #1737: Add support for WPA3 authentication for wireless
connections.

-- Volker Theile <volker.theile@openmediavault.org> Fri, 29 Mar 2024 19:22:33 +0100

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,7 @@ network:
{%- endif %}
access-points:
"{{ interface.wpassid }}":
password: "{{ interface.wpapsk }}"
auth:
key-management: {{ interface.keymanagement }}
password: "{{ interface.wpapsk }}"
hidden: {{ interface.hidden | to_bool | yesno('true,false') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env dash
#
# This file is part of OpenMediaVault.
#
# @license http://www.gnu.org/licenses/gpl.html GPL Version 3
# @author Volker Theile <volker.theile@openmediavault.org>
# @copyright Copyright (c) 2009-2024 Volker Theile
#
# OpenMediaVault is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# OpenMediaVault is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenMediaVault. If not, see <http://www.gnu.org/licenses/>.

set -e

. /usr/share/openmediavault/scripts/helper-functions

omv_config_add_key "/config/system/network/interfaces/interface" "keymanagement" "psk"

exit 0
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@
"wpapsk": {
"type": "string"
},
"keymanagement": {
"type": "string",
"enum": [ "psk", "sae" ],
"default": "psk"
},
"hidden": {
"type": "boolean",
"default": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,11 @@
"type": "string",
"required": true
},
"keymanagement": {
"type": "string",
"enum": [ "psk", "sae" ],
"required": true
},
"hidden": {
"type": "boolean",
"required": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,7 @@ class Network extends \OMV\Rpc\ServiceAbstract {
"type" => "wifi",
"wpassid" => $params['wpassid'],
"wpapsk" => $params['wpapsk'],
"keymanagement" => $params['keymanagement'],
"hidden" => $params['hidden']
]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,24 @@ def execute(self):
width=32,
)
rpc_params["wpassid"] = wpa_ssid
# Get the pre-shared key.
# Get the key management mode.
choices = [["psk", "WPA2-Personal"], ["sae", "WPA3-Personal"]]
(code, tag) = d.menu(
"Please select the key management mode.",
backtitle=self.description,
clear=True,
height=18,
width=65,
menu_height=8,
choices=choices,
)
if code in (d.CANCEL, d.ESC):
return 0
rpc_params["keymanagement"] = tag
# Get the password.
while not wpa_psk:
(code, wpa_psk) = d.inputbox(
"Please enter the pre-shared key (PSK).",
"Please enter the password.",
backtitle=self.description,
clear=True,
height=8,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
# - wifi
<wpassid>xxx</wpassid>
<wpapsk>xxx</wpapsk>
<keymanagement>psk|sae</keymanagement>
<hidden>0|1</hidden>
# - bridge
<slaves>(((eth|venet|wlan)\d+|(en|veth|wl)\S+),)*((eth|venet|wlan)\d+|(en|veth|wl)\S+)</slaves>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,21 @@ export class InterfaceWifiFormPageComponent extends BaseFormPageComponent {
required: true
}
},
{
type: 'select',
name: 'keymanagement',
label: gettext('Security'),
value: 'psk',
store: {
data: [
['psk', gettext('WPA2-Personal')],
['sae', gettext('WPA3-Personal')]
]
},
validators: {
required: true
}
},
{
type: 'passwordInput',
name: 'wpapsk',
Expand Down

0 comments on commit 0575558

Please sign in to comment.