summaryrefslogtreecommitdiff
path: root/interface-definitions/system-login.xml.in
blob: a5519ee8876ff88881dcda992ca0e02a5011a0db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?xml version="1.0"?>
<interfaceDefinition>
  <node name="system">
    <children>
      <node name="login" owner="${vyos_conf_scripts_dir}/system-login.py">
        <properties>
          <help>System User Login Configuration</help>
          <priority>400</priority>
        </properties>
        <children>
          <tagNode name="user">
            <properties>
              <help>Local user account information</help>
              <constraint>
                <regex>^[-_a-zA-Z0-9.]{1,100}</regex>
              </constraint>
              <constraintErrorMessage>Username contains illegal characters or\nexceeds 100 character limitation.</constraintErrorMessage>
            </properties>
            <children>
              <node name="authentication">
                <properties>
                  <help>Password authentication</help>
                </properties>
                <children>
                  <leafNode name="encrypted-password">
                    <properties>
                      <help>Encrypted password</help>
                      <constraint>
                        <regex>(\*|\!)</regex>
                        <regex>[a-zA-Z0-9\.\/]{13}$</regex>
                        <regex>\$1\$[a-zA-Z0-9\./]*\$[a-zA-Z0-9\./]{22}</regex>
                        <regex>\$5\$[a-zA-Z0-9\./]*\$[a-zA-Z0-9\./]{43}</regex>
                        <regex>\$6\$[a-zA-Z0-9\./]*\$[a-zA-Z0-9\./]{86}</regex>
                      </constraint>
                      <constraintErrorMessage>Invalid encrypted password for $VAR(../../@).</constraintErrorMessage>
                    </properties>
                    <defaultValue>!</defaultValue>
                  </leafNode>
                  <leafNode name="plaintext-password">
                    <properties>
                      <help>Plaintext password used for encryption</help>
                    </properties>
                  </leafNode>
                  <tagNode name="public-keys">
                    <properties>
                      <help>Remote access public keys</help>
                      <valueHelp>
                        <format>txt</format>
                        <description>Key identifier used by ssh-keygen (usually of form user@host)</description>
                      </valueHelp>
                    </properties>
                    <children>
                      <leafNode name="key">
                        <properties>
                          <help>Public key value (Base64 encoded)</help>
                          <constraint>
                            <validator name="base64"/>
                          </constraint>
                        </properties>
                      </leafNode>
                      <leafNode name="options">
                        <properties>
                          <help>Optional public key options</help>
                        </properties>
                      </leafNode>
                      <leafNode name="type">
                        <properties>
                          <help>Public key type</help>
                          <completionHelp>
                            <list>ssh-dss ssh-rsa ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521 ssh-ed25519</list>
                          </completionHelp>
                          <valueHelp>
                            <format>ssh-dss</format>
                            <description/>
                          </valueHelp>
                          <valueHelp>
                            <format>ssh-rsa</format>
                            <description/>
                          </valueHelp>
                          <valueHelp>
                            <format>ecdsa-sha2-nistp256</format>
                            <description/>
                          </valueHelp>
                          <valueHelp>
                            <format>ecdsa-sha2-nistp384</format>
                            <description/>
                          </valueHelp>
                          <valueHelp>
                            <format>ssh-ed25519</format>
                            <description/>
                          </valueHelp>
                          <constraint>
                            <regex>^(ssh-dss|ssh-rsa|ecdsa-sha2-nistp256|ecdsa-sha2-nistp384|ecdsa-sha2-nistp521|ssh-ed25519)$</regex>
                          </constraint>
                        </properties>
                      </leafNode>
                    </children>
                  </tagNode>
                </children>
              </node>
              <leafNode name="full-name">
                <properties>
                  <help>Full name of the user (use quotes for names with spaces)</help>
                  <constraint>
                    <regex>[^:]*$</regex>
                  </constraint>
                  <constraintErrorMessage>Cannot use ':' in full name</constraintErrorMessage>
                </properties>
              </leafNode>
              <leafNode name="home-directory">
                <properties>
                  <help>Home directory</help>
                </properties>
              </leafNode>
            </children>
          </tagNode>
          #include <include/radius-server-ipv4-ipv6.xml.i>
          <node name="radius">
            <children>
              <tagNode name="server">
                <children>
                  <leafNode name="timeout">
                    <properties>
                      <help>Session timeout</help>
                      <valueHelp>
                        <format>u32:1-30</format>
                        <description>Session timeout in seconds</description>
                      </valueHelp>
                      <constraint>
                        <validator name="numeric" argument="--range 1-30"/>
                      </constraint>
                      <constraintErrorMessage>Timeout must be between 1 and 30 seconds</constraintErrorMessage>
                    </properties>
                    <defaultValue>2</defaultValue>
                  </leafNode>
                  <leafNode name="priority">
                    <properties>
                      <help>Server priority</help>
                      <valueHelp>
                        <format>u32:1-255</format>
                        <description>Server priority</description>
                      </valueHelp>
                      <constraint>
                        <validator name="numeric" argument="--range 1-255"/>
                      </constraint>
                    </properties>
                    <defaultValue>255</defaultValue>
                  </leafNode>
                </children>
              </tagNode>
              #include <include/interface/vrf.xml.i>
            </children>
          </node>
        </children>
      </node>
    </children>
  </node>
</interfaceDefinition>