Skip to content

Commit

Permalink
Add check user identity policy
Browse files Browse the repository at this point in the history
  • Loading branch information
maxvp committed Dec 20, 2024
1 parent df03757 commit 0cc6b8a
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,39 @@ curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rule\

</TabItem> </Tabs>

<Render file="gateway/policies/policies-optional" />
## Check user identity

<Render file="gateway/policies/check-user-identity" />

<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">

| Selector | Operator | Value | Logic | Action |
| ---------------- | -------- | ------------- | ----- | ------ |
| Application | in | _Salesforce_ | And | Block |
| User Group Names | in | _Contractors_ | | |

</TabItem>

<TabItem label="API">

```sh
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rule\
--header "Content-Type: application/json" \
--header "Authorization: Bearer <API_TOKEN>" \
--data '{
"name": "Check user identity",
"description": "Filter traffic based on a user identity group name",
"enabled": true,
"action": "block",
"filters": [
"dns"
],
"traffic": "any(app.ids[*] in {606})",
"identity": "any(identity.groups.name[*] in {\"Contractors\"})",
}'
```

</TabItem> </Tabs>

## Restrict access to specific groups

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,14 @@ Block a section of a site without blocking the entire site. For example, you can
| ----------- | -------- | ------------------------- | ------ |
| Application | in | _Artificial Intelligence_ | Block |

<Render file="gateway/policies/policies-optional" />
## Check user identity

<Render file="gateway/policies/check-user-identity" />

| Selector | Operator | Value | Logic | Action |
| ---------------- | -------- | ------------- | ----- | ------ |
| Application | in | _Salesforce_ | And | Block |
| User Group Names | in | _Contractors_ | | |

## Skip inspection for groups of applications

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ Refer to the [network policies page](/cloudflare-one/policies/gateway/network-po
| ----------- | -------- | ------------------------- | ------ |
| Application | in | _Artificial Intelligence_ | Block |

<Render file="gateway/policies/policies-optional" />
## Check user identity

<Render file="gateway/policies/check-user-identity" />

| Selector | Operator | Value | Logic | Action |
| ---------------- | -------- | ------------- | ----- | ------ |
| Application | in | _Salesforce_ | And | Block |
| User Group Names | in | _Contractors_ | | |

## Enforce device posture

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
{}
---

Configure access on a per user or group basis by adding [identity-based conditions](/cloudflare-one/policies/gateway/identity-selectors/) to your policies.

This file was deleted.

0 comments on commit 0cc6b8a

Please sign in to comment.