收集 Atlassian Jira 記錄
總覽
這個剖析器會處理 SYSLOG 和 JSON 格式的 Atlassian Jira 記錄。系統會先嘗試將訊息剖析為 JSON。如果失敗,系統會使用 grok 模式剖析 SYSLOG 格式的訊息,擷取 IP 位址、使用者名稱、HTTP 方法和回應代碼等各種欄位,然後將這些欄位對應至 UDM。剖析器也會處理特定的 Jira 稽核事件,包括登入成功和失敗,並將相關欄位對應至 UDM 中的安全性結果屬性。
事前準備
請確認您已完成下列事前準備事項:
- Google SecOps 執行個體。
- Atlassian Jira 的特殊存取權。
設定動態饋給
在 Google SecOps 平台中,有兩種不同的進入點可設定動態饋給:
- 「SIEM 設定」>「動態消息」
- 內容中心 > 內容包
依序前往「SIEM 設定」>「動態饋給」,設定動態饋給
如要設定動態消息,請按照下列步驟操作:
- 依序前往「SIEM 設定」>「動態消息」。
- 按一下「新增動態消息」。
- 在下一個頁面中,按一下「設定單一動態饋給」。
- 在「動態消息名稱」欄位中,輸入動態消息的名稱 (例如「Atlassian Jira Logs」)。
- 選取「Webhook」做為「來源類型」。
- 選取「Atlassian Jira」做為「記錄類型」。
- 點選「下一步」。
- 選用:指定下列輸入參數的值:
- 分割分隔符號:用於分隔記錄行的分隔符號,例如
\n
。 - 資產命名空間:資產命名空間。
- 擷取標籤:套用至這個動態饋給事件的標籤。
- 分割分隔符號:用於分隔記錄行的分隔符號,例如
- 點選「下一步」。
- 在「Finalize」畫面中檢查動態饋給設定,然後按一下「Submit」。
- 按一下「產生密鑰」,產生驗證這個動態消息的密鑰。
- 複製並儲存密鑰。您無法再次查看這個密鑰。如有需要,您可以重新產生新的密鑰,但這項操作會使先前的密鑰失效。
- 在「詳細資料」分頁中,從「端點資訊」欄位複製動態消息端點網址。您需要在用戶端應用程式中指定這個端點網址。
- 按一下 [完成]。
從內容中心設定動態饋給
為下列欄位指定值:
- 分割分隔符號:用於分隔記錄行的分隔符號,例如
\n
。
進階選項
- 動態饋給名稱:系統預先填入的值,用於識別動態饋給。
- 來源類型:將記錄收集到 Google SecOps 的方法。
- 資產命名空間:與動態饋給相關聯的命名空間。
擷取標籤:套用至這個動態饋給所有事件的標籤。
按一下「產生密鑰」,產生驗證這個動態消息的密鑰。
複製並儲存密鑰。您無法再次查看這個密鑰。如有需要,您可以重新產生新的密鑰,但這項操作會使先前的密鑰失效。
在「詳細資料」分頁中,從「端點資訊」欄位複製動態消息端點網址。您需要在用戶端應用程式中指定這個端點網址。
為 Webhook 資訊提供建立 API 金鑰
依序前往 Google Cloud 控制台 >「憑證」。
按一下 [Create credentials] (建立憑證),然後選取 [API key] (API 金鑰)。
將 API 金鑰存取權限制在 Google Security Operations API。
指定端點網址
- 在用戶端應用程式中,指定 webhook 動態饋給中提供的 HTTPS 端點網址。
如要啟用驗證,請在自訂標頭中指定 API 金鑰和私密金鑰,格式如下:
X-goog-api-key = API_KEY X-Webhook-Access-Key = SECRET
建議:請將 API 金鑰指定為標頭,而非在網址中指定。如果 Webhook 用戶端不支援自訂標頭,您可以使用查詢參數指定 API 金鑰和密鑰,格式如下:
ENDPOINT_URL?key=API_KEY&secret=SECRET
更改下列內容:
ENDPOINT_URL
:動態消息端點網址。API_KEY
:用於向 Google Security Operations 進行驗證的 API 金鑰。SECRET
:您產生的密鑰,用於驗證動態饋給。
在 Atlassian Jira 中為 Google SecOps 建立 Webhook
- 以管理員身分存取 Jira 執行個體。
- 依序前往「設定」 >「系統」>「WebHooks」。
- 按一下「建立 WebHook」。
- 設定下列 Webhook 詳細資料:
- 名稱:為 Webhook 提供描述性名稱 (例如「Google SecOps Integration」)。
- 網址:輸入 Google SecOps API 端點網址。
- 事件:選取應觸發 Webhook 的 Jira 事件。選擇與安全監控需求相關的事件 (例如建立問題、更新問題、新增留言)。您可以視需要選取「所有活動」。
- 選用:JQL 篩選器:使用 JQL 篩選器進一步篩選要觸發 Webhook 的事件。這項功能有助於專注處理特定專案、問題類型或其他條件。
- 排除內文:請勿勾選這個選項。Webhook 必須以 JSON 格式將事件資料傳送至 Google SecOps。
- 按一下「建立」即可儲存 Webhook 設定。
UDM 對應表
記錄欄位 | UDM 對應 | 邏輯 |
---|---|---|
affectedObjects.id |
target.resource.attribute.labels.value |
affectedObjects 陣列中每個物件的 id 欄位,都會對應至鍵為「ID_[index]」的標籤,其中 [index] 是物件在陣列中的位置。 |
affectedObjects.name |
target.resource.attribute.labels.value |
affectedObjects 陣列中每個物件的 name 欄位會對應至鍵為「Name_[index]」的標籤,其中 [index] 是物件在陣列中的位置。 |
affectedObjects.type |
target.resource.attribute.labels.value |
affectedObjects 陣列中每個物件的 type 欄位都會對應至鍵為「Type_[index]」的標籤,其中 [index] 是物件在陣列中的位置。 |
associatedItems.0.id |
target.user.userid |
如果 associatedItems.0.typeName 為「USER」,這個欄位會對應至 target.user.userid 。否則會對應至 security_result.detection_fields 中鍵為「associatedItems Id」的標籤。 |
associatedItems.0.name |
target.user.user_display_name |
如果 associatedItems.0.typeName 為「USER」,這個欄位會對應至 target.user.user_display_name 。否則會對應至 security_result.detection_fields 中索引鍵為「associatedItems Name」的標籤。 |
associatedItems.0.parentId |
target.process.parent_process.pid |
如果 associatedItems.0.typeName 為「USER」,這個欄位會對應至 target.process.parent_process.pid 。 |
associatedItems.0.parentName |
target.resource.parent |
如果 associatedItems.0.typeName 為「USER」,這個欄位會對應至 target.resource.parent 。 |
associatedItems.0.typeName |
security_result.detection_fields.value |
已對應至 security_result.detection_fields 中金鑰為「associatedItems TypeName」的標籤。 |
author.id |
principal.user.userid |
已對應至「principal.user.userid 」。 |
author.name |
principal.user.user_display_name |
已對應至「principal.user.user_display_name 」。 |
author.type |
principal.resource.attribute.labels.value |
對應至 principal.resource.attribute.labels 中索引鍵為「Author Type」的標籤。 |
author.uri |
principal.url |
已對應至「principal.url 」。 |
authorAccountId |
principal.user.userid |
已對應至「principal.user.userid 」。 |
authorKey |
target.resource.attribute.labels.value |
對應至 target.resource.attribute.labels 中索引鍵為「Author Key」的標籤。 |
auditType.action |
security_result.summary |
已對應至「security_result.summary 」。也用於衍生 security_result.action 和 metadata.event_type (如果動作包含「login」,則為 USER_LOGIN;如果動作包含「successful」,則為 ALLOW;如果動作包含「failed」,則為 BLOCK)。 |
auditType.area |
metadata.product_event_type |
已對應至「metadata.product_event_type 」。 |
auditType.category |
security_result.category_details |
已對應至「security_result.category_details 」。 |
category |
metadata.product_event_type |
已對應至「metadata.product_event_type 」。 |
changedValues.changedFrom |
security_result.about.resource.attribute.labels.value |
已對應至 security_result.about.resource.attribute.labels 中含有「變更前」鍵的標籤。 |
changedValues.changedTo |
security_result.about.resource.attribute.labels.value |
對應至 security_result.about.resource.attribute.labels 中含有「Changed To」鍵的標籤。 |
changedValues.fieldName |
security_result.about.resource.attribute.labels.value |
對應至 security_result.about.resource.attribute.labels 中含有「FieldName」鍵的標籤。 |
changedValues.i18nKey |
security_result.about.resource.attribute.labels.value |
對應至 security_result.about.resource.attribute.labels 中含有「FieldName」鍵的標籤。 |
changedValues.key |
security_result.about.resource.attribute.labels.value |
已對應至 security_result.about.resource.attribute.labels 中含有「變更前」鍵的標籤。 |
changedValues.to |
security_result.about.resource.attribute.labels.value |
對應至 security_result.about.resource.attribute.labels 中含有「Changed To」鍵的標籤。 |
created |
metadata.event_timestamp |
已剖析並對應至「metadata.event_timestamp 」。 |
dst_ip |
target.ip |
已對應至「target.ip 」。 |
extraAttributes.name |
principal.resource.attribute.labels.value |
對應至 principal.resource.attribute.labels 中索引鍵為「名稱」的標籤。 |
extraAttributes.value |
principal.resource.attribute.labels.value |
對應至 principal.resource.attribute.labels 中鍵為「Value」的標籤。 |
http_method |
network.http.method |
已對應至「network.http.method 」。 |
http_referral_url |
network.http.referral_url |
已對應至「network.http.referral_url 」。 |
id |
metadata.product_log_id |
已對應至「metadata.product_log_id 」。 |
objectItem.id |
security_result.detection_fields.value |
對應至 security_result.detection_fields 中索引鍵為「objectItem Id」的標籤。 |
objectItem.name |
security_result.detection_fields.value |
對應至 security_result.detection_fields 中含有「objectItem Name」鍵的標籤。 |
objectItem.typeName |
security_result.detection_fields.value |
對應至 security_result.detection_fields 中金鑰為「objectItem TypeName」的標籤。 |
path |
principal.url |
如果不是「-」或「/status」,則會對應至 principal.url 。 |
protocol |
network.ip_protocol |
如果為「HTTP」,則對應至 network.ip_protocol 。 |
remoteAddress |
principal.ip |
已對應至「principal.ip 」。 |
response_code |
network.http.response_code |
已對應至「network.http.response_code 」。 |
sent_bytes |
network.sent_bytes |
已對應至「network.sent_bytes 」。 |
source |
principal.ip |
經過剖析後擷取 IP 位址,並合併至 principal.ip 。 |
src_ip1 、src_ip2 、src_ip3 |
principal.ip |
已對應至「principal.ip 」。 |
summary |
metadata.description |
已對應至「metadata.description 」。 |
user_agent |
network.http.user_agent |
已對應至「network.http.user_agent 」。 |
user_name |
principal.user.userid |
已對應至「principal.user.userid 」。如果 auditType.action 包含「login」,請設為「MACHINE」。如果剖析的是系統記錄,則衍生自 date_time ;如果剖析的是 JSON,則衍生自 created 。如果 JSON 中有 timestamp ,系統會改用這個值,而非 created 。如果沒有任何一個,則會使用批次中的 create_time 。根據其他欄位是否存在而衍生:如果存在 dst_ip ,則為 NETWORK_HTTP;如果存在 user_name 或 (associatedItems.0.typeName 為「USER」且存在 associatedItems.0.id ),則為 USER_UNCATEGORIZED;如果存在 src_ip1 、src_ip2 、src_ip3 或 remoteAddress ,則為 STATUS_UPDATE;否則為 GENERIC_EVENT。如果 auditType.action 包含「login」,則會覆寫為 USER_LOGIN。一律設為「ATLASSIAN_JIRA」。一律設為「ATLASSIAN_JIRA」。如果 auditType.action 包含「login successful」,請設為「ALLOW」;如果 auditType.action 包含「login failed」,請設為「BLOCK」。 |
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。