Skip to content

Commit 8911266

Browse files
nmelehanleslitagordita
authored andcommitted
[Update] FirewallRuleConfig
- Refactor the start_port and end_port properties into a single ports property - Remove the ALL protocol - Copy edit of some other firewall endpoints and schemas
1 parent 40d4144 commit 8911266

File tree

1 file changed

+31
-32
lines changed

1 file changed

+31
-32
lines changed

openapi.yaml

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8812,8 +8812,7 @@ paths:
88128812
"inbound": [
88138813
{
88148814
"protocol": "TCP",
8815-
"start_port": 20,
8816-
"end_port": 22,
8815+
"ports": "22, 80, 443",
88178816
"addresses": {
88188817
"ipv4": [
88198818
"192.0.2.1",
@@ -8827,8 +8826,7 @@ paths:
88278826
],
88288827
"outbound": [
88298828
"protocol": "TCP",
8830-
"start_port": 20,
8831-
"end_port": 22,
8829+
"ports": "49152-65535",
88328830
"addresses": {
88338831
"ipv4": [
88348832
"192.0.2.1",
@@ -8927,7 +8925,7 @@ paths:
89278925
[Update Firewall Rules](http://developers.linode.com/api/v4/networking-firewalls-firewall-id-rules/#put)
89288926
endpoint to update your Rules.
89298927

8930-
- A Firewall's status can be set by this endpoint, but it cannot be
8928+
- A Firewall's status can be set to `enabled` or `disabled` by this endpoint, but it cannot be
89318929
set to `deleted`. Instead, use the
89328930
[Delete Firewall](http://developers.linode.com/api/v4/networking-firewalls-firewall-id/#delete)
89338931
endpoint to delete a Firewall.
@@ -8995,7 +8993,7 @@ paths:
89958993
- firewall:read_write
89968994
description: |
89978995
Delete a Firewall resource by its ID. This will remove all of the Firewall's Rules
8998-
from any Linode services that it was assigned to.
8996+
from any Linode services that the Firewall was assigned to.
89998997

90008998
A `firewall_delete` Event is generated when this endpoint returns successfully.
90018999

@@ -9279,7 +9277,8 @@ paths:
92799277
- Networking
92809278
summary: Update Firewall Rules
92819279
description: |
9282-
Updates the inbound and outbound Rules for a Firewall.
9280+
Updates the inbound and outbound Rules for a Firewall. Using this endpoint will
9281+
replace all of a Firewall's ruleset with the Rules specified in your request.
92839282

92849283
**Beta**: This endpoint is in beta. Please make sure to prepend all requests with
92859284
`/v4beta` instead of `/v4`, and be aware that this endpoint may receive breaking
@@ -9315,7 +9314,7 @@ paths:
93159314
"inbound": [
93169315
{
93179316
"protocol": "TCP",
9318-
"start_port": 80,
9317+
"ports": "22, 80, 8080, 443"
93199318
"addresses": {
93209319
"ipv4": [
93219320
"192.0.2.1",
@@ -9329,8 +9328,7 @@ paths:
93299328
],
93309329
"outbound": [
93319330
"protocol": "TCP",
9332-
"start_port": 20,
9333-
"end_port": 22,
9331+
"ports": "49152-65535"
93349332
"addresses": {
93359333
"ipv4": [
93369334
"192.0.2.1",
@@ -9347,8 +9345,8 @@ paths:
93479345
- lang: CLI
93489346
source: >
93499347
linode-cli firewalls rules-update 123 \
9350-
--inbound '[{"protocol": "TCP", "start_port": 80, "addresses": {"ipv4": ["192.0.2.1", "192.0.2.0/24"], "ipv6": ["2001:DB8::/32"]}}]' \
9351-
--outbound '[{"protocol": "TCP", "start_port": 20, "addresses": {"ipv4": ["192.0.2.1", "192.0.2.0/24"], "ipv6": ["2001:DB8::/32"]}}]'
9348+
--inbound '[{"protocol": "TCP", "ports": "22, 80, 8080, 443", "addresses": {"ipv4": ["192.0.2.1", "192.0.2.0/24"], "ipv6": ["2001:DB8::/32"]}}]' \
9349+
--outbound '[{"protocol": "TCP", "ports": "49152-65535", "addresses": {"ipv4": ["192.0.2.1", "192.0.2.0/24"], "ipv6": ["2001:DB8::/32"]}}]'
93529350
/nodebalancers:
93539351
x-linode-cli-command: nodebalancers
93549352
get:
@@ -14785,11 +14783,12 @@ components:
1478514783
description: >
1478614784
The inbound and outbound access rules to apply to the Firewall.
1478714785

14788-
* A minimum of one open inbound port is required. Any inbound
14789-
port that is not open will be blocked.
14790-
* Outbound rules are optional. When no outbound ports are open, all outbound
14791-
ports are allowed. If you open one outbound port or more, all
14792-
remaining outbound ports will be blocked.
14786+
* A minimum of one open inbound rule is required. Any inbound
14787+
traffic that is not permitted by your rules will be blocked.
14788+
* Outbound rules are optional. When no outbound rules are specified,
14789+
all outbound traffic is allowed. If one or more outbound rules are
14790+
specified, all outbound traffic that is not permitted by your rules
14791+
will be blocked.
1479314792
properties:
1479414793
inbound:
1479514794
type: array
@@ -14815,33 +14814,33 @@ components:
1481514814
FirewallRuleConfig:
1481614815
type: object
1481714816
description: >
14818-
This Firewall's access rules. To open traffic on a range of ports
14819-
specify a `start_port` and an `end_port`.
14817+
One of a Firewall's inbound or outbound access rules. The `ports` property
14818+
can be used to allow traffic on a comma-separated list of different ports.
1482014819
required:
1482114820
- protocol
14822-
- start_port
1482314821
properties:
1482414822
protocol:
1482514823
type: string
1482614824
enum:
14827-
- ALL
1482814825
- TCP
1482914826
- UDP
1483014827
- ICMP
1483114828
description: >
1483214829
The type of network traffic to allow.
1483314830
example: TCP
14834-
start_port:
14835-
type: integer
14836-
description: >
14837-
The port on which traffic will be allowed. Must be a value of `1-65535`.
14838-
example: 20
14839-
end_port:
14840-
type: integer
14841-
description: >
14842-
The end port for a range of ports on which traffic will be allowed. This port must be greater than or equal to the `start_port`
14843-
and must be a value of `1-65535`.
14844-
example: 22
14831+
ports:
14832+
type: string
14833+
description: |
14834+
A string representing the port or ports on which traffic will be allowed:
14835+
14836+
- The string may be a single port, a range of ports, or a comma-separated list
14837+
of single ports and port ranges. A space is permitted following each comma.
14838+
- A range of ports is inclusive of the start and end values for the range. The
14839+
end value of the range must be greater than the start value.
14840+
- Ports must be within 1 and 65535.
14841+
- Ports may not be specified if a rule's protocol is `ICMP`. At least one port
14842+
must be specified if a rule's protocol is `TCP` or `UDP`.
14843+
example: '22-24, 80, 443'
1484514844
addresses:
1484614845
type: object
1484714846
description: >

0 commit comments

Comments
 (0)