---
schema_version: "1"
id: 27e0289395038fad7b2904d48dc1695ebfa6a16197f3a4c35529eb2ecb920094
title: 管理服务器密文
collection: tableau
version: next
locale: zh-cn
portal_url: https://docs.salesforce.com/tableau/next/zh-cn/server/security_secret_storage.md
canonical_url: https://help.tableau.com/v0.0/server/zh-cn/security_secret_storage.htm
source_site: help.tableau.com
content_type: documentation
content_hash: e71ff90da2fc4a1b1c6050c0748d9c9b11179f6e38e019a940091a199c2843fd
description: Understand and manage how Tableau Server stores secrets.
---
[跳转到主要内容](#main-content)

# 管理服务器密文

Tableau Server 需要存储它使用的一些密文以执行各种功能，通常包括保护内部通信的安全、与其他应用程序或操作系统通信，或实现与客户端的安全通信。在此上下文中，术语_密文_可能是指密码、令牌或用于向另一个实体验证某个实体身份的其他字符串。

运行 Tableau Server 需要两种类别的密文。这两种密文根据其生成方式而有所不同。

- **管理员生成的密文**。这些密文包括用户运行身份帐户的凭据及关联密文，以及 Tableau Server 使用的 SMTP 凭据。
- **由系统中的各种进程自动生成的密文**。例如，需要一个密文来保护群集控制器和 ZooKeeper 进程之间的通信。并且，每个与 Postgres 通信的服务和编程用户都需要一些不同的密码。

大多数密文在空闲时将被加密。需要密文时，将会在运行时对其进行解密。

本主题介绍密文存储的工作方式，并介绍了在 Tableau Server 上正确管理密文存储所需执行的操作。

## 了解密文存储的工作方式

在安装期间，Tableau Server 会在 Java 密钥存储中生成和存储一个主密钥。主密钥用于对系统中使用的配置加密密钥进行加密。

每当创建或更新一个新密文时，将会使用配置加密密钥对该密文进行加密。加密值随后与其对应的配置参数一起存储在服务器上的一个 YAML 文件中。保存加密值的参数使用 `ENC(<encrypted string>)` 格式，其中 `<encrypted string>` 是 Base64 编码的加密字符串。

在运行时，当需要访问给定密文时，系统会将加密值读取到内存中，并使用配置加密密钥对其进行解密。

对于待处理的更改（其中的密文是在配置更改过程中输入的），将对整个事务进行加密。在这种情况下，在您输入密文然后保存待处理的更改后，密文将（通过加密的 SSL）传输到协调服务。协调服务对密文进行加密和存储，直到应用待处理的更改为止。应用更改时，密文（仍处于加密状态）将升级为当前配置版本。

Tableau Server 在 GCM 模式下使用 256 位 AES 对密文进行加密。用于保护存储安全的密钥与用于在将嵌入数据库凭据存储在存储库中之前对其进行加密的资产密钥不同。

### 谁具有主密钥的访问权限？

在默认安装中，Tableau Server 的 Java 密钥存储安装在 `\ProgramData\Tableau\Tableau Server\data\tabsvc\crypto\keystores\` 文件夹中。如果将 Tableau 安装在非系统驱动器上，则路径为 `<install drive>:\Tableau\Tableau Server\data\tabsvc\crypto\keystores\`。默认情况下，以下帐户具有此目录的访问权限：

- 用户运行身份帐户（如果已配置）
- NetworkService 预定义本地 Windows 帐户
- LocalSystem 预定义本地 Windows 帐户
- 计算机管理员组的成员

### 导入和导出配置信息

Tableau 服务管理器引入了使用 [tsm settings export](https://help.tableau.com/v0.0/server/zh-cn/cli_settings_tsm.htm#TSMExport) 导入和导出配置信息的功能。

**注意**：此版本的 Tableau Server 不支持从备份还原配置信息。作为替代，我们建议使用导出和导入配置命令来备份和还原配置信息。

尽管在以内部方式存储在磁盘上时配置密文已加密，但在将配置导出到文件时，密文将以纯文本形式写入文件。管理员负责采取措施来保护此文件。有各种可用选项：

- 将文件写入加密的文件系统。
- 将文件写入由文件系统权限限制为只有特定用户或组才能访问的目录。
- 对输出文件进行加密。

### 保护用于导入和导出操作的密文

使用第三方工具集（例如 OpenSSL）对备份输出进行加密。

### 群集节点

将新节点添加到 Tableau Server 群集时，您首先将需要生成节点配置文件 ([tsm topology](https://help.tableau.com/v0.0/server/zh-cn/cli_topology_tsm.htm#topology-get-bootstrap-file))。节点配置文件包含用于对配置密码加密的主密钥存储文件的副本。

**重要信息**：我们强烈建议您采取额外措施，在导出包含密文的配置文件时保护节点配置文件的安全。

[在新节点上安装和配置 Tableau Server](https://help.tableau.com/v0.0/server/zh-cn/install_additional_nodes.htm) 时，您将需要向 `initialize-tsm` 命令提供节点配置文件。

### 密文存储事件日志记录

将记录与密文存储相关的以下事件：

- 生成新加密密钥
- 加密密钥已回滚或更改
- 对配置文件中的新值进行加密

有关日志文件及其存储位置的详细信息，请参见[使用日志文件](https://help.tableau.com/v0.0/server/zh-cn/logs_working_with.htm)。

## 管理密文

作为 Tableau Server 管理员，与密文存储相关的最重要任务是定期更新密文。在某些情况（服务器故障的排除或审计）下，您可能需要检索密码。

对于其他操作，例如升级版本、备份和还原或向群集中添加新节点（如上所述），Tableau Server 会自动管理密文存储和相关过程。

### 更新密文

您应根据公司的安全策略定期更新密文。

若要更新主密钥和自动生成的密文，请运行 [tsm security regenerate-internal-tokens](https://help.tableau.com/v0.0/server/zh-cn/cli_security_tsm.htm#regenerate-tokens)。

### 检索密码

在某些情况下，您可能需要为故障排除或其他操作检索密码。例如，您可能需要由 Tableau Server 生成并加密的 Postgres readonly 用户凭据。在这些情况下，您可以运行一个 tsm 命令，该命令将为您检索密码并对其进行解密。

若要检索密码，请打开命令提示符，并针对下表中列出的其中一个参数发出 `tsm configuration get` 命令。

例如，若要检索 readonly Postgres 用户的密码，请键入以下命令：

`tsm configuration get -k pgsql.readonly_password`

该命令将以明文形式返回密码：

`$ tsm configuration get -k pgsql.readonly_password`

`password`

<table style="width: 100%;" class="simple-table"><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><th>Configuration Parameter</th><th>Description</th></tr><tr><td>clustercontroller.zookeeper.password</td><td>Password for cluster controller to connect to zookeeper.</td></tr><tr><td>indexandsearchserver.client.password             
						

					</td><td>Password for logging into Index and Search Server. 

					</td></tr><tr><td>indexandsearchserver.ssl.admin.cert.bytes             
					</td><td>Admin certificate that is used for administrative access to the Index and Search Server. The admin certificate is used to generate the node certificate. 

					</td></tr><tr><td>indexandsearchserver.ssl.admin.key.file_bytes 
					</td><td>Certificate key for administrative access to the Index and Search Server. 

					</td></tr><tr><td>indexandsearchserver.ssl.node.cert.bytes </td><td>Certificate that is used for Index and Search Server node-to-node communication.

					</td></tr><tr><td>            
						indexandsearchserver.ssl.node.key.file_bytes             
					</td><td>Certificate key that is used for Index and Search Server node-to-node communication.</td></tr><tr><td>indexandsearchserver.ssl.root.cert.bytes             
					</td><td>Certificate that is used to sign the admin and node certificates . This certificate is used by TSM&nbsp;for health check and by NLP&nbsp;to connect to Index and Search Server. 

					</td></tr><tr><td>indexandsearchserver.ssl.root.key.file_bytes </td><td>Certificate key for root certificate.

					</td></tr><tr><td>filestore.zookeeper.password</td><td>Password for filestore to connect to zookeeper.</td></tr><tr><td>hyper.connection.init_password 

					</td><td>Password used to initialize the Hyper database for user <code>tableau_internal_user</code> and is then used for connecting to Hyper.

					</td></tr><tr><td>jdbc.password</td><td>Password for the rails Postgres user.</td></tr><tr><td>kms.persistent_store 

					</td><td>A collection of master encryption keys (MEKs) used by the Key Management System.

					</td></tr><tr><td>maestro.rserve.password             
						</td><td>Password for connecting to an external Rserve instance used by Tableau Prep Conductor for running flows that have nodes with R scripts. 

					</td></tr><tr><td>maestro.tabpy.password</td><td>Password for connecting to an external TabPy (Python server) instance used by Tableau Prep Conductor for running flows that have nodes with Python scripts. 

					</td></tr><tr><td>oauth.google.client_secret</td><td>Client secret of the Google Cloud Platform account. </td></tr><tr><td>oauth.quickbooks.consumer_secret</td><td>Consumer secret of the Intuit developer account. </td></tr><tr><td>oauth.salesforce.client_secret</td><td>Client secret of the Salesforce developer account. </td></tr><tr><td>pgsql.adminpassword</td><td><p>tblwgadmin Postgres 用户的密码。</p><p class="note"><b>注意</b>：尽管配置参数在 Tableau 的配置文件（tabsvc.yml、workgroup.yml）中已加密，但此密码将以纯文本形式存储在由 SAML 使用的文件中。</p></td></tr><tr><td>pgsql.readonly_password</td><td>Password for the readonly Postgres user.</td></tr><tr><td>pgsql.remote_password</td><td>Password for the tableau Postgres user.</td></tr><tr><td>redis.password </td><td><p>Redis 的密码。</p><p class="note"><b>注意</b>：尽管配置参数在 Tableau 的配置文件（tabsvc.yml、workgroup.yml）中已加密，但配置将以纯文本形式出现在由 Redis 应用程序使用的 redis.conf 文件中。Redis 不支持加密/安全密码。</p></td></tr><tr><td>servercrashupload.proxy_server_password</td><td>Password for custom proxy server used to upload crash reports.</td></tr><tr><td>service.runas.password</td><td>Password of the Run As users. Stored temporarily.</td></tr><tr><td>ssl.cert.file_bytes             
					</td><td>The content of one of the three SSL certificate files uploaded by the administrator. The certificate files are required to enable secure external connections to Tableau Server. </td></tr><tr><td>ssl.chain.file_bytes 
					</td><td>The chain file(s) for the certificates uploaded by the administrator for external SSL.</td></tr><tr><td>ssl.key.file_bytes</td><td>Key file(s) for the certificates uploaded by the administrator for external SSL.</td></tr><tr><td>ssl.key.passphrase</td><td>Optional passphrase used to protect the external SSL key.</td></tr><tr><td>svcmonitor.notification.smtp.password</td><td>SMTP Server password supplied by the administrator through TabConfig.exe.</td></tr><tr><td>tabadminservice.password</td><td>Password for the service that allows server admins to download log files through the web interface.</td></tr><tr><td>vizportal.openid.client_secret</td><td>This is the password ("provider client secret") used for  OpenID Connect SSO.</td></tr><tr><td>
                        vizqlserver.external_proxy_password
                    </td><td>Password used to authenticate to an external proxy.</td></tr><tr><td>wgserver.domain.password</td><td>Password used to bind to Active Directory. </td></tr><tr><td>wgserver.saml.key.passphrase</td><td>Passphrase used to access the PKCS#8 SAML key file.</td></tr><tr><td>zookeeper.tsm.password</td><td>Password that TSM&nbsp;uses to connect to Zookeeper coordination service</td></tr></tbody></table>