summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-02-25 17:10:03 +0100
committerChristian Poessinger <christian@poessinger.com>2020-02-25 17:10:05 +0100
commit800e208c5d02896af29061b958709ac9666da08f (patch)
tree7c892db8444968e45901b8055e372575f81eeba5 /interface-definitions
parentd11b04f4f9230638fbbeb7cb21bd46de9d09d27c (diff)
downloadvyos-1x-800e208c5d02896af29061b958709ac9666da08f.tar.gz
vyos-1x-800e208c5d02896af29061b958709ac9666da08f.zip
login: T1948: migrade local and radius configurations
Splitting was not a good idea. By combining both we can create a RADIUS server XML include file which can be reused by multiple implementations to get a uniformed CLI for the users.
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/system-login-radius.xml.in80
-rw-r--r--interface-definitions/system-login.xml.in (renamed from interface-definitions/system-login-user.xml.in)75
2 files changed, 72 insertions, 83 deletions
diff --git a/interface-definitions/system-login-radius.xml.in b/interface-definitions/system-login-radius.xml.in
deleted file mode 100644
index c5d081356..000000000
--- a/interface-definitions/system-login-radius.xml.in
+++ /dev/null
@@ -1,80 +0,0 @@
-<?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>
- <valueHelp>
- <format>ipv4</format>
- <description>RADIUS server IPv4 address</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-address"/>
- </constraint>
- </properties>
- <children>
- <leafNode name="disable">
- <properties>
- <help>Temporary disable this server</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="key">
- <properties>
- <help>Shared secret key</help>
- </properties>
- </leafNode>
- <leafNode name="port">
- <properties>
- <help>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>Session timeout</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-user.xml.in b/interface-definitions/system-login.xml.in
index c183e93e3..fda567074 100644
--- a/interface-definitions/system-login-user.xml.in
+++ b/interface-definitions/system-login.xml.in
@@ -2,15 +2,15 @@
<interfaceDefinition>
<node name="system">
<children>
- <node name="login">
+ <node name="login" owner="${vyos_conf_scripts_dir}/system-login.py">
<properties>
<help>User Login</help>
<priority>400</priority>
</properties>
<children>
- <tagNode name="user" owner="${vyos_conf_scripts_dir}/system-login-user.py">
+ <tagNode name="user">
<properties>
- <help>User account information</help>
+ <help>Local user account information</help>
<constraint>
<regex>[a-zA-Z0-9\-_\.]{1,100}</regex>
</constraint>
@@ -110,6 +110,75 @@
</leafNode>
</children>
</tagNode>
+ <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>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>RADIUS server IPv4 address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ <children>
+ <leafNode name="disable">
+ <properties>
+ <help>Temporary disable this server</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="key">
+ <properties>
+ <help>Shared secret key</help>
+ </properties>
+ </leafNode>
+ <leafNode name="port">
+ <properties>
+ <help>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>Session timeout</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>