收集 Akamai Enterprise Application Access 記錄
剖析器版本:3.0
本文說明如何使用 Akamai Unified Log Streamer (ULS) 和 Bindplane,將 Akamai Enterprise Application Access (EAA) 記錄擷取至 Google Security Operations。Akamai EAA 是一種零信任網路存取解決方案,可提供企業應用程式的安全存取權,並根據身分識別進行存取控管,不必使用傳統 VPN。EAA 會產生作業資料,包括存取記錄、管理員稽核記錄、連接器健康狀態指標、裝置清單和目錄健康狀態資訊。剖析器會從 JSON 記錄擷取欄位、執行資料轉換 (例如字串轉換和 IP 位址擷取),並將這些欄位對應至 UDM,根據特定欄位是否存在,處理各種事件類型,包括 NETWORK_HTTP 和 USER_UNCATEGORIZED。
事前準備
請確認您符合下列必要條件:
- Google SecOps 執行個體。
- Windows Server 2016 以上版本或 Linux 主機,並安裝
systemd,以便執行 Bindplane 代理程式。 - 搭載 Python 3.9 以上版本的 Linux 主機,或容器化環境 (Docker 或 Kubernetes),用於執行 Unified Log Streamer。
- 如果透過 Proxy 執行,請確保防火牆通訊埠已根據 Bindplane 代理程式需求開啟。
- 具備管理員存取權的 Akamai EAA 租戶。
Akamai API 憑證:
- 如要存取及管理稽核動態消息:EAA 舊版 API 金鑰和密鑰 (在企業中心建立)。
- 如要取得連接器健康狀態、裝置清單和目錄健康狀態動態消息,請提供 Akamai OPEN API 憑證 (EdgeGrid 驗證),並具備 Enterprise Application Access API 的讀取/寫入權限。
取得 Bindplane 代理程式的 Google SecOps 憑證
如要向 Google SecOps 驗證 Bindplane 代理程式,請選擇下列其中一種方法:
- 新部署作業:使用 Chronicle API (選項 1)。
- 舊版部署作業:在 2027 年 7 月 20 日停用 Ingestion API 前,請繼續使用擷取驗證檔案 (選項 2)。
方法 1:為 Chronicle API 建立服務帳戶 (建議)
- 登入 Google Cloud 控制台,然後選取連結至 Google SecOps 執行個體的 Google Cloud 專案。
- 依序前往「IAM & Admin」(IAM 與管理) >「Service Accounts」(服務帳戶)。
- 按一下「建立服務帳戶」。
- 提供下列設定詳細資料:
- 「Service account name」(服務帳戶名稱):輸入帳戶名稱 (例如
bindplane-ingest)。 - 服務帳戶說明:輸入說明 (例如
Bindplane agent log ingestion)。
- 「Service account name」(服務帳戶名稱):輸入帳戶名稱 (例如
- 點按「Create and continue」(建立並繼續)。
- 在「將專案存取權授予這個服務帳戶」部分,按一下「選取角色」,然後選取「Chronicle 編輯者」。
- 依序點選「繼續」和「完成」。
- 按一下您建立的服務帳戶,然後前往「金鑰」分頁。
- 依序點選「新增金鑰」>「建立新的金鑰」。
- 選取「JSON」,然後點選「建立」。金鑰檔案會下載到電腦。
- 將金鑰檔案儲存為 Bindplane 收集器目錄中的
ingestion-auth.json(Linux 為/opt/observiq-otel-collector/ingestion-auth.json,Windows 為C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json),或更新config.yaml中的creds_file_path,使其與儲存檔案的路徑相符。 - 依序前往「IAM & Admin」(IAM 與管理) >「Settings」(設定),然後複製「Project number」(專案編號)。設定匯出工具時會用到。
方法 2:下載擷取驗證檔案 (舊版)
- 登入 Google SecOps 控制台。
- 依序前往「SIEM Settings」 > 「Collection Agents」。
- 下載擷取驗證檔案。
- 將檔案安全地儲存在要安裝 Bindplane 代理程式的系統上。
取得 Google SecOps 客戶 ID
- 登入 Google SecOps 控制台。
- 依序前往「SIEM 設定」>「設定檔」。
- 複製並儲存「機構詳細資料」部分的客戶 ID。
安裝 Bindplane 代理程式
請按照下列操作說明,在 Windows 或 Linux 作業系統上安裝 Bindplane 代理程式。
Windows 安裝
- 以管理員身分開啟「命令提示字元」或「PowerShell」。
執行下列指令:
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
Linux 安裝
- 開啟具有根層級或 sudo 權限的終端機。
執行下列指令:
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
其他安裝資源
如需其他安裝選項,請參閱 Bindplane 代理程式安裝指南。
設定 Bindplane 代理程式,擷取記錄並傳送至 Google SecOps
在文字編輯器中開啟 Bindplane 代理程式設定檔:
Linux:
sudo nano /opt/observiq-otel-collector/config.yamlWindows:
notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"按照下列方式編輯
config.yaml檔案:receivers: tcplog: listen_address: "0.0.0.0:5140" exporters: chronicle/akamai_eaa: protocol: https # Region of your instance, for example us, europe, asia-southeast1 location: <LOCATION> # Project number of the Google Cloud project linked to the instance project: '<PROJECT_NUMBER>' compression: gzip creds_file_path: '/path/to/ingestion-authentication-file.json' customer_id: '<CUSTOMER_ID>' endpoint: chronicle.googleapis.com log_type: 'AKAMAI_EAA' raw_log_field: body ingestion_labels: source: akamai_eaa service: pipelines: logs/akamai_eaa: receivers: - tcplog exporters: - chronicle/akamai_eaa
更改下列內容:
/path/to/ingestion-authentication-file.json:服務帳戶 JSON 金鑰檔案的完整路徑 (選項 1)。- Linux:
/opt/observiq-otel-collector/ingestion-auth.json - Windows:
C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
- Linux:
- 將
<LOCATION>替換為 Google SecOps 執行個體的區域 (例如us、europe或asia-southeast1)。匯出工具會以這個值做為chronicle.googleapis.com的前置字元。 - 將
<PROJECT_NUMBER>替換為「IAM 與管理」>「設定」中的專案編號。 <CUSTOMER_ID>:Google SecOps 客戶 ID。0.0.0.0:5140:Bindplane 要監聽的 IP 位址和通訊埠。請視環境需要進行調整。
舊版 Ingestion API 匯出工具
如果您使用選項 2 的擷取驗證檔案,請將
exporters區塊替換為下列內容。將creds_file_path設為擷取驗證檔案的路徑。如果執行個體位於美國境外,請將malachiteingestion-pa.googleapis.com替換為區域端點 (例如europe-malachiteingestion-pa.googleapis.com)。exporters: chronicle/akamai_eaa: compression: gzip creds_file_path: '/path/to/ingestion-authentication-file.json' customer_id: '<CUSTOMER_ID>' endpoint: malachiteingestion-pa.googleapis.com log_type: 'AKAMAI_EAA' raw_log_field: body ingestion_labels: source: akamai_eaa
重新啟動 Bindplane 代理程式,套用變更
如要在 Linux 中重新啟動 Bindplane 代理程式,請按照下列步驟操作:
執行下列指令:
sudo systemctl restart observiq-otel-collector確認服務是否正在執行:
sudo systemctl status observiq-otel-collector檢查記錄是否有錯誤:
sudo journalctl -u observiq-otel-collector -f
如要在 Windows 重新啟動 Bindplane 代理程式,請按照下列步驟操作:
您可以選擇下列其中一個選項:
- 以管理員身分開啟命令提示字元或 PowerShell:
net stop observiq-otel-collector && net start observiq-otel-collector- 服務控制台:
- 按下
Win+R,輸入services.msc,然後按下 Enter 鍵。 - 找出「observIQ OpenTelemetry Collector」。
- 按一下滑鼠右鍵,然後選取「重新啟動」。
- 按下
確認服務正在執行:
sc query observiq-otel-collector查看記錄檔是否有錯誤:
type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
建立 Akamai API 憑證
Akamai EAA 會根據動態饋給類型,使用兩種 API 憑證。建立與要收集的動態饋給相對應的憑證。
建立 EAA 舊版 API 憑證 (用於存取和管理動態饋給)
- 登入 Akamai 控制中心。
- 在左側的主導覽選單中,選取「企業中心」。
- 依序前往「一般設定」>「設定」。
- 選取「API 金鑰」分頁標籤。
- 按一下右上角的「產生新的 API 金鑰」。
- 輸入 API 金鑰的名稱和說明。
在確認畫面上,複製「Key」和「Secret」。
建立 Akamai OPEN API 憑證 (用於連接器健康狀態、裝置目錄和目錄健康狀態動態饋給)
- 登入 Akamai Control Center。
- 依序前往「帳戶管理」>「身分和存取權」。
- 選取「API 使用者」分頁標籤。
- 按一下「建立 API 用戶端」。
- 在「選取 API」部分,搜尋「企業應用程式存取權」,並將存取層級設為「READ-WRITE」。
- 完成其餘設定,然後按一下「Create API client」(建立 API 用戶端)。
按一下「下載」,即可下載
.edgerc格式的憑證;按一下「複製」,則可將憑證複製到現有的.edgerc檔案。
設定 .edgerc 憑證檔案
在要執行 ULS 的系統上建立
.edgerc憑證檔案:touch ~/.edgerc在文字編輯器中開啟檔案:
nano ~/.edgerc請按照下列格式新增 Akamai API 憑證:
[default] ; EAA Legacy API credentials (for access and admin feeds) eaa_api_host = manage.akamai-access.com eaa_api_key = <EAA_API_KEY> eaa_api_secret = <EAA_API_SECRET> ; Akamai OPEN API credentials (for conhealth, devinv, dirhealth feeds) host = <OPEN_API_HOST> client_token = <CLIENT_TOKEN> client_secret = <CLIENT_SECRET> access_token = <ACCESS_TOKEN>保護憑證檔案:
chmod 600 ~/.edgerc
更改下列內容:
<EAA_API_KEY>:EAA 舊版 API 金鑰 (例如XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)。<EAA_API_SECRET>:EAA Legacy API 密鑰。<OPEN_API_HOST>:Akamai OPEN API 主機名稱 (例如akaa-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx.luna.akamaiapis.net)。<CLIENT_TOKEN>:Akamai OPEN API 用戶端權杖 (例如akab-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx)。<CLIENT_SECRET>:您的 Akamai OPEN API 用戶端密鑰。<ACCESS_TOKEN>:您的 Akamai OPEN API 存取權杖 (例如akab-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx)。
安裝 Akamai Unified Log Streamer
Unified Log Streamer (ULS) 會透過 Akamai API 從 Akamai EAA 提取記錄,並使用 TCP 將記錄串流至 Bindplane 代理程式。ULS 是 Python 應用程式,需要 Python 3.9 以上版本。
Linux 安裝 (Python)
複製 ULS 存放區:
git clone https://github.com/akamai/uls.git cd uls安裝 ULS Python 需求:
pip3 install -r bin/requirements.txt安裝 EAA CLI 依附元件:
git clone --depth 1 --single-branch https://github.com/akamai/cli-eaa.git ext/cli-eaa pip3 install -r ext/cli-eaa/requirements.txt驗證安裝項目:
python3 bin/uls.py --help
Docker 安裝
提取官方 ULS Docker 映像檔:
docker pull akamai/uls:latest
設定 ULS,將 EAA 記錄串流至 Bindplane
指令列執行 (測試)
執行 ULS 並設定 TCP 輸出,將記錄串流至 Bindplane 代理程式:
python3 bin/uls.py --input eaa \ --feed access \ --output tcp \ --host <BINDPLANE_HOST> \ --port 5140 \ --edgerc ~/.edgerc \ --section default
更改下列內容:
<BINDPLANE_HOST>:執行 Bindplane 代理程式的伺服器 IP 位址或主機名稱。5140:在 Bindplanetcplog接收器中設定的通訊埠。如要串流多種動態饋給類型,請執行個別的 ULS 執行個體:
# Access logs python3 bin/uls.py --input eaa --feed access --output tcp --host <BINDPLANE_HOST> --port 5140 --edgerc ~/.edgerc --section default # Admin audit logs python3 bin/uls.py --input eaa --feed admin --output tcp --host <BINDPLANE_HOST> --port 5140 --edgerc ~/.edgerc --section default # Connector health python3 bin/uls.py --input eaa --feed conhealth --output tcp --host <BINDPLANE_HOST> --port 5140 --edgerc ~/.edgerc --section default
Systemd 服務 (正式環境)
如要部署至正式環境,請將 ULS 設定為 systemd 服務。
建立 ULS 設定檔:
sudo mkdir -p /etc/uls sudo nano /etc/uls/eaa-access-tcp.conf新增下列設定:
ULS_INPUT=eaa ULS_FEED=access ULS_OUTPUT=tcp ULS_HOST=<BINDPLANE_HOST> ULS_PORT=5140 ULS_EDGERC=/root/.edgerc ULS_SECTION=default建立 systemd 服務檔案:
sudo nano /etc/systemd/system/uls-eaa-access.service新增下列內容:
[Unit] Description=Unified Log Streamer - EAA Access Logs to Bindplane After=network.target [Service] Type=simple EnvironmentFile=/etc/uls/eaa-access-tcp.conf ExecStart=/usr/bin/python3 /opt/uls/bin/uls.py --input ${ULS_INPUT} --feed ${ULS_FEED} --output ${ULS_OUTPUT} --host ${ULS_HOST} --port ${ULS_PORT} --edgerc ${ULS_EDGERC} --section ${ULS_SECTION} Restart=always RestartSec=10 User=root [Install] WantedBy=multi-user.target啟用並啟動服務:
sudo systemctl daemon-reload sudo systemctl enable uls-eaa-access.service sudo systemctl start uls-eaa-access.service確認服務正在執行:
sudo systemctl status uls-eaa-access.service查看記錄:
sudo journalctl -u uls-eaa-access.service -f
針對每個額外的動態消息類型 (管理員、健康狀況),重複步驟 1 至 7,並建立不同名稱的個別設定和服務檔案 (例如 uls-eaa-admin.service、uls-eaa-conhealth.service)。
Docker Compose 部署作業
建立
docker-compose.yml檔案:version: '3.8' services: uls-eaa-access: image: akamai/uls:latest container_name: uls-eaa-access restart: unless-stopped environment: - ULS_INPUT=eaa - ULS_FEED=access - ULS_OUTPUT=tcp - ULS_HOST=<BINDPLANE_HOST> - ULS_PORT=5140 volumes: - ~/.edgerc:/root/.edgerc:ro uls-eaa-admin: image: akamai/uls:latest container_name: uls-eaa-admin restart: unless-stopped environment: - ULS_INPUT=eaa - ULS_FEED=admin - ULS_OUTPUT=tcp - ULS_HOST=<BINDPLANE_HOST> - ULS_PORT=5140 volumes: - ~/.edgerc:/root/.edgerc:ro uls-eaa-conhealth: image: akamai/uls:latest container_name: uls-eaa-conhealth restart: unless-stopped environment: - ULS_INPUT=eaa - ULS_FEED=conhealth - ULS_OUTPUT=tcp - ULS_HOST=<BINDPLANE_HOST> - ULS_PORT=5140 volumes: - ~/.edgerc:/root/.edgerc:ro
將 <BINDPLANE_HOST> 替換為 Bindplane 代理程式伺服器的 IP 位址或主機名稱。
啟動容器:
docker compose up -d查看記錄:
docker compose logs -f
UDM 對應表
| 記錄欄位 | UDM 對應 | 邏輯 |
|---|---|---|
app |
target.application |
「app」欄位中冒號後的值。 |
apphost |
target.hostname |
直接對應。 |
browser |
network.http.user_agent |
直接對應。 |
bytes_in |
network.recieved_bytes |
直接對應。 |
bytes_out |
network.sent_bytes |
直接對應。 |
cc |
principal.location.country_or_region |
直接對應。 |
client_id |
additional.fields.key: "Client Id", additional.fields.value.string_value: client_id |
如有 client_id,則有條件地對應。 |
clientip |
principal.ip |
直接對應。 |
cloud_zone |
principal.cloud.availability_zone |
直接對應。 |
connector_resp_time |
security_result.detection_fields.key: "Connector response time", security_result.detection_fields.value: connector_resp_time |
如果 connector_resp_time 不是空白或「-」,則會依條件對應。 |
content_type |
additional.fields.key:「內容類型」,additional.fields.value.string_value:content_type |
如果 content_type 存在,則會依條件對應。 |
datetime |
metadata.event_timestamp |
使用 RFC 3339 格式從 datetime 欄位剖析。 |
deny_reason |
security_result.summary |
直接對應。 |
device_type |
principal.platform、principal.platform_version |
根據規則運算式比對結果,對應至 WINDOWS、LINUX 或 MAC。原始值會對應至 principal.platform_version。 |
di |
metadata.ingestion_labels.key: "di", metadata.ingestion_labels.value: di |
直接對應為擷取標籤。 |
error_code |
additional.fields.key:「錯誤代碼」,additional.fields.value.string_value:error_code |
如有 error_code,則有條件地對應。 |
event |
metadata.description |
直接對應。 |
geo_city |
principal.location.city |
直接對應。 |
geo_country |
principal.location.country_or_region |
直接對應。 |
geo_state |
principal.location.state |
直接對應。 |
groups |
principal.user.group_identifiers |
直接對應。 |
http_method |
network.http.method |
直接對應。 |
http_ver |
network.application_protocol、network.application_protocol_version |
使用 grok 剖析,擷取通訊協定和版本。 |
idpinfo |
additional.fields.key: "IDP Info", additional.fields.value.string_value: idpinfo |
如果 idpinfo 存在,則會依條件對應。 |
internal_host |
additional.fields.key: "Internal host", additional.fields.value.string_value: internal_host |
如有 internal_host,則有條件地對應。 |
metadata.log_type |
metadata.log_type |
已硬式編碼為「AKAMAI_EAA」。 |
metadata.product_name |
metadata.product_name |
硬式編碼為「AKAMAI_EAA」。 |
metadata.vendor_name |
metadata.vendor_name |
硬式編碼為「AKAMAI_EAA」。 |
metadata.event_type |
metadata.event_type |
由邏輯決定:如果 uid 存在,則為 USER_UNCATEGORIZED;如果同時設定 principal.ip 和 target,則為 NETWORK_HTTP;否則為 GENERIC_EVENT。 |
origin_host |
additional.fields.key:「來源主機」,additional.fields.value.string_value:origin_host |
如果 origin_host 存在,則會依條件對應。 |
origin_resp_time |
security_result.detection_fields.key: "Origin response time", security_result.detection_fields.value: origin_resp_time |
如果 origin_resp_time 不是空白或「-」,則會依條件對應。 |
os |
principal.platform |
根據規則運算式比對結果,對應至 WINDOWS、MAC 或 LINUX。 |
port |
target.port |
app 欄位中冒號後方的值。 |
ral |
metadata.description |
以半形逗號分隔的 ral 陣列串連值。 |
referer |
network.http.referral_url |
直接對應。 |
resource |
principal.resource.attribute.labels.key: "Resource", principal.resource.attribute.labels.value: resource |
如果 resource 存在,則會依條件對應。 |
resource_type |
principal.resource.attribute.labels.key:「資源類型」,principal.resource.attribute.labels.value:resource_type |
如有 resource_type,則有條件地對應。 |
rscd |
metadata.ingestion_labels.key: "rscd", metadata.ingestion_labels.value: rscd |
直接對應為擷取標籤。 |
session_id |
network.session_id |
直接對應。 |
session_info |
additional.fields.key:「工作階段資訊」,additional.fields.value.string_value:session_info |
如果 session_info 存在,則會依條件對應。 |
state |
principal.location.state |
直接對應。 |
status_code |
network.http.response_code |
直接對應。 |
total_resp_time |
security_result.detection_fields.key:「總回應時間」,security_result.detection_fields.value:total_resp_time |
如果 total_resp_time 不是空白或「-」,則會依條件對應。 |
ts |
metadata.event_timestamp |
如果 ts 欄位存在,則從該欄位剖析為 UNIX 毫秒或秒,否則從 datetime 欄位剖析。 |
uid |
principal.user.userid |
直接對應。 |
uip |
principal.ip |
直接對應。 |
url_path |
target.url |
直接對應。 |
user_agent |
network.http.user_agent、network.http.parsed_user_agent |
直接對應並剖析為結構化 parsed_user_agent 欄位。 |
username |
principal.user.email_addresses或principal.user.userid |
如果看起來像電子郵件,則對應至 email_addresses,否則對應至 userid。 |
變更記錄
還有其他問題嗎?向社群成員和 Google SecOps 專家尋求解答。