部署適用於 SAP BTP 的 Microsoft Sentinel 解決方案

本文說明如何部署適用於 SAP Business Technology Platform (BTP) 系統的 Microsoft Sentinel 解決方案。 適用於 SAP BTP 的 Microsoft Sentinel 解決方案會監視並保護您的 SAP BTP 系統。 它會從 BTP 基礎結構和 BTP 型應用程式收集稽核記錄和活動記錄,然後偵測威脅、可疑活動、非法活動等等。 深入了解解決方案

重要

適用於 SAP BTP 解決方案的 Microsoft Sentinel 解決方案目前處於預覽狀態。 Azure 預覽補充條款 包含適用於 Azure 功能 (搶鮮版 (Beta)、預覽版,或尚未發行的版本) 的其他法律條款。

必要條件

開始之前,請確認:

  • 已啟用 Microsoft Sentinel 解決方案。
  • 您有定義的 Microsoft Sentinel 工作區,而且您擁有工作區的讀取和寫入許可權。
  • 您的組織會使用 SAP BTP(在 Cloud Foundry 環境中),簡化與 SAP 應用程式和其他商務應用程式的互動。
  • 您有 SAP BTP 帳戶(其支援 Cloud Foundry 環境中的 BTP 帳戶)。 您也可以使用 SAP BTP 試用帳戶
  • 您有 SAP BTP 稽核記錄管理服務和服務金鑰(請參閱 設定 BTP 帳戶和解決方案)。
  • 您在目標 Microsoft Sentinel 工作區上有 Microsoft Sentinel 參與者角色。

設定 BTP 帳戶和解決方案

若要設定 BTP 帳戶和解決方案:

  1. 登入 BTP 帳戶之後(請參閱 必要條件),請遵循 SAP BTP 系統上的稽核記錄擷取步驟

  2. 在 SAP BTP 駕駛艙中,選取 [ 稽核記錄管理服務]。

    顯示選取 BTP 稽核記錄管理服務的螢幕快照。

  3. 在 BTP 子帳戶中建立稽核記錄管理服務的實例。

    顯示建立 BTP 子帳戶實例的螢幕快照。

  4. 建立服務金鑰,並記錄、 uaa.clientiduaa.clientecretuaa.url的值url。 部署數據連接器需要這些值。

    以下是這些域值的範例:

    • urlhttps://auditlog-management.cfapps.us10.hana.ondemand.com
    • uaa.clientidsb-ac79fee5-8ad0-4f88-be71-d3f9c566e73a!b136532|auditlog-management!b1237
    • uaa.clientsecret682323d2-42a0-45db-a939-74639efde986$gR3x3ohHTB8iyYSKHW0SNIWG4G0tQkkMdBwO7lKhwcQ=
    • uaa.urlhttps://915a0312trial.authentication.us10.hana.ondemand.com
  5. 登入 Azure 入口網站

  6. 移至 Microsoft Sentinel 服務。

  7. 選取 [內容中樞],然後在搜尋列中搜尋 BTP

  8. 選取 [SAP BTP]。

  9. 選取安裝

    如需如何管理解決方案元件的詳細資訊,請參閱 探索和部署現用內容

  10. 選取 建立

    顯示如何為 SAP BTP 建立 Microsoft Sentinel 解決方案的螢幕快照。

  11. 選取要在其中部署解決方案的資源群組和 Microsoft Sentinel 工作區。

  12. 選取 [ 下一步 ],直到您通過驗證,然後選取 [ 建立]。

  13. 解決方案部署完成時,返回您的 Microsoft Sentinel 工作區,然後選取 [資料連接器]。

  14. 在搜尋列中,輸入 BTP,然後選取 [ SAP BTP]。

  15. 選取 [開啟連接器頁面]

  16. 在連接器頁面上,確定您符合列出的必要條件,並完成設定步驟。 當您準備好時,請選取 [ 新增帳戶]。

  17. 指定您在組態期間稍早定義的參數。 指定的子帳戶名稱會投影為數據表中的數據 SAPBTPAuditLog_CL 行,而且當您有多個子帳戶時,可用來篩選記錄。

    注意

    擷取全域帳戶的稽核不會自動擷取子帳戶的稽核。 請遵循您要監視之每個子帳戶的連接器設定步驟,並針對全局帳戶遵循這些步驟。 檢閱這些 帳戶稽核組態考慮

  18. 請確定 BTP 記錄會流入 Microsoft Sentinel 工作區:

    1. 登入您的 BTP 子帳戶,並執行一些產生記錄的活動,例如登入、新增使用者、變更許可權和變更設定。
    2. 允許記錄開始流動 20 到 30 分鐘。
    3. 在 [ SAP BTP 連接器] 頁面上,確認 Microsoft Sentinel 收到 BTP 數據,或直接查詢 SAPBTPAuditLog_CL 數據表。
  19. 遵循這些指導方針,啟用活頁簿和作為解決方案一部分所提供的分析規則

