Bước 2 : WARP and device posture

Enroll a user with a WARP client

Why

  • Để kiểm soát quyền truy cập vào các tài nguyên của bạn, Cloudflare Access cần xác minh danh tính của người dùng yêu cầu truy cập.

  • Tuy nhiên, Cloudflare Access không trực tiếp quản lý các tài khoản người dùng, mà dựa vào các Nhà cung cấp danh tính (IdPs) để làm điều đó.

  • Bằng cách tích hợp Access với một hoặc nhiều IdP, bạn có thể cung cấp danh sách người dùng được ủy quyền để Access tiến hành xác minh.

Steps

1. Configure enrollment policy for WARP

First, let’s define who can connect devices to your organization.

  • In your Zero Trust dashboardarrow-up-right, navigate to Settings ‣ WARP Client ‣ Device enrollment permissions ‣ Manage ‣ Add a rule

  • When the rule wizard appears, create a new ruleset, with Rule action Allow, and choose the Emails or Emails ending in selector

  • Set the Value field to your admin's SAML email: [email protected]

  • Once rule is created, Save your policy.

2. Test your connection to the WARP device client

On your lab Win11 VM, open the preinstalled WARP client and select Preferences:

Then Account ‣ Login to Cloudflare Zero Trust:

Use your LAB_SLUG when asked for a team name:

Click on Sign in with: SAML and log in as [email protected] with password #Savetheinternet.

ℹ️ Do not use the login code via email since you can't access inbox of the SAML user ([email protected]envelope).

Once you are authenticated, click on the big grey button in the WARP client to connect to Cloudflare's network.

Once connected, your Zero Trust WARP client should turn blue:

3. Create a device posture rule

Tiếp theo, chúng ta sẽ sử dụng WARP để củng cố trạng thái thiết bị ( device posture ) của mình. Bạn có thể cấu hình các Zero Trust policies dựa trên các tín hiệu bổ sung từ WARP client hoặc from third-party endpoint security providers. Khi device posture checks được cấu hình, người dùng chỉ có thể kết nối với ứng dụng hoặc tài nguyên mạng được bảo vệ nếu họ sử dụng thiết bị tuân thủ và an toàn.

Các bài kiểm tra WARP trên máy khách được chia thành hai loại:

  • Signals provided thông qua tích hợp với popular endpoint security providers như CrowdStrike và Tanium

  • Thực thi trực tiếp/tự nhiên các thuộc tính thiết bị trên máy khách

Let’s create a device posture rule that checks if Notepad is running:

  1. In your Windows 11 VM, open the Notepad application

  2. Type powershell in the Windows search bar

  3. Select Run as administrator

Paste this command in PowerShell:

The output will look something like this: C:/Program Files/WindowsApps/Microsoft.WindowsNotepad_xxxx_x64__xxxxxx/Notepad/Notepad.exe

ℹ️ If you are getting an error with the above command and no path is returned, restart Windows and try again.

Copy this full path.

Next, return to the Zero Trust dashboard. Go to Settings ‣ WARP Client

  1. Scroll down to Device posture and under WARP client checks select Add new:

  1. Select Application Check

  2. You will be prompted for the following information:

Name: Notepad check

Operating system: Windows

Application path: <paste in the path you got from PowerShell>

  1. Save your changes.

4. Observe how WARP enforces device posture

Cloudflare polls the WARP client every 5 minutes to ensure the device posture requirements are met. If the client isn’t adhering to the device posture rules, authorization can be revoked.

You can see how Cloudflare evaluates current status of a specific device in the dashboard under My Team ‣ Devices.

When Notepad is running, you should see the posture check as PASSED:

When you stop the Notepad, the posture check will change to FAILED in a few minutes (if it doesn't, double check in Task Manager that the notepad process isn't still running on the background):

You can also see the history of posture activity of your whole team at Logs ‣ Posture.

5.Gather WARP logs

Before continuing in the Zero Trust dashboard, review some troubleshooting features of the WARP client.

A vital aspect of troubleshooting WARP client issues is knowing how to guide a user to retrieve network logs - referred to as warp-diag output.

