收集 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 以上版本,或搭載 systemd 的 Linux 主機,用於執行 Bindplane 代理程式。
  • 搭載 Python 3.9 以上版本的 Linux 主機,或容器化環境 (Docker 或 Kubernetes),用於執行 Unified Log Streamer。
  • 如果是在 Proxy 後方執行,請確認防火牆通訊埠已按照 Bindplane 代理程式規定開啟。
  • 具備管理員權限的 Akamai EAA 租戶。
  • Akamai API 憑證:

    • 存取和管理稽核動態饋給:EAA Legacy API 金鑰和密鑰 (在 Enterprise Center 建立)。
    • 連接器健康狀態、裝置庫存和目錄健康狀態動態饋給:Akamai OPEN API 憑證 (EdgeGrid 驗證),具備 Enterprise Application Access API 的讀取/寫入權限。

取得 Bindplane 代理程式的 Google SecOps 憑證

如要向 Google SecOps 驗證 Bindplane 代理程式,請選擇下列其中一種方法:

  • 新部署作業:使用 Chronicle API (選項 1)。
  • 舊版部署作業:繼續使用擷取驗證檔案 (選項 2),直到 Ingestion API 於 2027 年 7 月 20 日停用為止。
  1. 登入 Google Cloud 控制台,選取連結至 Google SecOps 執行個體的 Google Cloud 專案。
  2. 依序前往「IAM & Admin」>「Service Accounts」。
  3. 按一下「建立服務帳戶」。
  4. 提供下列設定詳細資料:
    • 「Service account name」(服務帳戶名稱):輸入帳戶名稱 (例如 bindplane-ingest)。
    • 「服務帳戶說明」:輸入說明 (例如 Bindplane agent log ingestion)。
  5. 點按「Create and continue」(建立並繼續)。
  6. 在「將專案存取權授予這個服務帳戶」部分,按一下「選取角色」,然後選取「Chronicle 編輯者」。
  7. 依序點選「繼續」和「完成」。
  8. 按一下您建立的服務帳戶,然後前往「金鑰」分頁。
  9. 依序點選「新增金鑰」>「建立新的金鑰」。
  10. 選取「JSON」,然後點選「建立」。金鑰檔案會下載到您的電腦。
  11. 將金鑰檔案儲存為 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,以符合儲存路徑。
  12. 依序前往「IAM 與管理」>「設定」,然後複製「專案編號」。設定匯出工具時會用到。

方法 2:下載擷取驗證檔案 (舊版)

  1. 登入 Google SecOps 控制台。
  2. 依序前往「設定」>「資料管理」>「收集代理程式」。如果使用的是 SIEM 專用平台,請依序前往「設定」>「收集代理程式」。
  3. 下載擷取驗證檔案。
  4. 將檔案安全地儲存在要安裝 Bindplane 代理程式的系統上。

取得 Google SecOps 客戶 ID

  1. 登入 Google SecOps 控制台。
  2. 依序前往「設定」>「管理」>「設定檔」。如果使用的是僅限 SIEM 的平台,請依序前往「設定」>「設定檔」。
  3. 複製並儲存「機構詳細資料」部分的客戶 ID。

安裝 Bindplane 代理程式

請按照下列操作說明,在 Windows 或 Linux 作業系統上安裝 Bindplane 代理程式。

Windows 安裝

  1. 以管理員身分開啟命令提示字元或 PowerShell。
  2. 執行下列指令:

    msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
    

Linux 安裝

  1. 開啟具有 root 或 sudo 權限的終端機。
  2. 執行下列指令:

    sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
    

其他安裝資源

如需其他安裝選項,請參閱 Bindplane 代理程式安裝指南。

設定 Bindplane 代理程式,擷取記錄並傳送至 Google SecOps

  1. 在文字編輯器中開啟 Bindplane 代理程式設定檔:

    Linux:

    sudo nano /opt/observiq-otel-collector/config.yaml
    

    Windows:

    notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
    
  2. 按照下列方式編輯 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
  • 將 <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 代理程式,請按照下列步驟操作:

  1. 執行下列指令:

    sudo systemctl restart observiq-otel-collector
    
  2. 確認服務正在執行:

    sudo systemctl status observiq-otel-collector
    
  3. 查看記錄檔,找出錯誤:

    sudo journalctl -u observiq-otel-collector -f
    

