net/freeradius: add Tunnel-Password field to radius user (#4235)

This commit is contained in:
Tobias Perschon
2025-10-16 13:03:24 +02:00
committed by GitHub
parent d3389faf31
commit ddbb31c579
3 changed files with 12 additions and 0 deletions
@@ -164,4 +164,10 @@
<allownew>true</allownew>
<help>Select the configured AVPairs for this user.</help>
</field>
<field>
<id>user.tunnel_password</id>
<label>Tunnel-Password</label>
<type>password</type>
<help>Set the Tunnel-Password attribute for the user. Allowed characters are 0-9, a-z, A-Z, and ,._-!$%/()+#=: with up to 128 characters.</help>
</field>
</form>
@@ -132,6 +132,9 @@
<Multiple>Y</Multiple>
<Required>N</Required>
</linkedAVPair>
<tunnel_password type="TextField">
<mask>/^([0-9a-zA-Z._\-\!\$\%\/\(\)\+\#\=\{\}:]){1,128}$/u</mask>
</tunnel_password>
</user>
</users>
</items>
@@ -24,6 +24,9 @@
Service-Type = {{ servicelist }},
{% endfor %}
{% endif %}
{% if user_list.tunnel_password is defined %}
Tunnel-Password = {{ user_list.tunnel_password }},
{% endif %}
{% if helpers.exists('OPNsense.freeradius.general.vlanassign') and OPNsense.freeradius.general.vlanassign == '1' %}
{% if user_list.vlan is defined %}
Tunnel-Type = VLAN,