Skip to content

Commit 9c7860a

Browse files
committed
Add finance users policy
1 parent ac43797 commit 9c7860a

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

src/content/docs/learning-paths/secure-internet-traffic/build-network-policies/recommended-network-policies.mdx

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,58 @@ You can add a number of WARP client device posture checks as needed, such as [Di
135135

136136
Allow HTTPS access for user groups. For example, the following policy gives finance users access to any known financial applications:
137137

138+
<Tabs syncKey="dashPlusAPI">
139+
140+
<TabItem label="Dashboard">
141+
138142
| Selector | Operator | Value | Logic | Action |
139143
| ---------------- | -------- | ----------------- | ----- | ------ |
140144
| Destination IP | in list | _Finance Servers_ | And | Allow |
141145
| User Group Names | in | _Finance Users_ | | |
142146

147+
</TabItem>
148+
149+
<TabItem label="API">
150+
151+
```sh
152+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
153+
--header "Content-Type: application/json" \
154+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
155+
--data '{
156+
"name": "FinanceUsers-NET-HTTPS-FinanceServers",
157+
"description": "Allow HTTPS access for user groups",
158+
"precedence": 0,
159+
"enabled": true,
160+
"action": "allow",
161+
"filters": [
162+
"l4"
163+
],
164+
"traffic": "net.dst.ip in $<FINANCE_SERVERS_LIST_UUID>",
165+
"identity": "any(identity.groups.name[*] in {\"Finance Users\"})"
166+
}'
167+
```
168+
169+
</TabItem>
170+
171+
<TabItem label="Terraform">
172+
173+
```tf
174+
resource "cloudflare_zero_trust_gateway_policy" "finance_users_net_https_finance_servers" {
175+
account_id = var.account_id
176+
name = "FinanceUsers-NET-HTTPS-FinanceServers"
177+
description = "Allow HTTPS access for user groups"
178+
precedence = 0
179+
enabled = true
180+
action = "allow"
181+
filters = ["l4"]
182+
traffic = "net.dst.ip in ${"$"}${cloudflare_zero_trust_list.finance_servers_list.id}"
183+
identity = "any(identity.groups.name[*] in {\"Finance Users\"})"
184+
}
185+
```
186+
187+
</TabItem>
188+
</Tabs>
189+
143190
## All-NET-Internet-Blocklist
144191

145192
Block traffic to destination IPs, <GlossaryTooltip term="Server Name Indication (SNI)">SNIs</GlossaryTooltip>, and domain SNIs that are malicious or pose a threat to your organization.

0 commit comments

Comments
 (0)