If you need to escalate WARP client issues to Cloudflare Support, warp-diag output will be required!

  1. Navigate to Program Files ‣ Cloudflare ‣ Cloudflare WARP

  2. Double click on the warp-diag file

  3. A terminal window will appear for a 5-60 seconds, then the warp-diag output will appear on the desktop in zip format

The steps to create WARP client logs for other operating systems are available here: How do I retrieve WARP Client Logs

6. Quick WARP support challenge

The WARP client will try to run some connection tests.

  • The first is outside the WARP Tunnel to engage.cloudflareclient.com

  • The second will be internal, through the WARP Tunnel to connectivity.cloudflareclient.com

Can you open the warp-diag zip folder and identify the two connection tests?

Try to do this yourself, before proceeding below to the solution.


Solution

When you open the warp-diag folder you will see it contains several log and configuration files.

Some log files contain multiple iterations with a new number at the end:

When warp-diag runs it breaks down longer time based logs into current day and previous days:

  • daemon.log ← The most current log. Todays events from the perspective of when warp-diag was run

  • daemon1.log ← Today -1 (aka yesterdays) events from the perspective of when warp-diag was run

The most useful is the daemon.log, it reads from the bottom upwards, the bottom most line is the most recent log entry.

Look for the most recent Initiate WARP Connection from when you started having issues:

The WARP client will try to run some connection tests:

  • The first is outside the WARP Tunnel to engage.cloudflareclient.com, it will show as warp/gateway=off

  • The second will be internal, through the WARP Tunnel to connectivity.cloudflareclient.com, it will show as warp/gateway=on

If the outside connection test fails, this is usually a problem with your internet connectivity.

If the internal connection test fails, check if there are any Network or HTTP policies that could be blocking the test before escalating to Cloudflare Support.


Enroll a user with a Warp client but use posture device rule which required OS version

Steps

I use method One-time Pin for my authenication:

3. Create a device posture rule

Next, return to the Zero Trust dashboard. Go to Settings ‣ WARP Client

  1. Scroll down to Device posture and under WARP client checks select Add new:

  1. Select OS Version Check

  2. You will be prompted for the following information:

  1. Save your changes.

Check Zero Trust app turn on :


Device Posture

Device posture trong bối cảnh của Cloudflare Zero Trust là một cách để kiểm tra tình trạng hoặc cấu hình của thiết bị người dùng trước khi cho phép truy cập vào một ứng dụng hoặc tài nguyên mạng được bảo vệ.

Các loại kiểm tra tình trạng thiết bị (device posture checks):

  • WARP client checks:

    • Các kiểm tra này được thực hiện bởi Cloudflare WARP client, một ứng dụng bảo mật của Cloudflare có thể cung cấp thông tin về trạng thái của thiết bị như địa chỉ IP, kết nối mạng, và các thuộc tính an ninh khác.

    • Nếu WARP client phát hiện thiết bị không đủ điều kiện (ví dụ: không kết nối hoặc không tuân thủ chính sách bảo mật), người dùng sẽ không thể truy cập tài nguyên được bảo vệ.

  • Service-to-service checks:

    • Được thực hiện bởi các nhà cung cấp thiết bị posture của bên thứ ba, các kiểm tra này cho phép sử dụng thông tin từ các phần mềm bảo mật khác đã cài đặt trên thiết bị để đánh giá tính an toàn của thiết bị.

    • Ví dụ, nếu một phần mềm bảo mật của bên thứ ba phát hiện thiết bị bị nhiễm phần mềm độc hại hoặc không tuân thủ chính sách bảo mật, nó sẽ báo cáo lại và từ chối quyền truy cập.

  • Access integration checks:

    • Các kiểm tra này chỉ được cấu hình cho các ứng dụng sử dụng Cloudflare Access. Những thuộc tính này cho phép xác định các yêu cầu bảo mật cụ thể mà thiết bị phải đáp ứng để truy cập vào ứng dụng.

    • Access integration checks không thể sử dụng trong các chính sách của Cloudflare Gateway, vì Gateway yêu cầu các tiêu chí bảo mật khác.

Last updated