summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2026-01-05 17:20:02 +0200
committerGitHub <noreply@github.com>2026-01-05 17:20:02 +0200
commit06945f0a7079b72ab3844bec77288aea208ac266 (patch)
tree2271fa220bfe6c90f7320ffdbc0d6bf8ebcf42af /data
parent2e9c1ffd20a8149842a71acae062a8f0822f95dc (diff)
parent381ae4a8ccddb524bca5951e27cc826eeef45453 (diff)
downloadvyos-1x-06945f0a7079b72ab3844bec77288aea208ac266.tar.gz
vyos-1x-06945f0a7079b72ab3844bec77288aea208ac266.zip
Merge pull request #4618 from giga1699/T7635
T7635: OpenConnect Certificate Authentication
Diffstat (limited to 'data')
-rw-r--r--data/templates/ocserv/ocserv_config.j29
1 files changed, 9 insertions, 0 deletions
diff --git a/data/templates/ocserv/ocserv_config.j2 b/data/templates/ocserv/ocserv_config.j2
index 81f777031..76d3e6e4e 100644
--- a/data/templates/ocserv/ocserv_config.j2
+++ b/data/templates/ocserv/ocserv_config.j2
@@ -30,6 +30,15 @@ auth = "plain[otp=/run/ocserv/users.oath]"
{% else %}
auth = "plain[/run/ocserv/ocpasswd]"
{% endif %}
+{% elif "certificate" in authentication.mode %}
+auth = "certificate"
+{% if authentication.mode.certificate.user_identifier_field == "cn" %}
+cert-user-oid = 2.5.4.3
+{% elif authentication.mode.certificate.user_identifier_field == "uid" %}
+cert-user-oid = 0.9.2342.19200300.100.1.1
+{% else %}
+cert-user-oid = {{ authentication.mode.certificate.user_identifier_field }}
+{% endif %}
{% else %}
auth = "plain[/run/ocserv/ocpasswd]"
{% endif %}