summaryrefslogtreecommitdiff
path: root/data/templates/ocserv
diff options
context:
space:
mode:
authorRageLtMan <rageltman [at] sempervictus>2022-08-18 18:57:19 -0400
committerRageLtMan <rageltman [at] sempervictus>2022-08-18 18:57:19 -0400
commit4a5e4cfd6c11a6eed3252744ec45638249d6d2b1 (patch)
treebde480434c5da416dd93f17874f3c45bb607f277 /data/templates/ocserv
parent0b3bfe97b617b08ab9fd6682a0875c75c8a7bc5c (diff)
downloadvyos-1x-4a5e4cfd6c11a6eed3252744ec45638249d6d2b1.tar.gz
vyos-1x-4a5e4cfd6c11a6eed3252744ec45638249d6d2b1.zip
T3896: update groupconfig syntax per PR1463
Address @sever-sever's suggestion to refactor how groupconfig is defined, parsed, and set (with his proposed conditional string appending Py-sugar). Use the disable-mobike refactor as template for XML simplification. Testing: None yet
Diffstat (limited to 'data/templates/ocserv')
-rw-r--r--data/templates/ocserv/ocserv_config.j26
1 files changed, 1 insertions, 5 deletions
diff --git a/data/templates/ocserv/ocserv_config.j2 b/data/templates/ocserv/ocserv_config.j2
index 5d5a4101b..fef49d30f 100644
--- a/data/templates/ocserv/ocserv_config.j2
+++ b/data/templates/ocserv/ocserv_config.j2
@@ -7,11 +7,7 @@ run-as-user = nobody
run-as-group = daemon
{% if "radius" in authentication.mode %}
-{% if "yes" in authentication.radius.groupconfig %}
-auth = "radius [config=/run/ocserv/radiusclient.conf,groupconfig=true]"
-{% else %}
-auth = "radius [config=/run/ocserv/radiusclient.conf]"
-{% endif %}
+auth = "radius [config=/run/ocserv/radiusclient.conf{{ ',groupconfig=true' if authentication.radius.groupconfig is vyos_defined else '' }}]"
{% elif "local" in authentication.mode %}
{% if authentication.mode.local == "password-otp" %}
auth = "plain[passwd=/run/ocserv/ocpasswd,otp=/run/ocserv/users.oath]"