---
schema_version: "1"
id: 713ed69e835a8716a04773eb265ab7e8c481874369ad3dacdfe878c15357331d
title: 針對內部 Postgres 通訊設定 SSL
collection: tableau
version: current
locale: zh-tw
portal_url: https://docs.salesforce.com/tableau/current/zh-tw/server/ssl_config_postgres.md
canonical_url: https://help.tableau.com/current/server/zh-tw/ssl_config_postgres.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 527bbe70f47a714ab63115190fb24801f55291b5a239e3fc711a475faaf3fee3
description: Configure SSL for internal Postgres repository communication.
---
[跳至主要內容](#main-content)

# 針對內部 Postgres 通訊設定 SSL

您可以將 Tableau Server 設定為對 Postgres 存放庫和其他伺服器元件之間的加密通訊使用 SSL (TLS)。預設情況下，Tableau Server 元件的內部通訊不加密。

在啟用對內部 SSL 的支援時，您也可以設定對從 Tableau 用戶端（例如 Tableau Desktop、Tableau Mobile、REST API 和 Web 瀏覽器）到存放庫的直接連線的支援。

**附註：**從版本 2026.2.0 開始，可以使用自訂憑證進行 Postgres 通訊。為 Postgres 啟用自訂憑證後，無法使用 TSM UI 進行變更。要啟用自訂憑證，需要使用 TSM 命令列。有關如何啟用自訂存放庫憑證的詳情，請參閱 [tsm security repository-ssl enable](https://help.tableau.com/current/server/zh-tw/cli_security_tsm.htm#postres-ssl-enable)。

1. 以伺服器管理員身分在瀏覽器中開啟 TSM：
    
    https://<tsm-computer-name>:8850
    
    有關詳情，請參閱[登入到 Tableau 服務管理員 Web UI](https://help.tableau.com/current/server/zh-tw/sign_in_tsm.htm)。
2. 在 \[設定\] 索引標籤上，選取 \[安全\] \> \[存放庫 SSL\] 。
    
    ![TSM 存放庫 SSL 設定的螢幕截圖](/tableau/current/zh-tw/server/zh-tw/Img/postgres-ssl-config.png "TSM 存放庫 SSL 設定的螢幕截圖")
3. 選取用於存放庫 SSL 的選項之一。
    
    - 所有連線都需要 — 為內部 Tableau Server 通訊使用 SSL，並要求為直接連線到 postgres 存放庫的 Tableau 用戶端和任何外部（非 Tableau）用戶端（包括使用 **tableau** 或 **readonly** 使用者的用戶端）使用 SSL。
        
        **重要提示：**除非完成 [設定 Postgres SSL 以允許從用戶端直接連線](https://help.tableau.com/current/server/zh-tw/ssl_config_direct_cx.htm)中的步驟，以將憑證檔放置在用戶端電腦上的正確位置，否則 Tableau 用戶端和外部 postgres 用戶端將無法透過比較用戶端電腦上的憑證與來自存放庫電腦中的 SSL 憑證來驗證 Tableau 存放庫的身分識別。
    - 對於使用者連線為可選 — 啟用後，Tableau 會為內部 Tableau Server 通訊使用 SSL，支援從 Tableau 用戶端和外部用戶端到伺服器的直接連線（但並不要求使用 SSL）。
    - 對於所有連線均關閉（預設值） — 內部伺服器通訊不加密，並且不需要為來自用戶端的直接連線使用 SSL。
4. 按一下 \[OK\] （確定）。
    
    前兩個選項會組建伺服器的憑證檔案（**server.crt** 和 server.key），並將它們放在以下位置中。
    
    `C:/ProgramData/Tableau/Tableau Server/data/tabsvc/config/pgsql<version>/security`
    
    如果需要為直接連線設定用戶端，請使用此 .crt 檔案。

若要為伺服器元件之間的內部流量啟用 SSL，請執行以下命令：

`tsm security repository-ssl enable`

`tsm pending-changes apply`

### 命令的作用

`repository-ssl enable` 組建伺服器的憑證檔案，該檔案放在以下位置中：

`C:/ProgramData/Tableau/Tableau Server/data/tabsvc/config/pgsql<version>/security`

預設情況下，對於存放庫與其他伺服器元件之間的流量，以及 Tableau 用戶端的直接連線（包括透過 **tableau** 或 **readonly** 使用者進行的連線），此命令將 Tableau Server 設定為需要 SSL。

若要完成設定，您還必須執行[設定 Postgres SSL 以允許從用戶端直接連線](https://help.tableau.com/current/server/zh-tw/ssl_config_direct_cx.htm)中所述的步驟，將憑證檔案放在用戶端電腦上的正確位置中。

如果擱置組態需要重新啟動伺服器，`pending-changes apply` 命令將顯示提示，讓您知道即將重新啟動。即使伺服器已停止，也會顯示提示，但在這種情況下不會重新啟動。您可以使用 `--ignore-prompt` 選項隱藏提示，但這樣做不會改變重新啟動行為。如果變更不需要重新啟動，則不會出現提示即可套用變更。有關詳情，請參閱 [tsm pending-changes apply](https://help.tableau.com/current/server/zh-tw/cli_pending-changes.htm#pending-changes-apply)。

### repository-ssl enable 的選項

如果只需要為內部 Tableau Server 通訊使用 SSL，而不需要為用戶端應用直接連線使用，請將以下選項用於 `repository-ssl enable` 命令：

`--internal-only`

### 叢集環境

如果在叢集中的節點上執行 `repository-ssl enable`，它會將所需的憑證檔案複製到每個其他節點上的相同位置。

有關下載用於直接連線的公共憑證的詳情，請參閱[設定 Postgres SSL 以允許從用戶端直接連線](https://help.tableau.com/current/server/zh-tw/ssl_config_direct_cx.htm)。