summaryrefslogtreecommitdiff
path: root/op-mode-definitions/openconnect.xml.in
blob: 9343637c084e568013048f45a967180db50518da (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
<?xml version="1.0"?>
<interfaceDefinition>
  <node name="show">
    <children>
      <node name="openconnect-server">
        <properties>
          <help>Show OpenConnect server information</help>
        </properties>
        <children>
          <leafNode name="sessions">
            <properties>
              <help>Show active OpenConnect server sessions</help>
            </properties>
            <command>${vyos_op_scripts_dir}/openconnect-control.py --action="show_sessions"</command>
          </leafNode>
          <tagNode name="user">
            <properties>
              <help>Show OpenConnect configured user settings</help>
              <completionHelp>
                <script>sudo ${vyos_completion_dir}/list_openconnect_users.py</script>
              </completionHelp>
            </properties>
            <children>
              <node name="otp">
                <properties>
                  <help>Show OTP key information</help>
                </properties>
                <children>
                  <leafNode name="full">
                    <properties>
                      <help>Show full settings, including QR code and commands for VyOS</help>
                    </properties>
                    <command>${vyos_op_scripts_dir}/show_openconnect_otp.py --user="$4" --info="full"</command>
                  </leafNode>
                  <leafNode name="key-hex">
                    <properties>
                      <help>Show OTP authentication secret in Hex (used in VyOS config)</help>
                    </properties>
                    <command>${vyos_op_scripts_dir}/show_openconnect_otp.py --user="$4" --info="key-hex"</command>
                  </leafNode>
                  <leafNode name="key-b32">
                    <properties>
                      <help>Show OTP authentication secret in Base32 (used in mobile apps)</help>
                    </properties>
                    <command>${vyos_op_scripts_dir}/show_openconnect_otp.py --user="$4" --info="key-b32"</command>
                  </leafNode>
                  <leafNode name="qrcode">
                    <properties>
                      <help>Show OTP authentication QR code</help>
                    </properties>
                    <command>${vyos_op_scripts_dir}/show_openconnect_otp.py --user="$4" --info="qrcode"</command>
                  </leafNode>
                  <leafNode name="uri">
                    <properties>
                      <help>Show OTP authentication otpauth URI</help>
                    </properties>
                    <command>${vyos_op_scripts_dir}/show_openconnect_otp.py --user="$4" --info="uri"</command>
                  </leafNode>
                </children>
              </node>
            </children>
          </tagNode>
        </children>
      </node>
    </children>
  </node>
  <node name="restart">
    <children>
      <leafNode name="openconnect-server">
        <properties>
          <help>Restart openconnect server process</help>
        </properties>
        <command>${vyos_op_scripts_dir}/openconnect-control.py --action="restart"</command>
      </leafNode>
    </children>
  </node>
</interfaceDefinition>