---
schema_version: "1"
id: cc23a19c740947ad1168a4e2ab55ad4b69a2e3637b60a22288e7e5622ca5c284
title: 設定 SAP HANA SSO
collection: tableau
version: current
locale: zh-tw
portal_url: https://docs.salesforce.com/tableau/current/zh-tw/server-linux/config_sap_hana_sso.md
canonical_url: https://help.tableau.com/current/server-linux/zh-tw/config_sap_hana_sso.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 1593f6c7d965808242ac3bbee5be68b22345bba8c568d0ea3897225fe24a653d
description: Configure Tableau Server SAML delegation to provide single sign-on for SAP HANA.
---
[跳至主要內容](#main-content)

# 設定 SAP HANA SSO

可以將 Tableau Server 設定為使用 SAML 委派來為 SAP HANA 提供單一登入 (SSO) 體驗。此方案不依賴於 Tableau Server 的 SAML 驗證。您無需使用 Tableau Server 的 SAML 登入來使用 HANA SAML 委派。您可以使用所選的任何方法登入到 Tableau Server。

對於 SAP HANA 的 SAML 委派，Tableau Server 充當身分識別提供者 (IdP)。

## 開始之前

設定 SAP HANA 的 SAML 委派需要在 Tableau Server 和 SAP HANA 上進行設定。本主題提供有關設定 Tableau Server 的設定資訊。設定 Tableau Server 之前，您必須完成以下操作：

- 獲取 Tableau Server 的 SAML 憑證和金鑰檔案。
    - 憑證檔必須是 PEM 編碼的 x509 憑證，檔案副檔名為 .crt 或 .cert。此檔案由 Tableau Server 使用，並且還必須安裝在 HANA 上。
    - 私密金鑰必須是 DER 編碼的私密金鑰檔案，採用 PKCS#8 格式，不受密碼保護，檔案副檔名為 .der。此檔僅由 Tableau Server 使用。
- 在 HANA 中安裝憑證。為避免 HANA 中產生 `libxmlsec` 錯誤，建議在 SAP HANA 上設定記憶體內憑證存放區。有關詳情，請參閱此 [SAP 支援主題](https://launchpad.support.sap.com/#/notes/0002148434)。
- 在 Tableau Server 上安裝最新版本的 SAP HANA 驅動程式（最小版本為 1.00.9）。
- 設定從 Tableau Server 到 SAP HANA 的網路加密（推薦）。

有關組建憑證/金鑰對、加密 SAML 連線和設定 SAP HANA 的詳細資料，請參閱 Tableau Traihead 社群中的[如何使用 Tableau Server 設定 SAP HANA for SAML SSO](https://trailhead.salesforce.com/trailblazer-community/feed/0D5KX00000gUuG80AK "Tableau Trailhead 社群的連結")。

## 為 SAP HANA 設定 Tableau Server SAML

以下程序描述如何使用 `[tsm data-access](https://help.tableau.com/current/server-linux/zh-tw/cli_data-access.htm#set-saml-delegation)` 在 Tableau Server 上手動設定 SAP HANA 的 SAML。您也可以使用[sapHanaSettings 實體](https://help.tableau.com/current/server-linux/zh-tw/entity_sapHanaSettings.htm)設定 SAP HANA 的 SAML。

如果在分散式部署中執行 Tableau Server，請在初始節點上執行以下程序。

1. 將憑證檔案放在名為 `saml` 的資料夾中。例如：
    
    `/var/opt/saml`
2. 執行以下命令指定憑證和金鑰檔案的位置：
    
    `tsm data-access set-saml-delegation configure --cert-key <cert-key> --cert-file <cert-file>`
    
    其中 `<cert-key>` 和 `<cert-file>` 分別是私密金鑰和憑證檔案的檔路徑。
    
    例如，
    
    `tsm data-access set-saml-delegation configure --cert-key /var/opt/saml/hana_pkey_pkcs8.der --cert-file /var/opt/saml/hana_cert.pem`
    
    您可以指定其他選項。例如，您可以指定使用者名格式以及認證標準化方式。請參閱 [tsm data-access](https://help.tableau.com/current/server-linux/zh-tw/cli_data-access.htm#set-saml-delegation)。
3. 執行以下命令以啟用委派：
    
    `tsm data-access set-saml-delegation enable`
    
    `tsm configuration set -k wgserver.sap_hana_sso.enabled -v true`
    
    `tsm configuration set -k wgserver.delegation.enabled -v true`
4. 完成後，執行 `tsm pending-changes apply`。
    
    如果擱置組態需要重新啟動伺服器，`pending-changes apply` 命令將顯示提示，讓您知道即將重新啟動。即使伺服器已停止，也會顯示提示，但在這種情況下不會重新啟動。您可以使用 `--ignore-prompt` 選項隱藏提示，但這樣做不會改變重新啟動行為。如果變更不需要重新啟動，則不會出現提示即可套用變更。有關詳情，請參閱 [tsm pending-changes apply](https://help.tableau.com/current/server-linux/zh-tw/cli_pending-changes.htm#pending-changes-apply)。