<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Get policy API sophos &#8211; Thegioifirewall</title>
	<atom:link href="https://thegioifirewall.com/tag/get-policy-api-sophos/feed/" rel="self" type="application/rss+xml" />
	<link>https://thegioifirewall.com</link>
	<description>Tường lửa bảo vệ doanh nghiệp, trung tâm thông tin và giá cả</description>
	<lastBuildDate>Sun, 11 Sep 2022 14:10:10 +0000</lastBuildDate>
	<language>vi</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://thegioifirewall.com/wp-content/uploads/vacif_icon-150x150.png</url>
	<title>Get policy API sophos &#8211; Thegioifirewall</title>
	<link>https://thegioifirewall.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Sophos Central API: Hướng dẫn lấy các thông tin Policy trên Sophos Central sử dụng API.</title>
		<link>https://thegioifirewall.com/sophos-central-api-huong-dan-lay-cac-thong-tin-policy-tren-sophos-central-su-dung-api/</link>
					<comments>https://thegioifirewall.com/sophos-central-api-huong-dan-lay-cac-thong-tin-policy-tren-sophos-central-su-dung-api/#respond</comments>
		
		<dc:creator><![CDATA[John]]></dc:creator>
		<pubDate>Sun, 11 Sep 2022 14:05:10 +0000</pubDate>
				<category><![CDATA[Sophos Central APIs]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Get policy API sophos]]></category>
		<category><![CDATA[Sophos Central API]]></category>
		<guid isPermaLink="false">https://www.thegioifirewall.com/?p=16917</guid>

					<description><![CDATA[1.Overview Với Endpoint API sẽ cho phép quản lý chính sách cho một tenant tại một thời điểm. Nếu bạn là khách hàng của Sophos, bạn có thể sử dụng tenant API credentials của mình để gọi API. Partners có thể sử dụng API credentials của riêng họ để quản lý các chính sách dành [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>1.Overview</strong></p>



<p class="wp-block-paragraph">Với Endpoint API sẽ cho phép quản lý chính sách cho một tenant tại một thời điểm. Nếu bạn là khách hàng của Sophos, bạn có thể sử dụng tenant API credentials của mình để gọi API. Partners có thể sử dụng API credentials của riêng họ để quản lý các chính sách dành cho tenant đã bật Partner assistance. Khách hàng doanh nghiệp có thể sử dụng API credential của riêng họ để quản lý các chính sách dành cho tenants (sub-estates) đã cho phép quản lý Enterprise Admin.</p>



<p class="wp-block-paragraph">Bài viết hôm nay sẽ hướng dẫn các bạn cách quản lý và lấy thông các chính sách Endpoint Protection, Server Protection và Device Encryption bằng Endpoint API.</p>



<p class="wp-block-paragraph"><strong>2. Hướng dẫn.</strong></p>



<p class="wp-block-paragraph">Trước khi đi vào hướng dẫn bạn cần có các thông tin về tenant (Sophos Central) của mình để có thể thực hiện gọi các API, bạn có thể tham khảo link bài viết sau: <a href="https://www.thegioifirewall.com/sophos-central-apis-huong-dan-cau-hinh-api-credentials-mangement-tren-sophos-central/">https://www.thegioifirewall.com/sophos-central-apis-huong-dan-cau-hinh-api-credentials-mangement-tren-sophos-central/</a></p>



<p class="wp-block-paragraph"><strong>2.1 Get List Policy trên Tenant.</strong></p>



<p class="wp-block-paragraph">Bên dưới là dòng lệnh dùng để lấy thông tin về policy đã cấu hình cho endpoint có trên Sophos Central.</p>



<p class="wp-block-paragraph">Curl.exe -XGET -H &#8220;Authorization: Bearer &lt;jwt&gt;&#8221; -H &#8220;X-Tenant-ID: &lt;tenant-id&gt;&#8221; &lt;data-region&gt;/&lt;path&gt;</p>



<p class="wp-block-paragraph">Bạn thực hiện chỉnh sửa câu lệnh như sau:</p>



<p class="wp-block-paragraph"><strong>&lt;jwt&gt;:</strong> copy và paste access_token.</p>



<p class="wp-block-paragraph"><strong>&lt;tenant-id&gt;:</strong> copy và paste tenant id</p>



<p class="wp-block-paragraph"><strong>&lt;data-region&gt;</strong>: điền link https://&#8230;</p>



<p class="wp-block-paragraph"><strong>&lt;path&gt;:</strong> điền /endpoint/v1/policies</p>



<p class="wp-block-paragraph">Sau khi đã chỉnh sửa, mở CMD trên endpoint, copy và paste dòng lệnh. Nhấn Enter. Thông tin xuất ra sẽ hiển thị như hình dưới. </p>



<p class="wp-block-paragraph">Các policy được lấy ra này sẽ bao gồm các policy trong Endpoint Protection, Server Protection và Device Encryption</p>



<p class="wp-block-paragraph">Để dễ dàng trong việc kiểm tra kết quả, bạn copy từ dòng <strong>{“items”:…cho đến cuối</strong>. Paste vô <strong>Visual Studio Code.</strong></p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img fetchpriority="high" decoding="async" width="671" height="354" src="https://thegioifirewall.com/wp-content/uploads/image-4961.png" alt="" class="wp-image-16926" srcset="https://thegioifirewall.com/wp-content/uploads/image-4961.png 671w, https://thegioifirewall.com/wp-content/uploads/image-4961-300x158.png 300w" sizes="(max-width: 671px) 100vw, 671px" /></figure>
</div>


<p class="wp-block-paragraph">Trong giao diện <strong>Visual Studio Code</strong>, click chuột phải, chọn <strong>Fomat Document</strong>. Để chỉnh sửa thông tin từ dạng text ra dạng dòng lệnh sẽ dễ dàng cho việc kiểm tra.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="772" height="206" src="https://thegioifirewall.com/wp-content/uploads/image-4962.png" alt="" class="wp-image-16927" srcset="https://thegioifirewall.com/wp-content/uploads/image-4962.png 772w, https://thegioifirewall.com/wp-content/uploads/image-4962-300x80.png 300w, https://thegioifirewall.com/wp-content/uploads/image-4962-768x205.png 768w" sizes="(max-width: 772px) 100vw, 772px" /></figure>
</div>


<p class="wp-block-paragraph">Sau khi đã chuyển đổi xong. Thông tin sẽ được hiển thị như hình dưới.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="626" height="390" src="https://thegioifirewall.com/wp-content/uploads/image-4957.png" alt="" class="wp-image-16922" srcset="https://thegioifirewall.com/wp-content/uploads/image-4957.png 626w, https://thegioifirewall.com/wp-content/uploads/image-4957-300x187.png 300w" sizes="(max-width: 626px) 100vw, 626px" /></figure>
</div>


<p class="wp-block-paragraph">Bạn có thể kiểm tra cấu hình của các policy. <strong>Ví dụ: web-control</strong></p>



<p class="wp-block-paragraph"><strong>ID:</strong> Đây là policy ID cho <strong>web-control</strong>. Bạn nên lưu lại policy ID này của các policy để có thể sử dụng cho các lệnh API sau mà không cần lấy lại.</p>



<p class="wp-block-paragraph"><strong>Name:</strong> “<strong>block web</strong>”: Tên policy được tạo trong web control</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="627" height="277" src="https://thegioifirewall.com/wp-content/uploads/image-4958.png" alt="" class="wp-image-16923" srcset="https://thegioifirewall.com/wp-content/uploads/image-4958.png 627w, https://thegioifirewall.com/wp-content/uploads/image-4958-300x133.png 300w" sizes="auto, (max-width: 627px) 100vw, 627px" /></figure>
</div>


<p class="wp-block-paragraph">Bạn kéo xuống phần “<strong>Endpoint.web-control.tag.settings”</strong>:</p>



<p class="wp-block-paragraph">+ <strong>“tag”</strong>: các trang web được gắn cho policy</p>



<p class="wp-block-paragraph">+ <strong>“action”: </strong>Block: Các trang web ở trên sẽ bị block khi user truy cập.</p>



<p class="wp-block-paragraph">+ <strong>“appliesTo”</strong>: user: Policy đang được apply cho 1 user.</p>



<p class="wp-block-paragraph">+ <strong>“createdAt”:</strong> Thời gian tạo policy.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="575" height="554" src="https://thegioifirewall.com/wp-content/uploads/image-4959.png" alt="" class="wp-image-16924" srcset="https://thegioifirewall.com/wp-content/uploads/image-4959.png 575w, https://thegioifirewall.com/wp-content/uploads/image-4959-300x289.png 300w" sizes="auto, (max-width: 575px) 100vw, 575px" /></figure>
</div>


<p class="wp-block-paragraph"><strong>2.2 Get single policy</strong></p>



<p class="wp-block-paragraph">Để gọi API lấy thông tin về 1 policy cụ thể mà không phải toàn bộ policy. Bạn chỉnh sửa lệnh API sau:</p>



<p class="wp-block-paragraph">Curl.exe -XGET -H &#8220;Authorization: Bearer &lt;jwt&gt;&#8221; -H &#8220;X-Tenant-ID: &lt;tenant-id&gt;&#8221; &lt;data-region&gt;/&lt;path&gt;</p>



<p class="wp-block-paragraph"><strong>&lt;jwt&gt;:</strong> paste dãy access_token</p>



<p class="wp-block-paragraph"><strong>&lt;tenant-id&gt;:</strong> Paste tenant –id</p>



<p class="wp-block-paragraph"><strong>&lt;data-region&gt;:</strong> Paste link https://&#8230;</p>



<p class="wp-block-paragraph"><strong>&lt;path&gt;:</strong> Điền “endpoint/v1/policies/<strong>&lt;policy ID&gt;</strong></p>



<p class="wp-block-paragraph">Ví dụ: <strong>Policy-ID</strong> của <strong>Peripheral-control</strong>:</p>



<p class="wp-block-paragraph"><strong>&#8220;id&#8221;: &#8220;30c7d8ec-d300-4402-b145-10e4f6e38d27&#8221;</strong>.</p>



<p class="wp-block-paragraph">Copy lệnh API đã chỉnh sửa, paste lên CMD của endpoint.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="802" height="417" src="https://thegioifirewall.com/wp-content/uploads/image-4963.png" alt="" class="wp-image-16928" srcset="https://thegioifirewall.com/wp-content/uploads/image-4963.png 802w, https://thegioifirewall.com/wp-content/uploads/image-4963-300x156.png 300w, https://thegioifirewall.com/wp-content/uploads/image-4963-768x399.png 768w" sizes="auto, (max-width: 802px) 100vw, 802px" /></figure>
</div>


<p class="wp-block-paragraph">Bạn copy kết quả paste vào Visual Studio Code, chỉnh sửa định dạng text dang định dạng code, bạn sẽ có kết quả lệnh API như bên dưới.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="630" height="382" src="https://thegioifirewall.com/wp-content/uploads/image-4964.png" alt="" class="wp-image-16929" srcset="https://thegioifirewall.com/wp-content/uploads/image-4964.png 630w, https://thegioifirewall.com/wp-content/uploads/image-4964-300x182.png 300w" sizes="auto, (max-width: 630px) 100vw, 630px" /></figure>
</div>


<p class="wp-block-paragraph">Bạn có thể kiểm tra một số setting như: </p>



<p class="wp-block-paragraph">Cấu hình &#8220;<strong>removable storage</strong>&#8221; với setting là &#8220;<strong>ReadOnly</strong>&#8220;. </p>



<p class="wp-block-paragraph">endpoint.peripheral-control.actions.removable-storage&#8221;: {</p>



<p class="wp-block-paragraph">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8220;value&#8221;: &#8220;readOnly&#8221;</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="628" height="306" src="https://thegioifirewall.com/wp-content/uploads/image-4965.png" alt="" class="wp-image-16930" srcset="https://thegioifirewall.com/wp-content/uploads/image-4965.png 628w, https://thegioifirewall.com/wp-content/uploads/image-4965-300x146.png 300w" sizes="auto, (max-width: 628px) 100vw, 628px" /></figure>
</div>


<p class="wp-block-paragraph">Các <strong>Peripheral-ID</strong> được set <strong>Allow </strong>để sử dụng.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="630" height="227" src="https://thegioifirewall.com/wp-content/uploads/image-4966.png" alt="" class="wp-image-16931" srcset="https://thegioifirewall.com/wp-content/uploads/image-4966.png 630w, https://thegioifirewall.com/wp-content/uploads/image-4966-300x108.png 300w" sizes="auto, (max-width: 630px) 100vw, 630px" /></figure>
</div>


<p class="wp-block-paragraph">Policy này được apply cho 1 endpoint.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="629" height="207" src="https://thegioifirewall.com/wp-content/uploads/image-4967.png" alt="" class="wp-image-16932" srcset="https://thegioifirewall.com/wp-content/uploads/image-4967.png 629w, https://thegioifirewall.com/wp-content/uploads/image-4967-300x99.png 300w" sizes="auto, (max-width: 629px) 100vw, 629px" /></figure>
</div>


<p class="wp-block-paragraph"><strong>2.3 Get Setting Policy.</strong></p>



<p class="wp-block-paragraph">Để gọi API lấy thông tin về setting của 1 policy cụ thể mà không phải toàn bộ policy. Bạn chỉnh sửa lệnh API sau:</p>



<p class="wp-block-paragraph">Curl.exe -XGET -H &#8220;Authorization: Bearer &lt;jwt&gt;&#8221; -H &#8220;X-Tenant-ID: &lt;tenant-id&gt;&#8221; &lt;data-region&gt;/&lt;path&gt;</p>



<p class="wp-block-paragraph"><strong>&lt;jwt&gt;:</strong> paste dãy access_token</p>



<p class="wp-block-paragraph"><strong>&lt;tenant-id&gt;:</strong> Paste tenant –id</p>



<p class="wp-block-paragraph"><strong>&lt;data-region&gt;:</strong> Paste link https://&#8230;</p>



<p class="wp-block-paragraph"><strong>&lt;path&gt;:</strong> Điền “endpoint/v1/policies/<strong>&lt;policy ID&gt;/settings</strong></p>



<p class="wp-block-paragraph"><strong>Ví dụ:</strong> Bạn chỉ muốn xem settings của policy &#8220;<strong>block web</strong>&#8220;.</p>



<p class="wp-block-paragraph"><strong>Policy-id</strong>&#8220;: &#8220;<strong>87e9f5d9-52a5-45ee-b51a-a55810b995b7</strong>&#8220;,</p>



<p class="wp-block-paragraph">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8220;name&#8221;: &#8220;block web&#8221;,</p>



<p class="wp-block-paragraph">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8220;type&#8221;: &#8220;web-control&#8221;.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="624" height="325" src="https://thegioifirewall.com/wp-content/uploads/image-4968.png" alt="" class="wp-image-16933" srcset="https://thegioifirewall.com/wp-content/uploads/image-4968.png 624w, https://thegioifirewall.com/wp-content/uploads/image-4968-300x156.png 300w" sizes="auto, (max-width: 624px) 100vw, 624px" /></figure>
</div>


<p class="wp-block-paragraph">Kết quả sẽ chỉ xuất ra các setting của policy id &#8220;<strong>block web</strong>&#8220;.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="462" height="463" src="https://thegioifirewall.com/wp-content/uploads/image-4970.png" alt="" class="wp-image-16935" srcset="https://thegioifirewall.com/wp-content/uploads/image-4970.png 462w, https://thegioifirewall.com/wp-content/uploads/image-4970-300x300.png 300w, https://thegioifirewall.com/wp-content/uploads/image-4970-150x150.png 150w" sizes="auto, (max-width: 462px) 100vw, 462px" /></figure>
</div>


<p class="wp-block-paragraph"><strong>2.4 Get Setting Key.</strong></p>



<p class="wp-block-paragraph"><strong>Setting Key</strong>: Thể hiện 1 trong các setting có trong 1 policy được cấu hình.</p>



<p class="wp-block-paragraph">Để gọi API lấy thông tin về 1 setting cụ thể của 1 policy nào đó mà không phải toàn bộ policy. Bạn chỉnh sửa lệnh API sau:</p>



<p class="wp-block-paragraph">Curl.exe -XGET -H &#8220;Authorization: Bearer &lt;jwt&gt;&#8221; -H &#8220;X-Tenant-ID: &lt;tenant-id&gt;&#8221; &lt;data-region&gt;/&lt;path&gt;</p>



<p class="wp-block-paragraph"><strong>&lt;jwt&gt;:</strong> paste dãy access_token</p>



<p class="wp-block-paragraph"><strong>&lt;tenant-id&gt;:</strong> Paste tenant –id</p>



<p class="wp-block-paragraph"><strong>&lt;data-region&gt;:</strong> Paste link https://&#8230;</p>



<p class="wp-block-paragraph"><strong>&lt;path&gt;:</strong> Điền “endpoint/v1/policies/<strong>&lt;policy ID&gt;/settings/&lt;SettingKey&gt;</strong>.</p>



<p class="wp-block-paragraph"><strong>Ví dụ:</strong> Bạn chỉ muốn xem 1 settings của policy &#8220;<strong>block web</strong>&#8221; trong <strong>web-control.</strong></p>



<p class="wp-block-paragraph"><strong>Ex settingkey: endpoint.web-control.tags.settings</strong>.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="625" height="328" src="https://thegioifirewall.com/wp-content/uploads/image-4974.png" alt="" class="wp-image-16939" srcset="https://thegioifirewall.com/wp-content/uploads/image-4974.png 625w, https://thegioifirewall.com/wp-content/uploads/image-4974-300x157.png 300w" sizes="auto, (max-width: 625px) 100vw, 625px" /></figure>
</div>


<p class="wp-block-paragraph">Kết quả.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="394" height="307" src="https://thegioifirewall.com/wp-content/uploads/image-4975.png" alt="" class="wp-image-16940" srcset="https://thegioifirewall.com/wp-content/uploads/image-4975.png 394w, https://thegioifirewall.com/wp-content/uploads/image-4975-300x234.png 300w" sizes="auto, (max-width: 394px) 100vw, 394px" /></figure>
</div>]]></content:encoded>
					
					<wfw:commentRss>https://thegioifirewall.com/sophos-central-api-huong-dan-lay-cac-thong-tin-policy-tren-sophos-central-su-dung-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
