整合 Atlassian Confluence Server 與 Google SecOps
本文說明如何整合 Atlassian Confluence Server 與 Google Security Operations (Google SecOps)。
整合版本:3.0
必要條件
如要驗證 Confluence Server,請選擇下列任一選項:
- 專屬帳戶的使用者名稱和密碼。
 - 個人存取權杖 (PAT)。
 
如果整合服務同時提供這兩種驗證方式,系統會優先使用 PAT,而非使用者名稱和密碼。
如要根據使用者名稱和密碼進行驗證,必須建立專用帳戶,供整合使用。
如要根據存取權杖進行驗證,請設定帳戶權限。建立後,新的 PAT 會對應帳戶目前的權限等級。
如要建立權杖,請按照下列步驟操作:
- 在 Confluence 中,依序前往「帳戶」>「帳戶設定」>「個人存取權杖」。
 - 選取「建立權杖」。
 - 為要建立的權杖命名。
 - (選用) 如要提高安全性,您可以設定權杖在指定天數後自動過期。
 - 點選「建立」。
 
整合參數
整合作業需要下列參數:
| 參數名稱 | 類型 | 預設值 | 為必填項目 | 說明 | 
|---|---|---|---|---|
| API 根目錄 | 字串 | https://ip_address | 是 | 指定要連線的 Confluence Server Api Root。 | 
| 使用者名稱 | 字串 | 不適用 | 否 | 指定連線時要使用的使用者名稱。整合功能支援使用使用者名稱 + 密碼或個人存取權杖進行驗證。 | 
| 密碼 | 密碼 | 不適用 | 否 | 指定連線時要使用的密碼。整合功能支援使用使用者名稱 + 密碼或個人存取權杖進行驗證。 | 
| 個人存取權杖 | 密碼 | 不適用 | 否 | 指定要用於連線的權杖。整合功能支援使用使用者名稱 + 密碼或個人存取權杖進行驗證。 | 
| 驗證 SSL | 核取方塊 | 已勾選核取方塊 | 否 | 如果啟用,系統會驗證為 API 根目錄設定的憑證。 | 
如需在 Google SecOps 中設定整合功能的操作說明,請參閱「設定整合功能」。
如有需要,您可以在稍後階段進行變更。設定整合執行個體後,您就可以在劇本中使用該執行個體。如要進一步瞭解如何設定及支援多個執行個體,請參閱「支援多個執行個體」。
動作
如要進一步瞭解動作,請參閱「 從工作台回覆待處理動作」和「執行手動動作」。
乒乓
測試連線。
參數
不適用
執行日期
這項動作並未對實體執行。
動作結果
指令碼結果
| 指令碼結果名稱 | 值選項 | 範例 | 
|---|---|---|
| is_success | True/False | is_success:False | 
如果動作成功 (回應中含有 JSON,且伺服器回應為 200),則應將 is_success 設為 True。否則為 False。
案件總覽
| 結果類型 | 值/說明 | 類型 (實體/一般) | 
|---|---|---|
| 輸出訊息* | 動作不應失敗,也不應停止執行應對手冊:
 
 動作應會失敗並停止執行應對手冊: 
 
  | 
      一般 | 
清單頁面
根據提供的條件,列出 Atlassian Confluence Server 執行個體中可用的頁面。
參數
| 參數名稱 | 類型 | 預設值 | 為必填項目 | 說明 | 
|---|---|---|---|---|
| 篩選鍵 | DDL | 選取「One」 DDL 可能的值: 
 
 
  | 
      否 | 指定用來篩選網頁的金鑰。 | 
| 篩選邏輯 | DDL | 未指定 DDL 可能的值: 
 
 
  | 
      否 | 指定要套用哪些篩選器邏輯。篩選邏輯會根據 Filter Key 參數中提供的值運作。 | 
    
| 篩選條件值 | 字串 | 不適用 | 否 | 指定篩選器中應使用的值。 如果選取 Equal,動作會嘗試在結果中找出完全相符的項目。如果選取 Contains,動作會嘗試尋找包含該子字串的結果。如果這個參數未提供任何內容,系統就不會套用篩選條件。 篩選邏輯會根據 Filter Key 參數中提供的值運作。 | 
    
| 要傳回的記錄數量上限 | 整數值 | 50 | 否 | 指定要傳回的記錄數。 如果未提供任何內容,動作會傳回 50 筆記錄。  | 
    
