Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ To retrieve those values:

### 2. Add CrowdStrike as a service provider

1. In [Zero Trust](https://one.dash.cloudflare.com), go to **Settings** > **WARP Client**.
2. Scroll down to **Device posture providers** and select **Add new**.
3. Select **CrowdStrike**.
4. Enter any name for the provider. This name will be used throughout the dashboard to reference this connection.
<Render file="posture/add-service-provider" params={{ one: "Crowdstrike" }} />
5. Enter the **Client ID** and **Client secret** you noted down above.
6. Enter your **Rest API URL**.
7. Enter your **Customer ID**.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
---
pcx_content_type: how-to
title: Custom device posture integration
sidebar:
label: Custom integration
order: 1
hidden: true

---

import { Render } from "~/components"

Cloudflare Zero Trust allows you to enforce custom device posture checks on your applications. This involves configuring a WARP service-to-service integration that periodially calls the external API of your choice, whether it is a third-party endpoint provider or a home built solution. When called, the API will receive device identifying information from Cloudflare and be expected to return a value between 0 to 100. You can then set up a device posture check that determines if the returned value counts as a pass or fail; for example, you could allow access to a user only if their device has a posture value greater than 60.

```mermaid
sequenceDiagram
participant WARP
participant Cloudflare Access
participant External API
WARP->>Cloudflare Access: Client ID and Secret
Cloudflare Access->>External API: Application token
WARP->>External API: JSON with user and device identity
External API-->>WARP: JSON with 0-100 result
```

## External API requirements

The custom service provider integration works with any API service that meets the following specifications.

### Authentication

The WARP client authenticates to the external API through Cloudflare Access. The external API should [validate the application token](/cloudflare-one/identity/authorization-cookie/validating-json/) issued by Cloudflare Access to ensure that any requests which bypass Access (for example, due to a network misconfiguration) are rejected.

### Data passed to external API

Cloudflare will pass the following parameters to the configured API endpoint. You can use this data to identify the device and assign a posture score. For some devices, not all identifying information will apply, in which case the field will be blank. A maximum of 1000 devices will be sent per a request.

| Field | Description |
| ----- | ----------- |
| device_id | Device UUID assigned by the WARP client |
| email | Email address used to authenticate the WARP client |
| serial_number | Device serial number |
| mac_address | Device MAC address |
| virtual_ipv4 | Device virtual IPv4 address |
| hostname | Device name |

Example request body:
```json
{
"devices": {
[
{
"device_id": "9ece5fab-7398-488a-a575-e25a9a3dec07",
"email": "[email protected]",
"serial_number": "jdR44P3d",
"mac_address": "74:1d:3e:23:e0:fe",
"virtual_ipv4": "100.96.0.10",
"hostname": "string",
},
{...},
{...}
]
}
}
```

### Expected response from external API

For each Cloudflare `device_id`, the API service is expected to return a posture score and optionally a third-party device ID.

| Field | Description |
| ----- | ----------- |
| s2s_id | Third party device ID (empty string if unavailable) |
| score | Integer value between 0 - 100 |

Example response body:
```json
{
"result": {
"9ece5fab-7398-488a-a575-e25a9a3dec07": {
"s2s_id": "",
"score": 10
},
"device_id2": {...},
"device_id3": {...}
}
}
```

## Set up custom device posture checks

### 1. Create a service token

WARP uses an Access Client ID and Access Client Secret to securely authenticate to the external API. If you do not already have an Access Client ID and Access Client Secret, [create a new service token](/cloudflare-one/identity/service-tokens/#create-a-service-token).

### 2. Create an Access application

Next, secure the external API behind Cloudflare Access so that WARP can authenticate with the service token. To add the API endpoint to Access:

1. [Create a self-hosted application](/cloudflare-one/applications/configure-apps/self-hosted-apps/) for your API endpoint.
2. Add the following Access policy to the application. Make sure that **Action** is set to _Service Auth_ (not _Allow_).

| Action | Rule type | Selector | Value |
| ------ | --------- | ----------------- | ------------------------------------- |
| Service Auth | Include | Service Token | `<TOKEN-NAME>` |

### 3. Add a service provider integration

To create a custom service-to-service integration:

<Render file="posture/add-service-provider" params={{ one: "Custom service provider" }} />
5. In **Access client ID** and **Access client secret**, enter the Access service token used to authenticate to your external API.
6. In **Rest API URL**, enter the external API endpoint that Cloudflare will query for posture information (for example, `https://api.example.com`). For more information, refer to [External API requirements](#external-api-requirements).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
6. In **Rest API URL**, enter the external API endpoint that Cloudflare will query for posture information (for example, `https://api.example.com`). For more information, refer to [External API requirements](#external-api-requirements).
6. In **Rest API URL**, enter the external API endpoint that Cloudflare will query for posture information (for example, `https://API.example.com`). For more information, refer to [External API requirements](#external-api-requirements).

Issues:

  • Style Guide - (Terms-error) Use 'API' instead of 'api'.
  • Style Guide - (Terms-error) Use 'API' instead of 'api'.

Fix Explanation:

The term 'api' should be capitalized to 'API' to comply with the style guide. This is a simple capitalization fix to ensure consistency and professionalism in the documentation.

7. In **Polling frequency**, choose how often Cloudflare Zero Trust should query the external API for information.
8. Select **Test and save**. The test checks if Cloudflare can authenticate to the API URL using the provided Access credentials.

Next, [configure a device posture check](#configure-the-posture-check) to determine if a given posture score constitutes a pass or fail.

### 4. Configure the posture check

<Render file="posture/configure-posture-check" params={{ one: "Custom service provider" }} />

## Device posture attributes

| Selector | Description | Value |
| ------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| Score | Posture score returned by external API | `1` to `100` |
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Service-to-service integrations allow the WARP client to get device posture data

| Device posture check | macOS | Windows | Linux | iOS | Android/ChromeOS |
| ------------------------------------------------------------------------------------------- | ----- | ------- | ----- | --- | ---------------- |
| [Custom service provider](/cloudflare-one/identity/devices/service-providers/custom/) | ✅ | ✅ | ✅ | ✅ | ✅ |
| [Crowdstrike](/cloudflare-one/identity/devices/service-providers/crowdstrike/) | ✅ | ✅ | ✅ | ❌ | ❌ |
| [Kolide](/cloudflare-one/identity/devices/service-providers/kolide/) | ✅ | ✅ | ✅ | ❌ | ❌ |
| [Microsoft Endpoint Manager](/cloudflare-one/identity/devices/service-providers/microsoft/) | ✅ | ✅ | ❌ | ❌ | ❌ |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ import { Render } from "~/components"

### 2. Add Kolide as a service provider

1. In [Zero Trust](https://one.dash.cloudflare.com), go to **Settings** > **WARP Client**.
2. Scroll down to **Device posture providers** and select **Add new**.
3. Select **Kolide**.
4. Enter any name for the provider. This name will be used throughout the dashboard to reference this connection.
<Render file="posture/add-service-provider" params={{ one: "Kolide" }} />
5. Enter the **Client secret** you noted down above.
6. Choose a **Polling frequency** for how often Cloudflare Zero Trust should query Kolide for information.
7. Select **Save**.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ To retrieve those values:

## 2. Add Intune as a service provider

1. Go to **Settings** > **WARP Client**.
2. Scroll down to **Device posture providers** and select **Add new**.
3. Select **Microsoft Endpoint Manager**.
4. Give your provider a name. This name will be used throughout the dashboard to reference this connection.
<Render file="posture/add-service-provider" params={{ one: "Microsoft Endpoint Manager" }} />
5. Enter the **Client ID**, **Client secret** and **Customer ID** as you noted down above.
6. Select a **Polling frequency** for how often Cloudflare Zero Trust should query Microsoft Graph API for information.
7. Select **Save**.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ To retrieve those values:

### 2. Add SentinelOne as a service provider

1. In [Zero Trust](https://one.dash.cloudflare.com), go to **Settings** > **WARP Client**.
2. Scroll down to **Device posture providers** and select **Add new**.
3. Select **SentinelOne**.
4. Enter any name for the provider. This name will be used throughout the dashboard to reference this connection.
<Render file="posture/add-service-provider" params={{ one: "SentinelOne" }} />
5. In **Client Secret**, enter your **API Token**.
6. In **Rest API URL**, enter `https://<S1-DOMAIN>.sentinelone.net`.
7. Choose a **Polling frequency** for how often Cloudflare Zero Trust should query SentinelOne for information.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ To retrieve those values:

### 2. Add Tanium as a service provider

1. In [Zero Trust](https://one.dash.cloudflare.com), go to **Settings** > **WARP Client**.
2. Scroll down to **Device posture providers** and select **Add new**.
3. Select **Tanium**.
4. Enter any name for the provider. This name will be used throughout the dashboard to reference this connection.
<Render file="posture/add-service-provider" params={{ one: "Tanium" }} />
5. Enter the **Client Secret** and **Rest API URL** you noted down above.
6. Choose a **Polling frequency** for how often Cloudflare Zero Trust should query Tanium for information.
7. Select **Save**.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ To obtain these values:

## 2. Add Uptycs as a service provider

1. Go to **Settings** > **WARP Client**.
2. Scroll down to **Device posture providers** and select **Add new**.
3. Select **Uptycs**.
4. Give your provider a name. This name will be used throughout the dashboard to reference this connection.
<Render file="posture/add-service-provider" params={{ one: "Uptycs" }} />
5. Enter the **Client ID**, **Client secret** and **Customer ID** as you noted down above.
6. Select a **Polling frequency** for how often Cloudflare Zero Trust should query Uptycs for information.
7. Select **Save**.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,11 @@ To retrieve those values:

## 2. Add Workspace ONE as a service provider

1. Go to **Settings** > **Devices** > **Device posture providers** and select **Add new**.
2. Select **Workspace ONE**.
3. Give your provider a name. This name will be used throughout the dashboard to reference this connection.
4. Enter the **Client ID** and **Client secret** you noted down above.
5. Select a **Polling frequency** for how often Cloudflare Zero Trust should query Workspace ONE for information.
6. Enter the **Region-specific token URL** and **REST API URL** you noted down above.
7. Select **Save**.
<Render file="posture/add-service-provider" params={{ one: "Workspace ONE" }} />
5. Enter the **Client ID** and **Client secret** you noted down above.
6. Select a **Polling frequency** for how often Cloudflare Zero Trust should query Workspace ONE for information.
7. Enter the **Region-specific token URL** and **REST API URL** you noted down above.
8. Select **Save**.

<Render file="posture/test-posture-provider" />

Expand Down
1 change: 1 addition & 0 deletions src/content/docs/cloudflare-one/tutorials/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ column_param: category
sidebar:
order: 11
head: []
tableOfContents: false
description: View tutorials for Cloudflare Zero Trust.

---
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
inputParameters: param1

---

import { Markdown } from "~/components"

1. In [Zero Trust](https://one.dash.cloudflare.com), go to **Settings** > **WARP Client**.
2. Scroll down to **Third-party service provider integrations** and select **Add new**.
3. Select **{props.one}**.
4. Enter any name for the provider. This name will be used throughout the dashboard to reference this connection.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import { Markdown } from "~/components"
1. In [Zero Trust](https://one.dash.cloudflare.com), go to **Settings** > **WARP Client** > **Service provider checks**.
2. Select **Add new**.
3. Select the {props.one} provider.
4. Configure a [device posture check](#device-posture-attributes) and enter any name.
5. Select **Save**.
4. Enter any name for the posture check.
5. Configure the [attributes](#device-posture-attributes) required for the device to pass the posture check.
6. Select **Save**.
7. To test, go to **Logs** > **Posture** and verify that the service provider posture check is returning the expected results.

Next, go to **Logs** > **Posture** and verify that the service provider posture check is returning the expected results.
You can now use this posture check in a [device posture policy](/cloudflare-one/identity/devices/#3-build-a-device-posture-policy).
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

---

You will see the new provider listed under **Settings** > **WARP Client** > **Device posture providers**. To ensure the values have been entered correctly, select **Test**.
You will see the new provider listed under **Settings** > **WARP Client** > **Third-party service provider integrations**. To ensure the values have been entered correctly, select **Test**.