summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorOleksandr Kuchmystyi <o.kuchmystyi@vyos.io>2025-10-31 17:05:09 +0300
committerOleksandr Kuchmystyi <o.kuchmystyi@vyos.io>2025-10-31 17:05:09 +0300
commit6d4c6fb9b5ccd372f16073708b74f885521dbce9 (patch)
tree4ec38f572389650bba344f0f5a35999520b67aea /data
parent34ce34f1680a5c34a68aa7a9774107e7bb2b7610 (diff)
downloadvyos-1x-6d4c6fb9b5ccd372f16073708b74f885521dbce9.tar.gz
vyos-1x-6d4c6fb9b5ccd372f16073708b74f885521dbce9.zip
syslog: T4251: Rename "permitted-peers" to "permitted-peer" and improve TLS checks
- Renamed `permitted-peers` to `permitted-peer` across templates, schema, and tests. - Added support for multiple `permitted-peer` entries and trimmed empty values. - Replaced TLS/UDP warning with ConfigError for strict validation. - Updated tests to use TCP for TLS and verified new validation logic.
Diffstat (limited to 'data')
-rw-r--r--data/templates/rsyslog/rsyslog.conf.j27
1 files changed, 5 insertions, 2 deletions
diff --git a/data/templates/rsyslog/rsyslog.conf.j2 b/data/templates/rsyslog/rsyslog.conf.j2
index 9b9153010..714788df0 100644
--- a/data/templates/rsyslog/rsyslog.conf.j2
+++ b/data/templates/rsyslog/rsyslog.conf.j2
@@ -120,9 +120,12 @@ if prifilt("{{ tmp | join(',') }}") then {
StreamDriverMode="1"
# Select the authentication mode
StreamDriverAuthMode="{{ auth_mode if auth_mode == 'anon' else 'x509/' + auth_mode }}"
-{% if tls.permitted_peers is vyos_defined and auth_mode in ('fingerprint', 'name') %}
+{% if tls.permitted_peer is vyos_defined and auth_mode in ('fingerprint', 'name') %}
+{% set permitted_peers = tls.permitted_peer | map('trim') | select | join(',') %}
+{% if permitted_peers %}
# Only include permitted peers (list of allowed fingerprints or names)
- StreamDriverPermittedPeers="{{ tls.permitted_peers }}"
+ StreamDriverPermittedPeers="{{ permitted_peers }}"
+{% endif %}
{% endif %}
{% if tls.ca_certificate_path is vyos_defined %}
# Include the path to the CA certificate file