summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-02-02 18:40:14 +0100
committerChristian Poessinger <christian@poessinger.com>2020-02-05 19:35:13 +0100
commit3a64047c2f1b6279de4b1ada7e87aa5c871f5604 (patch)
treeb964b610dd8dd4133d1f2b1f282f12a12afa1d41 /interface-definitions
parent9c52edb9e2079c315af7385a85f61f21138dd5a6 (diff)
downloadvyos-1x-3a64047c2f1b6279de4b1ada7e87aa5c871f5604.tar.gz
vyos-1x-3a64047c2f1b6279de4b1ada7e87aa5c871f5604.zip
ogin: user: radius: T1948: use discrete configuration for each system
Split combined XML/Python code to individual code for local user accounts and RADIUS authenticated accounts.
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/system-login-radius.xml.in67
-rw-r--r--interface-definitions/system-login-user.xml.in (renamed from interface-definitions/system-login.xml.in)60
2 files changed, 69 insertions, 58 deletions
diff --git a/interface-definitions/system-login-radius.xml.in b/interface-definitions/system-login-radius.xml.in
new file mode 100644
index 000000000..00e85db3e
--- /dev/null
+++ b/interface-definitions/system-login-radius.xml.in
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="system">
+ <children>
+ <node name="login">
+ <children>
+ <node name="radius" owner="${vyos_conf_scripts_dir}/system-login-radius.py">
+ <properties>
+ <help>RADIUS based user authentication</help>
+ </properties>
+ <children>
+ <leafNode name="source-address">
+ <properties>
+ <help>RADIUS client source address</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>TFTP IPv4 listen address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <tagNode name="server">
+ <properties>
+ <help>RADIUS server configuration</help>
+ </properties>
+ <children>
+ <leafNode name="key">
+ <properties>
+ <help>RADIUS shared secret key</help>
+ </properties>
+ </leafNode>
+ <leafNode name="port">
+ <properties>
+ <help>RADIUS authentication port</help>
+ <valueHelp>
+ <format>1-65535</format>
+ <description>Numeric IP port (default: 1812)</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-65535"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="timeout">
+ <properties>
+ <help>Timeout for RADIUS session</help>
+ <valueHelp>
+ <format>1-30</format>
+ <description>Session timeout in seconds (default: 2)</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-30"/>
+ </constraint>
+ <constraintErrorMessage>Timeout must be between 1 and 30 seconds</constraintErrorMessage>
+ </properties>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/interface-definitions/system-login.xml.in b/interface-definitions/system-login-user.xml.in
index 6e990290d..970bcf799 100644
--- a/interface-definitions/system-login.xml.in
+++ b/interface-definitions/system-login-user.xml.in
@@ -2,69 +2,13 @@
<interfaceDefinition>
<node name="system">
<children>
- <node name="login" owner="${vyos_conf_scripts_dir}/system-login.py">
+ <node name="login">
<properties>
<help>User Login</help>
<priority>400</priority>
</properties>
<children>
- <node name="radius">
- <properties>
- <help>RADIUS based user authentication</help>
- </properties>
- <children>
- <leafNode name="source-address">
- <properties>
- <help>RADIUS client source address</help>
- <valueHelp>
- <format>ipv4</format>
- <description>TFTP IPv4 listen address</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-address"/>
- </constraint>
- </properties>
- </leafNode>
- <tagNode name="server">
- <properties>
- <help>RADIUS server configuration</help>
- </properties>
- <children>
- <leafNode name="key">
- <properties>
- <help>RADIUS shared secret key</help>
- </properties>
- </leafNode>
- <leafNode name="port">
- <properties>
- <help>RADIUS authentication port</help>
- <valueHelp>
- <format>1-65535</format>
- <description>Numeric IP port (default: 1812)</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-65535"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="timeout">
- <properties>
- <help>Timeout for RADIUS session</help>
- <valueHelp>
- <format>1-30</format>
- <description>Session timeout in seconds (default: 2)</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-30"/>
- </constraint>
- <constraintErrorMessage>Timeout must be between 1 and 30 seconds</constraintErrorMessage>
- </properties>
- </leafNode>
- </children>
- </tagNode>
- </children>
- </node>
- <tagNode name="user">
+ <tagNode name="user" owner="${vyos_conf_scripts_dir}/system-login-user.py">
<properties>
<help>User account information</help>
<constraint>