考慮您的帳戶稽核組態

部署程序的最後一個步驟是考慮您的全局帳戶和子帳戶稽核組態。

全域帳戶稽核組態

當您在全局帳戶的 BTP 駕駛艙中啟用稽核記錄擷取時:如果您想要授權稽核記錄管理服務的子帳戶位於目錄底下,您必須先在目錄層級授權服務。 您只能在子帳戶層級授權服務。

子帳戶稽核組態

若要啟用子帳戶的稽核,請完成 SAP 子帳戶稽核擷取 API 檔中的步驟

API 文件說明如何使用 Cloud Foundry CLI 來啟用稽核記錄擷取。

您也可以透過 UI 擷取記錄:

  1. 在 SAP Service Marketplace 的子帳戶中,建立稽核記錄管理服務實例。
  2. 在新實例中,建立服務密鑰。
  3. 檢視服務金鑰,並從資料連接器 UI 中設定指示的步驟 4 擷取必要的參數(url、uaa.clientid 和 uaa.clientsecret)。

輪替 BTP 用戶端密碼

建議您定期輪替 BPT 子帳戶客戶端密碼。 下列範例腳本示範使用從 Azure 金鑰保存庫 擷取的新秘密來更新現有數據連接器的程式。

開始之前,請先收集文本參數所需的值,包括:

  • Microsoft Sentinel 工作區的訂用帳戶標識碼、資源群組和工作區名稱。
  • 金鑰儲存庫和金鑰儲存庫密碼的名稱。
  • 您要以新秘密更新的數據連接器名稱。 若要識別數據連接器名稱,請在 Microsoft Sentinel 數據連接器頁面中開啟 SAP BPT 資料連接器。 數據連接器名稱具有下列語法: BTP_{connector name}
param(
    [Parameter(Mandatory = $true)] [string]$subscriptionId,
    [Parameter(Mandatory = $true)] [string]$workspaceName,
    [Parameter(Mandatory = $true)] [string]$resourceGroupName,
    [Parameter(Mandatory = $true)] [string]$connectorName,
    [Parameter(Mandatory = $true)] [string]$clientId,
    [Parameter(Mandatory = $true)] [string]$keyVaultName,
    [Parameter(Mandatory = $true)] [string]$secretName
)

# Import the required modules
Import-Module Az.Accounts
Import-Module Az.KeyVault

try {
    # Login to Azure
    Login-AzAccount

    # Retrieve BTP client secret from Key Vault
    $clientSecret = (Get-AzKeyVaultSecret -VaultName $keyVaultName -Name $secretName).SecretValue
    if (!($clientSecret)) {
        throw "Failed to retrieve the client secret from Azure Key Vault"
    }

    # Get the connector from data connectors API
    $path = "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.OperationalInsights/workspaces/{2}/providers/Microsoft.SecurityInsights/dataConnectors/{3}?api-version=2024-01-01-preview" -f $subscriptionId, $resourceGroupName, $workspaceName, $connectorName
    $connector = (Invoke-AzRestMethod -Path $path -Method GET).Content | ConvertFrom-Json
    if (!($connector)) {
        throw "Failed to retrieve the connector"
    }

    # Add the updated client ID and client secret to the connector
    $connector.properties.auth | Add-Member -Type NoteProperty -Name "clientId" -Value $clientId
    $connector.properties.auth | Add-Member -Type NoteProperty -Name "clientSecret" -Value ($clientSecret | ConvertFrom-SecureString -AsPlainText)

    # Update the connector with the new auth object
    Invoke-AzRestMethod -Path $path -Method PUT -Payload ($connector | ConvertTo-Json -Depth 10)
}
catch {
    Write-Error "An error occurred: $_"
}