> ## Documentation Index
> Fetch the complete documentation index at: https://docs.livingsecurity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Zscaler ZIA Cloud NSS 设置

> 通过 Cloud NSS 数据源将 Zscaler Internet Access 的 Web 日志发送至 Living Security。

将 Zscaler Internet Access (ZIA) Cloud Nanolog Streaming Service (NSS) 数据源连接到 Living Security，以发送 Web 日志。这是一种推送式集成，与基于拉取的 [Zscaler Client Connector](/zh-Hans/integrations/catalog/zscaler-client-connector-custom) 集成相互独立。

## 此集成提供的数据

Web 日志数据源可以识别参与 Web 活动的用户和设备，并可提供标准化的活动数据，例如被阻止的请求、恶意目标、数据传输阻止以及生成式 AI 的使用情况。最终结果取决于在 Zscaler 中配置的字段和过滤器。

## 开始之前

您需要具备：

* ZIA Cloud NSS 订阅，以及管理 Cloud NSS 数据源的权限
* 在 Living Security 中管理集成和访问密钥的权限
* 目标 Living Security 组织所在的区域
* 用于存放所生成访问密钥的安全位置

对于 HTTPS Cloud NSS 目标，Zscaler 要求使用公开受信任的 TLS 证书。Living Security 的区域端点满足此要求。

## 1. 准备 Living Security

<Steps>
  <Step title="创建数据源和数据流">
    前往 **设置 → 集成 → 目录**，添加 **Custom Push Source**，并使用以下确切的路由键：

    | 字段 | 值 |
    | - | - |
    | Data Source Name | `zscaler-nss-feed` |
    | Stream Name | `web_logs` |

    `web_logs` 中的下划线是必需的。使用其他组合虽然可以接收数据，但不会使用受维护的 Zscaler NSS 解析器。
  </Step>

  <Step title="创建访问密钥">
    前往 **设置 → Access Keys**，创建范围为 **Push Ingest** 的访问密钥，并立即复制其值。
  </Step>

  <Step title="构建目标 URL">
    使用对应 Living Security 区域的 URL：

    * 美国：`https://api.us-east-1.livingsecurity.ai/api/v1/push-ingest/zscaler-nss-feed/web_logs`
    * 欧盟：`https://api.eu-west-1.livingsecurity.ai/api/v1/push-ingest/zscaler-nss-feed/web_logs`
  </Step>
</Steps>

## 2. 创建 Cloud NSS 数据源

