aboutsummaryrefslogtreecommitdiff
path: root/src/wixext/firewall.xsd
blob: 20ad065f4216cccece939ed76bd4a2df972e5a1d (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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->


<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
          xmlns:xse=" http://wixtoolset.org/schemas/XmlSchemaExtension"
         xmlns:html="http://www.w3.org/1999/xhtml"
    targetNamespace="http://wixtoolset.org/schemas/v4/wxs/firewall"
              xmlns="http://wixtoolset.org/schemas/v4/wxs/firewall">
    <xs:annotation>
        <xs:documentation>
            The source code schema for the WiX Toolset Firewall Extension.
        </xs:documentation>
    </xs:annotation>

    <xs:import namespace="http://wixtoolset.org/schemas/v4/wxs" />

    <xs:element name="FirewallException">
        <xs:annotation>
            <xs:documentation>
                Registers an exception for a program or a specific port and protocol in the Windows Firewall
                on Windows XP SP2, Windows Server 2003 SP1, and later. For more information about the Windows
                Firewall, see <html:a href="http://msdn.microsoft.com/en-us/library/aa364679.aspx">
                About Windows Firewall API</html:a>.
            </xs:documentation>
            <xs:appinfo>
                <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" />
                <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="File" />
            </xs:appinfo>
        </xs:annotation>

        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation>
                        Explicitly-listed remote addresses that this exception allows through the
                        firewall.
                    </xs:documentation>
                </xs:annotation>
                <xs:element ref="RemoteAddress" />
            </xs:choice>

            <xs:attribute name="Id" type="xs:string" use="required">
                <xs:annotation>
                    <xs:documentation>
                        Unique ID of this firewall exception.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>

            <xs:attribute name="Name" type="xs:string" use="required">
                <xs:annotation>
                    <xs:documentation>
                        Name of this firewall exception, visible to the user in the firewall
                        control panel.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>

            <xs:attribute name="Scope">
                <xs:annotation>
                    <xs:documentation>
                        The scope of this firewall exception, which indicates whether incoming
                        connections can come from any computer including those on the Internet
                        or only those on the local network subnet. To more precisely specify
                        allowed remote address, specify a custom scope using RemoteAddress
                        child elements.
                    </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="any" />
                        <xs:enumeration value="localSubnet" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>

            <xs:attribute name="Port" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        Port to allow through the firewall for this exception.

                        If you use Port and also File or Program in the same
                        FirewallException element, the exception will fail to install on
                        Windows XP and Windows Server 2003. IgnoreFailure="yes" can be used to
                        ignore the resulting failure, but the exception will not be added.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>

            <xs:attribute name="Protocol">
                <xs:annotation>
                    <xs:documentation>
                        IP protocol used for this firewall exception. If Port is defined,
                        "tcp" is assumed if the protocol is not specified.

                        If you use Protocol and also File or Program in the same
                        FirewallException element, the exception will fail to install on
                        Windows XP and Windows Server 2003. IgnoreFailure="yes" can be used to
                        ignore the resulting failure, but the exception will not be added.
                    </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="tcp" />
                        <xs:enumeration value="udp" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>

            <xs:attribute name="File" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        Identifier of a file to be granted access to all incoming ports and
                        protocols. If you use File, you cannot also use Program.

                        If you use File and also Port or Protocol in the same
                        FirewallException element, the exception will fail to install on
                        Windows XP and Windows Server 2003. IgnoreFailure="yes" can be used to
                        ignore the resulting failure, but the exception will not be added.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>

            <xs:attribute name="Program" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        Path to a target program to be granted access to all incoming ports and
                        protocols. Note that this is a formatted field, so you can use [#fileId]
                        syntax to refer to a file being installed. If you use Program, you cannot
                        also use File.

                        If you use Program and also Port or Protocol in the same
                        FirewallException element, the exception will fail to install on
                        Windows XP and Windows Server 2003. IgnoreFailure="yes" can be used to
                        ignore the resulting failure, but the exception will not be added.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>

            <xs:attribute name="IgnoreFailure" type="YesNoType">
                <xs:annotation>
                    <xs:documentation>
                        If "yes", failures to register this firewall exception will be silently
                        ignored. If "no" (the default), failures will cause rollback.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>

            <xs:attribute name="Profile">
              <xs:annotation>
                <xs:documentation>
                  Profile type for this firewall exception. Default is "all".
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:NMTOKEN">
                  <xs:enumeration value="domain" />
                  <xs:enumeration value="private" />
                  <xs:enumeration value="public" />
                  <xs:enumeration value="all" />
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="Description" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                      Description for this firewall rule displayed in Windows Firewall manager in
                      Windows Vista and later.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>

            <xs:attribute name="Outbound" type="YesNoType">
                <xs:annotation>
                    <xs:documentation>
                        If "yes", registers an outbound firewall rule.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="RemoteAddress">
        <xs:annotation>
            <xs:documentation>
                A remote address to which the port or program can listen. Address formats vary
                based on the version of Windows and Windows Firewall the program is being installed
                on. For Windows XP SP2 and Windows Server 2003 SP1, see
                <html:a href="http://msdn.microsoft.com/en-us/library/aa365270.aspx">
                    RemoteAddresses Property</html:a>.
                For Windows Vista and Windows Server 2008, see
                <html:a href="https://docs.microsoft.com/en-us/windows/win32/api/netfw/nf-netfw-inetfwrule-get_remoteaddresses">
                    RemoteAddresses Property</html:a>.
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute name="Value" type="xs:string" use="required">
                <xs:annotation>
                    <xs:documentation>
                            A remote address.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:simpleType name="YesNoType">
        <xs:annotation>
            <xs:documentation>Values of this type will either be "yes" or "no".</xs:documentation>
        </xs:annotation>
        <xs:restriction base='xs:NMTOKEN'>
            <xs:enumeration value="no"/>
            <xs:enumeration value="yes"/>
        </xs:restriction>
    </xs:simpleType>
</xs:schema>