執行日期
這項動作並未對實體執行。
動作結果
指令碼結果
| 指令碼結果名稱 | 值選項 | 範例 | 
|---|---|---|
| is_success | True/False | is_success:False | 
如果動作順利執行 (未傳回任何錯誤,且伺服器回應為 200 OK),則 is_success 應設為 True。
JSON 結果
{
   "results": [
       {
           "id": "PAGE_ID",
           "type": "page",
           "status": "current",
           "title": "Tell people what you think in a comment (step 8 of 9)",
           "space": {
               "id": 131073,
               "key": "ds",
               "name": "Demonstration Space",
               "type": "global",
               "_links": {
                   "webui": "/display/ds",
                   "self": "http://192.0.2.45:8090/rest/api/space/ds"
               },
               "_expandable": {
                   "metadata": "",
                   "icon": "",
                   "description": "",
                   "retentionPolicy": "",
                   "homepage": "/rest/api/content/PAGE_ID"
               }
           },
           "extensions": {
               "position": 7
           },
           "_links": {
               "webui": "/pages/viewpage.action?pageId=PAGE_ID",
               "edit": "/pages/resumedraft.action?draftId=DRAFT_ID",
               "tinyui": "/x/AYAB",
               "self": "http://192.0.2.45:8090/rest/api/content/PAGE_ID"
           },
           "_expandable": {
               "container": "/rest/api/space/ds",
               "metadata": "",
               "operations": "",
               "children": "/rest/api/content/PAGE_ID/child",
               "restrictions": "/rest/api/content/PAGE_ID/restriction/byOperation",
               "history": "/rest/api/content/PAGE_ID/history",
               "ancestors": "",
               "body": "",
               "version": "",
               "descendants": "/rest/api/content/PAGE_ID/descendant"
           }
       },
       ...
   ],
   "start": 0,
   "limit": 5,
   "size": 5,
   "_links": {
       "self": "http://192.0.2.45:8090/rest/api/content?expand=space",
       "next": "/rest/api/content?expand=space&limit=5&start=5",
       "base": "http://192.0.2.45:8090",
       "context": ""
   }
}
案件總覽
| 結果類型 | 值/說明 | 類型 (實體/一般) | 
|---|---|---|
| 輸出訊息* | 動作不應失敗,也不應停止執行應對手冊:
 
 
 動作應會失敗並停止執行應對手冊: 
 Filter Key 參數中選取欄位。
 
 
  | 
      一般 | 
| 案件總覽表格 | 名稱:可用的 Confluence 頁面 資料欄: 
 
 
 
 
  | 
      一般 | 
依 ID 取得頁面
依 ID 取得 Atlassian Confluence Server 頁面。
參數
| 參數名稱 | 類型 | 預設值 | 為必填項目 | 說明 | 
|---|---|---|---|---|
| 網頁 ID | 字串 | 不適用 | 是 | 指定要傳回的頁面 ID。 | 
| 展開 | CSV | body.storage | 
      否 | 指定 expand 參數,即可傳回網頁的其他資訊。參數接受以逗號分隔的多個值。 根據預設,系統會使用 body.storage 擷取網頁內容。 | 
    
執行日期
這項動作並未對實體執行。
動作結果
指令碼結果
| 指令碼結果名稱 | 值選項 | 範例 | 
|---|---|---|
| is_success | True/False | is_success:False | 
如果動作順利執行 (系統傳回網頁,且伺服器回應為 200 OK),則 is_success 應設為 True。
JSON 結果
{
   "id": "PAGE_ID",
   "type": "page",
   "status": "current",
   "title": "title",
   "body": {
       "storage": {
           "value": "<p>test page</p><p>11</p><p>aa</p><p>aa</p><p>aa</p><p><br /></p><p><br /></p>",
           "representation": "storage",
           "_expandable": {
               "content": "/rest/api/content/PAGE_ID"
           }
       },
       "_expandable": {
           "editor": "",
           "view": "",
           "export_view": "",
           "styled_view": "",
           "anonymous_export_view": ""
       }
   },
   "extensions": {
       "position": "none"
   },
   "_links": {
       "webui": "/display/SIEM/111",
       "edit": "/pages/resumedraft.action?draftId=PAGE_ID&draftShareId=cf8b3a21-8e36-4a83-a696-51fcb4428d1c",
       "tinyui": "/x/TIAB",
       "collection": "/rest/api/content",
       "base": "http://192.0.2.45:8090",
       "context": "",
       "self": "http://192.0.2.45:8090/rest/api/content/PAGE_ID"
   },
   "_expandable": {
       "container": "/rest/api/space/SIEM",
       "metadata": "",
       "operations": "",
       "children": "/rest/api/content/PAGE_ID/child",
       "restrictions": "/rest/api/content/PAGE_ID/restriction/byOperation",
       "history": "/rest/api/content/PAGE_ID/history",
       "ancestors": "",
       "version": "",
       "descendants": "/rest/api/content/PAGE_ID/descendant",
       "space": "/rest/api/space/SIEM"
   }
}
案件總覽
| 結果類型 | 值/說明 | 類型 (實體/一般) | 
|---|---|---|
| 輸出訊息* | 動作不應失敗,也不應停止執行應對手冊:
 
 The action should fail and stop a playbook execution: 
 
  | 
      一般 | 
