diff options
| author | Giga Murphy <giga1699@gmail.com> | 2025-07-24 00:18:27 +0000 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2025-12-29 07:11:33 +0100 |
| commit | bb7476e1a2f61504f274823ced93c5bb608a76c6 (patch) | |
| tree | 75db95dca7a1be5d70d2ffa45a19b961bfd4c193 /data | |
| parent | 51036f9d188bd7e0061a6c8c4798fb2b0ce63297 (diff) | |
| download | vyos-1x-bb7476e1a2f61504f274823ced93c5bb608a76c6.tar.gz vyos-1x-bb7476e1a2f61504f274823ced93c5bb608a76c6.zip | |
T7635: OpenConnect Certificate Authentication
Diffstat (limited to 'data')
| -rw-r--r-- | data/templates/ocserv/ocserv_config.j2 | 9 |
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 %} |
