Skip to content

Commit 51597db

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 bcfe982 commit 51597db

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
@@ -9007,8 +9007,7 @@ paths:
90079007
"inbound": [
90089008
{
90099009
"protocol": "TCP",
9010-
"start_port": 20,
9011-
"end_port": 22,
9010+
"ports": "22, 80, 443",
90129011
"addresses": {
90139012
"ipv4": [
90149013
"192.0.2.1",
@@ -9022,8 +9021,7 @@ paths:
90229021
],
90239022
"outbound": [
90249023
"protocol": "TCP",
9025-
"start_port": 20,
9026-
"end_port": 22,
9024+
"ports": "49152-65535",
90279025
"addresses": {
90289026
"ipv4": [
90299027
"192.0.2.1",
@@ -9122,7 +9120,7 @@ paths:
91229120
[Update Firewall Rules](http://developers.linode.com/api/v4/networking-firewalls-firewall-id-rules/#put)
91239121
endpoint to update your Rules.
91249122

9125-
- A Firewall's status can be set by this endpoint, but it cannot be
9123+
- A Firewall's status can be set to `enabled` or `disabled` by this endpoint, but it cannot be
91269124
set to `deleted`. Instead, use the
91279125
[Delete Firewall](http://developers.linode.com/api/v4/networking-firewalls-firewall-id/#delete)
91289126
endpoint to delete a Firewall.
@@ -9190,7 +9188,7 @@ paths:
91909188
- firewall:read_write
91919189
description: |
91929190
Delete a Firewall resource by its ID. This will remove all of the Firewall's Rules
9193-
from any Linode services that it was assigned to.
9191+
from any Linode services that the Firewall was assigned to.
91949192

91959193
A `firewall_delete` Event is generated when this endpoint returns successfully.
91969194

@@ -9474,7 +9472,8 @@ paths:
94749472
- Networking
94759473
summary: Update Firewall Rules
94769474
description: |
9477-
Updates the inbound and outbound Rules for a Firewall.
9475+
Updates the inbound and outbound Rules for a Firewall. Using this endpoint will
9476+
replace all of a Firewall's ruleset with the Rules specified in your request.
94789477

94799478
**Beta**: This endpoint is in beta. Please make sure to prepend all requests with
94809479
`/v4beta` instead of `/v4`, and be aware that this endpoint may receive breaking
@@ -9510,7 +9509,7 @@ paths:
95109509
"inbound": [
95119510
{
95129511
"protocol": "TCP",
9513-
"start_port": 80,
9512+
"ports": "22, 80, 8080, 443"
95149513
"addresses": {
95159514
"ipv4": [
95169515
"192.0.2.1",
@@ -9524,8 +9523,7 @@ paths:
95249523
],
95259524
"outbound": [
95269525
"protocol": "TCP",
9527-
"start_port": 20,
9528-
"end_port": 22,
9526+
"ports": "49152-65535"
95299527
"addresses": {
95309528
"ipv4": [
95319529
"192.0.2.1",
@@ -9542,8 +9540,8 @@ paths:
95429540
- lang: CLI
95439541
source: >
95449542
linode-cli firewalls rules-update 123 \
9545-
--inbound '[{"protocol": "TCP", "start_port": 80, "addresses": {"ipv4": ["192.0.2.1", "192.0.2.0/24"], "ipv6": ["2001:DB8::/32"]}}]' \
9546-
--outbound '[{"protocol": "TCP", "start_port": 20, "addresses": {"ipv4": ["192.0.2.1", "192.0.2.0/24"], "ipv6": ["2001:DB8::/32"]}}]'
9543+
--inbound '[{"protocol": "TCP", "ports": "22, 80, 8080, 443", "addresses": {"ipv4": ["192.0.2.1", "192.0.2.0/24"], "ipv6": ["2001:DB8::/32"]}}]' \
9544+
--outbound '[{"protocol": "TCP", "ports": "49152-65535", "addresses": {"ipv4": ["192.0.2.1", "192.0.2.0/24"], "ipv6": ["2001:DB8::/32"]}}]'
95479545
/nodebalancers:
95489546
x-linode-cli-command: nodebalancers
95499547
get:
@@ -15067,11 +15065,12 @@ components:
1506715065
description: >
1506815066
The inbound and outbound access rules to apply to the Firewall.
1506915067

15070-
* A minimum of one open inbound port is required. Any inbound
15071-
port that is not open will be blocked.
15072-
* Outbound rules are optional. When no outbound ports are open, all outbound
15073-
ports are allowed. If you open one outbound port or more, all
15074-
remaining outbound ports will be blocked.
15068+
* A minimum of one open inbound rule is required. Any inbound
15069+
traffic that is not permitted by your rules will be blocked.
15070+
* Outbound rules are optional. When no outbound rules are specified,
15071+
all outbound traffic is allowed. If one or more outbound rules are
15072+
specified, all outbound traffic that is not permitted by your rules
15073+
will be blocked.
1507515074
properties:
1507615075
inbound:
1507715076
type: array
@@ -15097,33 +15096,33 @@ components:
1509715096
FirewallRuleConfig:
1509815097
type: object
1509915098
description: >
15100-
This Firewall's access rules. To open traffic on a range of ports
15101-
specify a `start_port` and an `end_port`.
15099+
One of a Firewall's inbound or outbound access rules. The `ports` property
15100+
can be used to allow traffic on a comma-separated list of different ports.
1510215101
required:
1510315102
- protocol
15104-
- start_port
1510515103
properties:
1510615104
protocol:
1510715105
type: string
1510815106
enum:
15109-
- ALL
1511015107
- TCP
1511115108
- UDP
1511215109
- ICMP
1511315110
description: >
1511415111
The type of network traffic to allow.
1511515112
example: TCP
15116-
start_port:
15117-
type: integer
15118-
description: >
15119-
The port on which traffic will be allowed. Must be a value of `1-65535`.
15120-
example: 20
15121-
end_port:
15122-
type: integer
15123-
description: >
15124-
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`
15125-
and must be a value of `1-65535`.
15126-
example: 22
15113+
ports:
15114+
type: string
15115+
description: |
15116+
A string representing the port or ports on which traffic will be allowed:
15117+
15118+
- The string may be a single port, a range of ports, or a comma-separated list
15119+
of single ports and port ranges. A space is permitted following each comma.
15120+
- A range of ports is inclusive of the start and end values for the range. The
15121+
end value of the range must be greater than the start value.
15122+
- Ports must be within 1 and 65535.
15123+
- Ports may not be specified if a rule's protocol is `ICMP`. At least one port
15124+
must be specified if a rule's protocol is `TCP` or `UDP`.
15125+
example: '22-24, 80, 443'
1512715126
addresses:
1512815127
type: object
1512915128
description: >

0 commit comments

Comments
 (0)