diff options
author | Manuel Giganto <mgigantoregistros@gmail.com> | 2020-10-12 15:35:08 +0000 |
---|---|---|
committer | Paul Donald <newtwen+github@gmail.com> | 2024-10-23 03:06:12 +0200 |
commit | f2e14b89462d654a47254d0549a3a8e9db88b8a6 (patch) | |
tree | c93768cbce98350c81e56b0184fe9968f628a450 /modules/luci-mod-network | |
parent | 5b706f52d77dfe6932f6677576774f4ae32f6090 (diff) |
luci-mod-network: add ppsk option (support for private psk)
Include support in luci to enable the Private PSK.
When Private PSK is enabled, clients can use a default password (common),
or have their own private password that is associate with the client MAC.
The password is retrieved from RADIUS server, asking for the client MAC,
and when such client MAC is not defined, RADIUS should return a default
password.
RADIUS can also return other parameters like VLANs, which can be used to
put clients dinamically in different vlans based on their MAC, or the
default configuration.
Private PSK is not compatible yet with SAE encryption, therefore cannot
be used yet with WPA3 or WPA3-mixed.
It implements the UI for the PPSK already in master: https://github.com/openwrt/openwrt/pull/3509
Closes #4513
Signed-off-by: Manuel Giganto <mgigantoregistros@gmail.com>
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Diffstat (limited to 'modules/luci-mod-network')
-rw-r--r-- | modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js index 2cce3ed46d..81c5f1b67b 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js @@ -1443,19 +1443,25 @@ return view.extend({ } + o = ss.taboption('encryption', form.Flag, 'ppsk', _('Enable Private PSK (PPSK)'), _('Private Pre-Shared Key (PPSK) allows the use of different Pre-Shared Key for each STA MAC address. Private MAC PSKs are stored on the RADIUS server.')); + add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['psk', 'psk2', 'psk+psk2', 'psk-mixed'] }); + o = ss.taboption('encryption', form.Value, 'auth_server', _('RADIUS Authentication Server')); add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed', 'wpa3-192'] }); + add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['psk', 'psk2', 'psk+psk2', 'psk-mixed'], ppsk: ['1'] }); o.rmempty = true; o.datatype = 'host(0)'; o = ss.taboption('encryption', form.Value, 'auth_port', _('RADIUS Authentication Port')); add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed', 'wpa3-192'] }); + add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['psk', 'psk2', 'psk+psk2', 'psk-mixed'], ppsk: ['1'] }); o.rmempty = true; o.datatype = 'port'; o.placeholder = '1812'; o = ss.taboption('encryption', form.Value, 'auth_secret', _('RADIUS Authentication Secret')); add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed', 'wpa3-192'] }); + add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['psk', 'psk2', 'psk+psk2', 'psk-mixed'], ppsk: ['1'] }); o.rmempty = true; o.password = true; @@ -1506,6 +1512,7 @@ return view.extend({ o = ss.taboption('encryption', form.ListValue, 'dynamic_vlan', _('RADIUS Dynamic VLAN Assignment'), _('Required: Rejects auth if RADIUS server does not provide appropriate VLAN attributes.')); add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed', 'wpa3-192'] }); + add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['psk', 'psk2', 'psk+psk2', 'psk-mixed'], ppsk: ['1'] }); o.value('0', _('Disabled')); o.value('1', _('Optional')); o.value('2', _('Required')); @@ -1515,13 +1522,16 @@ return view.extend({ o = ss.taboption('encryption', form.Flag, 'per_sta_vif', _('RADIUS Per STA VLAN'), _('Each STA is assigned its own AP_VLAN interface.')); add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed', 'wpa3-192'] }); + add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['psk', 'psk2', 'psk+psk2', 'psk-mixed'], ppsk: ['1'] }); //hostapd internally defaults to vlan_naming=1 even with dynamic VLAN off o = ss.taboption('encryption', form.Flag, 'vlan_naming', _('RADIUS VLAN Naming'), _('Off: <code>vlanXXX</code>, e.g., <code>vlan1</code>. On: <code>vlan_tagged_interface.XXX</code>, e.g. <code>eth0.1</code>.')); add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed', 'wpa3-192'] }); + add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['psk', 'psk2', 'psk+psk2', 'psk-mixed'], ppsk: ['1'] }); o = ss.taboption('encryption', widgets.DeviceSelect, 'vlan_tagged_interface', _('RADIUS VLAN Tagged Interface'), _('E.g. eth0, eth1')); add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed', 'wpa3-192'] }); + add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['psk', 'psk2', 'psk+psk2', 'psk-mixed'], ppsk: ['1'] }); o.size = 1; o.rmempty = true; o.multiple = false; @@ -1531,6 +1541,7 @@ return view.extend({ o = ss.taboption('encryption', form.Value, 'vlan_bridge', _('RADIUS VLAN Bridge Naming Scheme'), _('E.g. <code>br-vlan</code> or <code>brvlan</code>.')); add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed', 'wpa3-192'] }); + add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['psk', 'psk2', 'psk+psk2', 'psk-mixed'], ppsk: ['1'] }); o.rmempty = true; /* extra RADIUS settings end */ @@ -1557,10 +1568,8 @@ return view.extend({ o = ss.taboption('encryption', form.Value, '_wpa_key', _('Key')); - o.depends('encryption', 'psk'); - o.depends('encryption', 'psk2'); - o.depends('encryption', 'psk+psk2'); - o.depends('encryption', 'psk-mixed'); + add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['psk', 'psk2', 'psk+psk2', 'psk-mixed'], ppsk: ['0'] }); + add_dependency_permutations(o, { mode: ['sta', 'adhoc', 'mesh', 'sta-wds'], encryption: ['psk', 'psk2', 'psk+psk2', 'psk-mixed'] }); o.depends('encryption', 'sae'); o.depends('encryption', 'sae-mixed'); o.datatype = 'wpakey'; |