summaryrefslogtreecommitdiff
path: root/interface-definitions/https.xml
blob: 7a87133f31380174d5aeb8812e957f07c5405954 (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
<?xml version="1.0"?>
<!-- HTTPS configuration -->
<interfaceDefinition>
  <node name="service">
    <children>
      <node name="https" owner="${vyos_conf_scripts_dir}/https.py">
        <properties>
          <help>HTTPS configuration</help>
          <priority>1001</priority>
        </properties>
        <children>
          <tagNode name="listen-addresses">
            <properties>
              <help>Addresses to listen for HTTPS requests</help>
              <valueHelp>
                <format>ipv4</format>
                <description>HTTPS IPv4 address</description>
              </valueHelp>
              <valueHelp>
                <format>ipv6</format>
                <description>HTTPS IPv6 address</description>
              </valueHelp>
              <valueHelp>
                <format>'*'</format>
                <description>any</description>
              </valueHelp>
              <constraint>
                <validator name="ipv4-address"/>
                <validator name="ipv6-address"/>
                <regex>^\\*$</regex>
              </constraint>
            </properties>
            <children>
              <leafNode name="server-names">
                <properties>
                  <help>Server names: exact, wildcard, regex, or '_' (any)</help>
                  <multi/>
                </properties>
              </leafNode>
            </children>
          </tagNode>
          <node name="certificates">
            <properties>
              <help>TLS certificates</help>
            </properties>
            <children>
              <node name="system-generated-certificate" owner="${vyos_conf_scripts_dir}/vyos_cert.py">
                <properties>
                  <help>Use an automatically generated self-signed certificate</help>
                  <valueless/>
                </properties>
                <children>
                  <leafNode name="lifetime">
                    <properties>
                      <help>Lifetime in days; default is 365</help>
                      <valueHelp>
                        <format>1-65535</format>
                        <description>Number of days</description>
                      </valueHelp>
                    </properties>
                  </leafNode>
                </children>
              </node>
            </children>
          </node>
          <node name="api" owner="${vyos_conf_scripts_dir}/http-api.py">
            <properties>
              <help>VyOS HTTP API configuration</help>
              <priority>1002</priority>
            </properties>
            <children>
              <leafNode name="port">
                <properties>
                  <help>Port for HTTP API service</help>
                  <valueHelp>
                    <format>1-65535</format>
                    <description>Numeric IP port</description>
                  </valueHelp>
                  <constraint>
                    <validator name="numeric" argument="--range 1-65535"/>
                  </constraint>
                </properties>
              </leafNode>
              <node name="keys">
                <properties>
                  <help>HTTP API keys</help>
                </properties>
                <children>
                  <tagNode name="id">
                    <properties>
                      <help>HTTP API id</help>
                    </properties>
                    <children>
                      <leafNode name="key">
                        <properties>
                          <help>HTTP API plaintext key</help>
                        </properties>
                      </leafNode>
                    </children>
                  </tagNode>
                </children>
              </node>
              <leafNode name="strict">
                <properties>
                  <help>Enforce strict path checking</help>
                  <valueless/>
                </properties>
              </leafNode>
              <leafNode name="debug">
                <properties>
                  <help>Debug</help>
                  <valueless/>
                  <hidden/>
                </properties>
              </leafNode>
            </children>
          </node>
        </children>
      </node>
    </children>
  </node>
</interfaceDefinition>