在当前的 ZIA Admin Portal 中，前往 **Logs → Log Streaming → Internet Log Streaming — Nanolog Streaming Service**，打开 **Cloud NSS Feeds**，然后选择 **Add Cloud NSS Feed**。较早版本的 ZIA 门户中菜单标签可能有所不同；门户导航请以 Zscaler 的 [Cloud NSS Web 日志说明](https://help.zscaler.com/zia/adding-cloud-nss-feeds-web-logs)为准。

配置数据源：

| Zscaler 字段 | 值 |
| - | - |
| Feed Name | 易于识别的名称，例如 `Living Security web logs` |
| NSS Type | **NSS for Web** |
| Status | 配置期间为 **Disabled**；验证后再启用 |
| SIEM Rate | **Unlimited**，除非贵组织自身的策略要求较低的速率 |
| SIEM Type | **Other** |
| OAuth 2.0 Authentication | **Disabled** |
| Max Batch Size | **512 KB** |
| API URL | 步骤 1 中对应区域的 Living Security URL |
| HTTP Header 1 | `Authorization` = `Bearer <access-key>` |
| HTTP Header 2 | `Content-Type` = `application/json` |
| Log Type | **Web Log** |
| Feed Output Type | **JSON** |
| JSON Array Notation | **Enabled** |
| Feed Escape Character | `,\"` |

<Warning>
  请勿使用 `x-api-key`，也不要用句点将旧的 API 密钥和密钥密文拼接使用。当前 Living Security 推送接收仅接受通过 `Authorization: Bearer …` 标头传递的限定范围访问密钥。
</Warning>

请在一行中使用以下确切的扁平 **Feed Output Format**：

```text theme={null}
{"datetime":"%d{yy}-%02d{mth}-%02d{dd} %02d{hh}:%02d{mm}:%02d{ss}","reason":"%s{reason}","event_id":"%d{recordid}","protocol":"%s{proto}","action":"%s{action}","transactionsize":"%d{totalsize}","responsesize":"%d{respsize}","requestsize":"%d{reqsize}","urlcategory":"%s{urlcat}","serverip":"%s{sip}","requestmethod":"%s{reqmethod}","refererURL":"%s{ereferer}","useragent":"%s{eua}","product":"NSS","location":"%s{elocation}","ClientIP":"%s{cip}","status":"%s{respcode}","user":"%s{elogin}","url":"%s{eurl}","vendor":"Zscaler","hostname":"%s{ehost}","clientpublicIP":"%s{cintip}","threatcategory":"%s{malwarecat}","threatname":"%s{threatname}","filetype":"%s{filetype}","appname":"%s{appname}","riskscore":"%d{riskscore}","department":"%s{edepartment}","urlsupercategory":"%s{urlsupercat}","appclass":"%s{appclass}","dlpengine":"%s{dlpeng}","urlclass":"%s{urlclass}","threatclass":"%s{malwareclass}","dlpdictionaries":"%s{dlpdict}","fileclass":"%s{fileclass}","bwthrottle":"%s{bwthrottle}","contenttype":"%s{contenttype}","unscannabletype":"%s{unscannabletype}","deviceowner":"%s{deviceowner}","devicehostname":"%s{devicehostname}","keyprotectiontype":"%s{keyprotectiontype}"}
```

<Warning>
  请将所有字段保持在顶层。已停用的 Unify 指南曾将这些字段包裹在 `event` 对象中，并添加了 `sourcetype`。该封装结构可能会被作为 JSON 接受，但与当前解析器不匹配，因此不会产生任何人员或活动数据。
</Warning>

请选择运营团队在查看 Zscaler 事件时所期望的时区。Living Security 会解析数据源提供的 `datetime` 值。

## 3. 过滤并启用数据源

使用 Zscaler 的 **Policy Action** 和 **Policy Reason** 过滤器，发送贵组织人员风险计划所需的 Web 活动。请避免设置过低的每秒事件数，否则在流量高峰期间可能会丢弃日志。如果贵组织必须限制数据源的速率，请在调优期间同时监控 Zscaler 的投递情况和 Living Security 的 Push History。

保存数据源，运行 Zscaler 的连通性测试，然后将 **Status** 设置为 **Enabled**。

## 4. 验证投递与解析

1. 在 Living Security 中，打开 **设置 → 集成 → 已连接 → zscaler-nss-feed**。
2. 在 **Push History** 中，确认最近一次 `web_logs` 运行显示了预期的记录数。
3. 确认最近的 Zscaler 用户或设备 IP 已对应到预期的人员，并且下游可获取 Web 活动。
4. 如果运行已被接受但没有出现任何活动，请重新检查确切的数据源、数据流以及扁平输出格式。

## 故障排查

| 症状 | 检查项 |
| - | - |
| `401 Unauthorized` | 使用 `Authorization`，值为 `Bearer <access-key>`；轮换已过期或已撤销的密钥 |
| `403 Forbidden` | 创建范围为 **Push Ingest** 的密钥 |
| `404 Not Found` | 注册 `zscaler-nss-feed` 和 `web_logs`，然后使用该确切的 URL |
| `400 Bad Request` | 启用 JSON Array Notation，并确认输出为由扁平对象组成的顶层数组 |
| `202` 但没有人员或活动数据 | 移除旧版 `sourcetype` / `event` 封装，并核实确切的路由键 |
| `429` | 暂缓发送以应对临时的 IP 级限流，并在存在 `Retry-After` 时予以遵循 |
| `503` | 保留该批次以便重试，等待 `Retry-After` 后原样重新发送 |
| 连通性测试失败 | 检查区域主机名、Bearer 标头、密钥状态以及公共 TLS 检查策略 |

该 API 每个请求最多接受 10,000 条记录和 10 MB 数据，每个组织每 60 秒最多 600 个请求。有关完整的响应和重试约定，请参阅 [Custom Push Source API](/zh-Hans/integrations/custom-push-source)。

## 相关内容

<CardGroup cols={2}>
  <Card title="Custom Push Source API" icon="arrow-up-from-bracket" href="/zh-Hans/integrations/custom-push-source">
    查看身份验证、负载限制、响应、重试以及运行验证。
  </Card>

  <Card title="Zscaler Client Connector" icon="laptop" href="/zh-Hans/integrations/catalog/zscaler-client-connector-custom">
    连接独立的 Client Connector API，以获取设备和安全状况数据。
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.