summaryrefslogtreecommitdiff
path: root/op-mode-definitions/generate-system-login-user.xml.in
blob: 237a13610420b1bdba857a7775008994ea4c1736 (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
<?xml version="1.0"?>
<interfaceDefinition>
  <node name="generate">
    <children>
      <node name="system">
        <properties>
          <help>Generate system related parameters</help>
        </properties>
        <children>
          <node name="login">
            <properties>
              <help>Generate system login related parameters</help>
            </properties>
            <children>
              <tagNode name="username">
                <properties>
                  <help>Username used for authentication</help>
                  <completionHelp>
                    <list>&lt;username&gt;</list>
                  </completionHelp>
                </properties>
                <children>
                  <node name="otp-key">
                    <properties>
                      <help>Generate OpenConnect OTP token</help>
                    </properties>
                    <children>
                      <node name="hotp-time">
                        <properties>
                          <help>HOTP time-based token</help>
                        </properties>
                        <command>sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5"</command>
                        <children>
                          <tagNode name="rate-limit">
                            <properties>
                              <help>Duration of single time interval</help>
                            </properties>
                            <command>sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate-limit "$9"</command>
                            <children>
                              <tagNode name="rate-time">
                                <properties>
                                  <help>The number of digits in the one-time password</help>
                                </properties>
                                <command>sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate-limit "$9" --rate-time "${11}" </command>
                                <children>
                                  <tagNode name="window-size">
                                    <properties>
                                      <help>The number of digits in the one-time password</help>
                                    </properties>
                                    <command>sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate-limit "$9" --rate-time "${11}" --window-size "${13}"</command>
                                  </tagNode>
                                </children>
                              </tagNode>
                            </children>
                          </tagNode>
                          <tagNode name="window-size">
                            <properties>
                              <help>The number of digits in the one-time password</help>
                            </properties>
                            <command>sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --window-size "${9}"</command>
                            <children>
                              <tagNode name="rate-limit">
                                <properties>
                                  <help>Duration of single time interval</help>
                                </properties>
                                <command>sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate-limit "${11}" --window-size "${9}"</command>
                                <children>
                                  <tagNode name="rate-time">
                                    <properties>
                                      <help>Duration of single time interval</help>
                                    </properties>
                                    <command>sudo ${vyos_op_scripts_dir}/generate_system_login_user.py --username "$5" --rate-limit "${11}" --rate-time "${13}" --window-size "${9}"</command>
                                  </tagNode>
                                </children>
                              </tagNode>
                            </children>
                          </tagNode>
                        </children>
                      </node>
                    </children>
                  </node>
                </children>
              </tagNode>
            </children>
          </node>
        </children>
      </node>
    </children>
  </node>
</interfaceDefinition>