Skip to content

Commit c696db3

Browse files
committed
Update firewalls endoints
1 parent 8985d4d commit c696db3

File tree

1 file changed

+80
-48
lines changed

1 file changed

+80
-48
lines changed

openapi.yaml

Lines changed: 80 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -9787,14 +9787,12 @@ paths:
97879787
Firewall to a Linode service. Currently, Firewalls can only be assigned to Linode
97889788
instances.
97899789

9790-
A Firewall can be assigned to multiple Linode services, and up to five active Firewalls
9791-
can be assigned to a single Linode service.
9790+
A Firewall can be assigned to a single Linode service at a time.
97929791

97939792
A `firewall_create` Event is generated when this endpoint returns successfully.
97949793

97959794
This endpoint is in **beta**.
97969795

9797-
97989796
* Gain access to [Linode Cloud Firewall](https://www.linode.com/products/firewall/) by signing up for our [Greenlight Beta program](https://www.linode.com/green-light/#sign-up-form).
97999797
* During the beta, Cloud Firewall is not available in every [data center region](/docs/api/regions). For the current list of availability, see the [Cloud Firewall Product Documentation](https://www.linode.com/docs/products/networking/cloud-firewall/).
98009798
* Please make sure to prepend all requests with
@@ -9812,25 +9810,21 @@ paths:
98129810
content:
98139811
application/json:
98149812
schema:
9815-
type: object
9813+
allOf:
9814+
- $ref: '#/components/schemas/Firewall'
98169815
required:
9817-
- label
9818-
- rules
9816+
- label
9817+
- rules
9818+
- inbound_policy
9819+
- outbound_policy
98199820
properties:
9820-
label:
9821-
$ref: '#/components/schemas/Firewall/properties/label'
9822-
rules:
9823-
$ref: '#/components/schemas/Firewall/properties/rules'
9824-
tags:
9825-
$ref: '#/components/schemas/Firewall/properties/tags'
98269821
devices:
98279822
type: object
98289823
description: >
98299824
A Firewall Device assigns a Firewall to a Linode service. Currently, Firewalls
98309825
can only be assigned to Linode instances.
98319826

9832-
* A Firewall can be assigned to multiple Linode services, and up to five active Firewalls can
9833-
be assigned to a single Linode service.
9827+
* A Firewall can be assigned to a single Linode service at a time.
98349828

98359829
* Additional disabled Firewalls can be assigned to a service, but they cannot be enabled if five other active Firewalls
98369830
are already assigned to the same service.
@@ -9866,41 +9860,46 @@ paths:
98669860
-X POST -d '{
98679861
"label": "firewall123",
98689862
"rules": {
9863+
"inbound_policy": "DROP",
98699864
"inbound": [
98709865
{
98719866
"protocol": "TCP",
98729867
"ports": "22, 80, 443",
98739868
"addresses": {
98749869
"ipv4": [
9875-
"192.0.2.1",
98769870
"192.0.2.0/24"
98779871
],
98789872
"ipv6": [
98799873
"2001:DB8::/32"
98809874
]
9881-
}
9875+
},
9876+
"action": "ACCEPT",
9877+
"label": "inbound-rule123",
9878+
"description": "An example inbound rule description."
98829879
}
98839880
],
9881+
"outbound_policy": "DROP"
98849882
"outbound": [
98859883
{
98869884
"protocol": "TCP",
98879885
"ports": "49152-65535",
98889886
"addresses": {
98899887
"ipv4": [
9890-
"192.0.2.1",
98919888
"192.0.2.0/24"
98929889
],
98939890
"ipv6": [
98949891
"2001:DB8::/32"
98959892
]
9896-
}
9893+
},
9894+
"action": "ACCEPT",
9895+
"label": "outbound-rule123",
9896+
"description": "An example outbound rule description."
98979897
}
98989898
]
98999899
},
99009900
"devices": {
99019901
"linodes": [
9902-
123,
9903-
456
9902+
123
99049903
]
99059904
},
99069905
"tags": [
@@ -10172,10 +10171,9 @@ paths:
1017210171
description: |
1017310172
Creates a Firewall Device, which assigns a Firewall to a Linode service (referred to
1017410173
as the Device's `entity`). Currently, only Devices with an entity of type `linode` are accepted.
10175-
A Firewall can be assigned to multiple Linode services, and up to five active Firewalls can
10176-
be assigned to a single Linode service. Additional disabled Firewalls can be
10177-
assigned to a service, but they cannot be enabled if five other active Firewalls
10178-
are already assigned to the same service.
10174+
A Firewall can be assigned a single Linode service at a time. Additional disabled Firewalls can be
10175+
assigned to a service, but they cannot be enabled if another active Firewall
10176+
is already assigned to the same service.
1017910177

1018010178
Creating a Firewall Device will apply the Rules from a Firewall to a Linode service.
1018110179
A `firewall_device_add` Event is generated when the Firewall Device is added successfully.
@@ -10443,34 +10441,40 @@ paths:
1044310441
curl -H "Content-Type: application/json" \
1044410442
-H "Authorization: Bearer $TOKEN" \
1044510443
-X PUT -d '{
10444+
"inbound_policy": "DROP",
1044610445
"inbound": [
1044710446
{
1044810447
"protocol": "TCP",
1044910448
"ports": "22, 80, 443",
10450-
"addresses": {
10449+
"addresses": {
1045110450
"ipv4": [
10452-
"192.0.2.1",
1045310451
"192.0.2.0/24"
1045410452
],
1045510453
"ipv6": [
1045610454
"2001:DB8::/32"
1045710455
]
10458-
}
10456+
},
10457+
"action": "ACCEPT",
10458+
"label": "inbound-rule123",
10459+
"description": "An example inbound rule description."
1045910460
}
1046010461
],
10462+
"outbound_policy": "DROP"
1046110463
"outbound": [
1046210464
{
1046310465
"protocol": "TCP",
1046410466
"ports": "49152-65535",
1046510467
"addresses": {
1046610468
"ipv4": [
10467-
"192.0.2.1",
1046810469
"192.0.2.0/24"
1046910470
],
1047010471
"ipv6": [
1047110472
"2001:DB8::/32"
1047210473
]
10473-
}
10474+
},
10475+
"action": "ACCEPT",
10476+
"label": "outbound-rule123",
10477+
"description": "An example outbound rule description."
1047410478
}
1047510479
]
1047610480
}' \
@@ -16521,8 +16525,7 @@ components:
1652116525
Firewall:
1652216526
type: object
1652316527
description: >
16524-
A resource that controls incoming and outgoing network traffic to a Linode service. A Firewall can
16525-
be assigned to multiple Linode services, and up to five active Firewalls can be assigned to a single Linode service.
16528+
A resource that controls incoming and outgoing network traffic to a Linode service. Only one Firewall can be attached to a Linode at any given time.
1652616529
[Create a Firewall Device](/docs/api/networking/#firewall-create)
1652716530
to assign a Firewall to a Linode service. Currently, Firewalls can only be assigned to Linode instances.
1652816531
properties:
@@ -16537,7 +16540,7 @@ components:
1653716540
label:
1653816541
x-linode-filterable: true
1653916542
type: string
16540-
description: >
16543+
description: |
1654116544
The Firewall's label, for display purposes only.
1654216545

1654316546
Firewall labels have the following constraints:
@@ -16576,7 +16579,7 @@ components:
1657616579
The status of this Firewall.
1657716580

1657816581
* When a Firewall is first created its status is `enabled`.
16579-
* Use the [Update Firewall](/docs/api/networking/#firewall-update) endpoint to set a Firewall's status to `enbaled` or `disabled`.
16582+
* Use the [Update Firewall](/docs/api/networking/#firewall-update) endpoint to set a Firewall's status to `enabled` or `disabled`.
1658016583
* Use the [Delete Firewall](/docs/api/networking/#firewall-delete) endpoint to delete a Firewall.
1658116584
enum:
1658216585
- enabled
@@ -16589,12 +16592,7 @@ components:
1658916592
description: |
1659016593
The inbound and outbound access rules to apply to the Firewall.
1659116594

16592-
* A minimum of one open inbound rule is required. Any inbound
16593-
traffic that is not permitted by your rules will be blocked.
16594-
* Outbound rules are optional. When no outbound rules are specified,
16595-
all outbound traffic is allowed. If one or more outbound rules are
16596-
specified, all outbound traffic that is not permitted by your rules
16597-
will be blocked.
16595+
`inbound_policy` and `outbound_policy` are required when creating a new Firewall.
1659816596

1659916597
A Firewall may have up to 25 rules across its inbound and outbound rulesets.
1660016598
properties:
@@ -16606,8 +16604,22 @@ components:
1660616604
type: array
1660716605
items:
1660816606
$ref: '#/components/schemas/FirewallRuleConfig'
16609-
required:
16610-
- inbound
16607+
inbound_policy:
16608+
type: string
16609+
enum:
16610+
- ACCEPT
16611+
- DROP
16612+
description: |
16613+
The default behavior for inbound traffic. This setting can be overridden by [updating](/docs/api/networking/#firewall-rules-update) the `inbound.action` property of the Firewall Rule.
16614+
example: DROP
16615+
outbound_policy:
16616+
type: string
16617+
enum:
16618+
- ACCEPT
16619+
- DROP
16620+
description: |
16621+
The default behavior for outbound traffic. This setting can be overridden by [updating](/docs/api/networking/#firewall-rules-update) the `action` property for an individual Firewall Rule.
16622+
example: DROP
1661116623
tags:
1661216624
x-linode-filterable: true
1661316625
description: >
@@ -16660,28 +16672,48 @@ components:
1666016672
are treated as equivalent when accounting for this limit.
1666116673
properties:
1666216674
ipv4:
16663-
description: A list of IPv4 addresses or networks.
16675+
description: A list of IPv4 addresses or networks. Must be in IP/mask format.
1666416676
type: array
1666516677
items:
1666616678
type: string
1666716679
example:
16668-
- 192.0.2.1
1666916680
- 192.0.2.0/24
1667016681
ipv6:
16671-
description: A list of IPv6 addresses or networks.
16682+
description: A list of IPv6 addresses or networks. Must be in IP/mask format.
1667216683
type: array
1667316684
items:
1667416685
type: string
1667516686
example:
1667616687
- 2001:DB8::/32
16688+
action:
16689+
type: string
16690+
enum:
16691+
- ACCEPT
16692+
- DROP
16693+
description: |
16694+
The behavior for this rule. Overrides the `inbound_policy` or `outbound_policy` for the Firewall.
16695+
example: ACCEPT
16696+
label:
16697+
type: string
16698+
description: |
16699+
Used to identify this rule. For display purposes only.
16700+
example: firewallrule123
16701+
minLength: 3
16702+
maxLength: 32
16703+
description:
16704+
type: string
16705+
description: |
16706+
Used to describe this rule. For display purposes only.
16707+
example: 'An example firewall rule description.'
16708+
minLength: 1
16709+
maxLength: 100
1667716710
FirewallDevices:
1667816711
type: object
1667916712
description: >
1668016713
Associates a Firewall with a Linode service. A Firewall can be assigned
16681-
to multiple Linode services, and up to five active Firewalls can
16682-
be assigned to a single Linode service. Additional disabled Firewalls can be
16683-
assigned to a service, but they cannot be enabled if five other active Firewalls
16684-
are already assigned to the same service.
16714+
to a single Linode service at a time. Additional disabled Firewalls can be
16715+
assigned to a service, but they cannot be enabled if another active Firewall
16716+
is already assigned to the same service.
1668516717
properties:
1668616718
id:
1668716719
x-linode-filterable: true

0 commit comments

Comments
 (0)