From bad9fa19b9cd2bec8cd1c634c463b4359db78c2e Mon Sep 17 00:00:00 2001 From: Marek Isalski Date: Fri, 7 Aug 2020 07:43:18 +0100 Subject: [PATCH] add RADIUS --- vyos.conf.j2 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/vyos.conf.j2 b/vyos.conf.j2 index 335f563..c874e2e 100644 --- a/vyos.conf.j2 +++ b/vyos.conf.j2 @@ -1504,6 +1504,31 @@ system { } login { + {% if 'radius' in pillar %} + {% if salt['pillar.get']('radius:old',False) %} + + {% for server, server_data in salt['pillar.get']('radius:server',{}).items() %} + radius-server {{ server }} { + port {{ server_data.get('port',1812) }} + secret {{ server_data.get('key',server_data.get('secret','')) }} + timeout {{ server_data.get('timeout',2) }} + } + {% endfor %} + {% if 'source-address' in salt['pillar.get']('radius',{}) %} + radius-source-address {{ pillar['radius:source-address'] }} + {% endif %} + {% else %} + radius { + {% for server, server_data in salt['pillar.get']('radius:server',{}).items() %} + server {{ server }} { + key {{ server_data.get('key',server_data.get('secret','')) }} + } + {% endfor %} + source-address {{ pillar['radius:source-address'] }} + } + {% endif %} + {% endif %} + {% for user, user_data in pillar['users'].items() %} user {{ user }} { {% if 'authentication' in user_data %}