Get CNNS Container and Host Policy
GET/api/v33.02/policies/firewall/network
x-prisma-cloud-target-env: {"permission":"policyCNNF"}
Retrieves a list of all CNNS container and host rules.
cURL Request
Refer to the following example cURL command:
$ curl -k \
-u <USER> \
-H 'Content-Type: application/json' \
-X GET \
"https://<CONSOLE>/api/v<VERSION>/policies/firewall/network"
Responses
- 200
- default
Policy holds the data for firewall policies (host and container)
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- ]
- ]
- Array [
- Array [
- ]
- ]
- Array [
- Array [
- ]
- Array [
- ]
- ]
.
ContainerEnabled indicates whether container network firewall feature is enabled.
containerRules object[]
ContainerRules holds the container firewall rules.
Indicates whether the rule is currently disabled. Values: true (disabled) or false (enabled).
EntityID represents the ID of each network firewall entity. 20 bits are used. Max legal value: 2^20-1
Possible values: [allow,alert,prevent,monitor,
]
Effect is the effect that is used in the CNNF rule
RuleID represents the ID of each container network firewall policy rule
Specifies the date and time when the rule was last modified.
Name of the rule.
Describes any noteworthy points for a rule. You can include any text.
User who created or last modified the rule.
ports object[]
Ports are the entity port range specifications.
Deny indicates whether the connection is denied.
.
.
Previous name of the rule. Required for rule renaming.
EntityID represents the ID of each network firewall entity. 20 bits are used. Max legal value: 2^20-1
HostEnabled indicates whether host network firewall feature is enabled.
hostRules object[]
HostRules holds the host firewall rules.
Indicates whether the rule is currently disabled. Values: true (disabled) or false (enabled).
EntityID represents the ID of each network firewall entity. 20 bits are used. Max legal value: 2^20-1
Possible values: [allow,alert,prevent,monitor,
]
Effect is the effect that is used in the CNNF rule
RuleID represents the ID of each container network firewall policy rule
Specifies the date and time when the rule was last modified.
Name of the rule.
Describes any noteworthy points for a rule. You can include any text.
User who created or last modified the rule.
ports object[]
Ports are the entity port range specifications.
Deny indicates whether the connection is denied.
.
.
Previous name of the rule. Required for rule renaming.
EntityID represents the ID of each network firewall entity. 20 bits are used. Max legal value: 2^20-1
.
networkEntities object[]
NetworkEntities represents a list of network firewall entities
EntityID represents the ID of each network firewall entity. 20 bits are used. Max legal value: 2^20-1
allowAll object
AllowAllConnections indicates if connections are allowed to/from any entity of the specified types e.g. if inbound contains the type subnet, the entity is allowed to receive connections from any subnet
Possible values: [container,host,subnet,dns
]
Inbound indicates if connections are allowed from any entity of the specified types.
Possible values: [container,host,subnet,dns
]
Outbound indicates if connections are allowed to any entity of the specified types.
collections object[]
Collections indicate the collection the entity is part of.
List of account IDs.
List of application IDs.
List of Kubernetes cluster names.
Color is a hexadecimal representation of color code value
List of containers.
Free-form text.
List of functions.
List of hosts.
List of images.
List of labels.
Datetime when the collection was last modified.
Collection name. Must be unique.
List of Kubernetes namespaces.
User who created or last modified the collection.
Indicates whether this collection originates from Prisma Cloud.
Indicates whether this collection was created by the system (i.e., a non user) (true) or a real user (false).
Domains is a list of domains.
Name is the entity name.
subnets object[]
Subnets are the CIDR format network.
CIDR is the IP range of the defined entity.
Name is the given name to represent the range.
Possible values: [container,host,subnet,dns
]
RuleEntityType is the network firewall rule entity type
.
{
"_id": "string",
"containerEnabled": true,
"containerRules": [
{
"disabled": true,
"dst": 0,
"effect": [
"allow",
"alert",
"prevent",
"monitor",
""
],
"id": 0,
"modified": "2024-07-29T15:51:28.071Z",
"name": "string",
"notes": "string",
"owner": "string",
"ports": [
{
"deny": true,
"end": 0,
"start": 0
}
],
"previousName": "string",
"src": 0
}
],
"hostEnabled": true,
"hostRules": [
{
"disabled": true,
"dst": 0,
"effect": [
"allow",
"alert",
"prevent",
"monitor",
""
],
"id": 0,
"modified": "2024-07-29T15:51:28.071Z",
"name": "string",
"notes": "string",
"owner": "string",
"ports": [
{
"deny": true,
"end": 0,
"start": 0
}
],
"previousName": "string",
"src": 0
}
],
"modified": "2024-07-29T15:51:28.071Z",
"networkEntities": [
{
"_id": 0,
"allowAll": {
"inbound": [
[
"container",
"host",
"subnet",
"dns"
]
],
"outbound": [
[
"container",
"host",
"subnet",
"dns"
]
]
},
"collections": [
{
"accountIDs": [
"string"
],
"appIDs": [
"string"
],
"clusters": [
"string"
],
"color": "string",
"containers": [
"string"
],
"description": "string",
"functions": [
"string"
],
"hosts": [
"string"
],
"images": [
"string"
],
"labels": [
"string"
],
"modified": "2024-07-29T15:51:28.071Z",
"name": "string",
"namespaces": [
"string"
],
"owner": "string",
"prisma": true,
"system": true
}
],
"domains": [
"string"
],
"name": "string",
"subnets": [
{
"cidr": "string",
"name": "string"
}
],
"type": [
"container",
"host",
"subnet",
"dns"
]
}
],
"owner": "string"
}