如要在 Windows 中重新啟動 Bindplane 代理程式,請按照下列步驟操作:

  1. 您可以選擇下列其中一個選項:

    • 以管理員身分開啟命令提示字元或 PowerShell:
    net stop observiq-otel-collector && net start observiq-otel-collector
    
    • 服務控制台:
      1. 按下 Win+R,輸入 services.msc,然後按下 Enter 鍵。
      2. 找出「observIQ OpenTelemetry Collector」。
      3. 按一下滑鼠右鍵,然後選取「重新啟動」。
  2. 確認服務正在執行:

    sc query observiq-otel-collector
    
  3. 查看記錄檔,找出錯誤:

    type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
    

建立 Akamai API 憑證

Akamai EAA 會根據動態饋給類型,使用兩種 API 憑證。建立與要收集的動態饋給相對應的憑證。

建立 EAA 舊版 API 憑證 (用於存取和管理動態饋給)

  1. 登入 Akamai 控制中心。
  2. 在左側的主要導覽選單中,選取「Enterprise Center」。
  3. 依序前往「一般設定」>「設定」。
  4. 選取「API 金鑰」分頁標籤。
  5. 按一下右上角的「Generate new API Key」。
  6. 輸入 API 金鑰的名稱和說明。
  7. 在確認畫面上,複製「Key」和「Secret」。

建立 Akamai OPEN API 憑證 (用於連接器健康狀態、裝置目錄和目錄健康狀態動態饋給)

  1. 登入 Akamai 控制中心。
  2. 依序前往「帳戶管理」>「身分和存取權」。
  3. 選取「API 使用者」分頁標籤。
  4. 按一下「建立 API 用戶端」。
  5. 在「Select APIs」部分,搜尋「Enterprise Application Access」,並將存取層級設為「READ-WRITE」。
  6. 完成其餘設定,然後按一下「Create API client」(建立 API 用戶端)。
  7. 按一下「下載」,即可下載 .edgerc 格式的憑證,或按一下「複製」,將憑證複製到現有的 .edgerc 檔案。

設定 .edgerc 憑證檔案

  1. 在要執行 ULS 的系統上建立 .edgerc 憑證檔案:

    touch ~/.edgerc
    
  2. 在文字編輯器中開啟檔案:

    nano ~/.edgerc
    
  3. 請按照下列格式新增 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>
    
  4. 保護憑證檔案:

    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)

  1. 複製 ULS 存放區:

    git clone https://github.com/akamai/uls.git
    cd uls
    
  2. 安裝 ULS Python 需求檔:

    pip3 install -r bin/requirements.txt
    
  3. 安裝 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
    
  4. 驗證安裝項目:

    python3 bin/uls.py --help
    

Docker 安裝

  1. 提取官方 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:Bindplane tcplog 接收器中設定的通訊埠。

  • 如要串流多種動態饋給類型,請執行不同的 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 服務。

  1. 建立 ULS 設定檔:

    sudo mkdir -p /etc/uls
    sudo nano /etc/uls/eaa-access-tcp.conf
    
  2. 新增下列設定:

    ULS_INPUT=eaa
    ULS_FEED=access
    ULS_OUTPUT=tcp
    ULS_HOST=<BINDPLANE_HOST>
    ULS_PORT=5140
    ULS_EDGERC=/root/.edgerc
    ULS_SECTION=default
    
  3. 建立 systemd 服務檔案:

    sudo nano /etc/systemd/system/uls-eaa-access.service
    
  4. 新增下列內容:

    [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
    
  5. 啟用並啟動服務:

    sudo systemctl daemon-reload
    sudo systemctl enable uls-eaa-access.service
    sudo systemctl start uls-eaa-access.service
    
  6. 確認服務正在執行:

    sudo systemctl status uls-eaa-access.service
    
  7. 查看記錄:

    sudo journalctl -u uls-eaa-access.service -f
    

為每個額外的動態饋給類型 (admin、conhealth) 重複步驟 1 至 7,建立名稱不同的獨立設定和服務檔案 (例如 uls-eaa-admin.service、uls-eaa-conhealth.service)。

Docker Compose 部署作業

  1. 建立 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 位址或主機名稱。

  1. 啟動容器:

    docker compose up -d
    
  2. 查看記錄:

    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:「用戶端 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:「連接器回應時間」,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 資訊」,additional.fields.value.string_value:idpinfo 如果 idpinfo 存在,則會依條件對應。
internal_host additional.fields.key:「內部主機」,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:「來源回應時間」,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:「資源」,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 專業人員尋求解答。