取得子網頁
取得 Atlassian Confluence Server 頁面的子頁面。
參數
| 參數名稱 | 類型 | 預設值 | 為必填項目 | 說明 | 
|---|---|---|---|---|
| 網頁 ID | 字串 | 不適用 | 是 | 指定要傳回的頁面 ID。 | 
| 要傳回的記錄數量上限 | 整數值 | 10 | 是 | 指定要傳回的子網頁數量上限。 | 
執行日期
這項動作並未對實體執行。
動作結果
指令碼結果
| 指令碼結果名稱 | 值選項 | 範例 | 
|---|---|---|
| is_success | True/False | is_success:False | 
如果動作順利執行 (系統傳回網頁,且伺服器回應為 200 OK),則 is_success 應設為 True。
JSON 結果
{
   "results": [
       {
           "id": "PAGE_ID",
           "type": "page",
           "status": "current",
           "title": "test child page!",
           "extensions": {
               "position": "none"
           },
           "_links": {
               "webui": "/pages/viewpage.action?pageId=PAGE_ID",
               "edit": "/pages/resumedraft.action?draftId=PAGE_ID&draftShareId=799fd068-5053-4889-9120-c1a3c970fdbd",
               "tinyui": "/x/T4AB",
               "self": "http://192.0.2.45:8090/rest/api/content/PAGE_ID"
           },
           "_expandable": {
               "container": "/rest/api/space/SIEM",
               "metadata": "",
               "operations": "",
               "children": "/rest/api/content/PAGE_ID/child",
               "restrictions": "/rest/api/content/PAGE_ID/restriction/byOperation",
               "history": "/rest/api/content/PAGE_ID/history",
               "ancestors": "",
               "body": "",
               "version": "",
               "descendants": "/rest/api/content/PAGE_ID/descendant",
               "space": "/rest/api/space/SIEM"
           }
       }
   ],
   "start": 0,
   "limit": 1,
   "size": 1,
   "_links": {
       "self": "http://192.0.2.45:8090/rest/api/content/PAGE_ID/child/page",
       "base": "http://192.0.2.45:8090",
       "context": ""
   }
}
案件總覽
| 結果類型 | 值/說明 | 類型 (實體/一般) | 
|---|---|---|
| 輸出訊息* | 動作不應失敗,也不應停止劇本執行: 如果資料可用 (is_success = true): print "Successfully found child pages for the provided Atlassian Confluence Server page id: <page_id>" (成功找到所提供 Atlassian Confluence Server 網頁 ID 的子網頁:<page_id>)。 如果資料不可用 (is_success=false) print "No child pages were found for the provided Atlassian Confluence Server page id <page_id>" (找不到所提供 Atlassian Confluence Server 網頁 ID <page_id> 的子網頁)。 動作應失敗並停止劇本執行: 
 
 
  | 
      一般 | 
取得網頁留言
取得 Atlassian Confluence Server 頁面的留言。
參數
| 參數名稱 | 類型 | 預設值 | 為必填項目 | 說明 | 
|---|---|---|---|---|
| 網頁 ID | 字串 | 不適用 | 是 | 指定要傳回的頁面 ID。 | 
| 展開 | CSV | body.storage | 
      否 | 指定 expand 參數,即可傳回網頁的其他資訊。參數接受以逗號分隔的多個值。 根據預設,系統會使用 body.storage 擷取網頁內容。 | 
    
| 要傳回的記錄數量上限 | 整數值 | 10 | 是 | 指定要傳回的子網頁數量上限。 | 
執行日期
這項動作並未對實體執行。
動作結果
指令碼結果
| 指令碼結果名稱 | 值選項 | 範例 | 
|---|---|---|
| is_success | True/False | is_success:False | 
如果動作順利執行 (傳回留言、伺服器回應為 200 OK),則 is_success 應設為 True。
JSON 結果
{
   "results": [
       {
           "id": "ID",
           "type": "comment",
           "status": "current",
           "title": "Re: 111",
           "body": {
               "storage": {
                   "value": "<p>comment1</p>",
                   "representation": "storage",
                   "_expandable": {
                       "content": "/rest/api/content/ID"
                   }
               },
               "_expandable": {
                   "editor": "",
                   "view": "",
                   "export_view": "",
                   "styled_view": "",
                   "anonymous_export_view": ""
               }
           },
           "extensions": {
               "location": "footer",
               "_expandable": {
                   "resolution": ""
               }
           },
           "_links": {
               "webui": "/display/SIEM/111?focusedCommentId=98387#comment-ID",
               "self": "http://203.0.113.1:8090/rest/api/content/ID"
           },
           "_expandable": {
               "container": "/rest/api/content/ID",
               "metadata": "",
               "operations": "",
               "children": "/rest/api/content/ID/child",
               "restrictions": "/rest/api/content/ID/restriction/byOperation",
               "history": "/rest/api/content/ID/history",
               "ancestors": "",
               "version": "",
               "descendants": "/rest/api/content/ID/descendant",
               "space": "/rest/api/space/SIEM"
           }
       },
       ...
   ],
   "start": 0,
   "limit": 10,
   "size": 2,
   "_links": {
       "self": "http://203.0.113.1:8090/rest/api/content/ID/child/comment?expand=body.storage",
       "base": "http://203.0.113.1:8090",
       "context": ""
   }
}
案件總覽
| 結果類型 | 值/說明 | 類型 (實體/一般) | 
|---|---|---|
| 輸出訊息* | 動作不應失敗,也不應停止執行應對手冊:
 
 The action should fail and stop a playbook execution: 
 
 
  | 
      一般 | 
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。