---
schema_version: "1"
id: 250ce520541158c83d7d8aa84622aa8a5985c3631211bc05ce7b8045d50cae49
title: identityStore 实体
collection: tableau
version: next
locale: zh-cn
portal_url: https://docs.salesforce.com/tableau/next/zh-cn/server-linux/entity_identity_store.md
canonical_url: https://help.tableau.com/v0.0/server-linux/zh-cn/entity_identity_store.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 20dc60be81486510d6f3d17fd5536094a3cda0f03fa4d22b7820dbf2808feb2b
description: Reference for the identityStore entity to configure local or LDAP identity stores on Tableau Server.
---
[跳转到主要内容](#main-content)

# identityStore 实体

Tableau Server 需要身份存储来存储用户和组信息。在首次配置身份存储之前，请查看[身份验证](https://help.tableau.com/v0.0/server-linux/zh-cn/security_auth.htm)和[身份存储](https://help.tableau.com/v0.0/server-linux/zh-cn/plan_identity_store.htm)主题。在 Tableau Server 上安装了身份存储后，如果不重新安装服务器，则无法更改身份存储。

**重要信息：**所有实体选项均区分大小写。

## 开始之前

查看以下信息：

- 如果您将不使用本地身份存储，则将使用某种版本的 LDAP。在这种情况下，请与您的目录/LDAP 管理员一起针对 LDAP 模式配置 Tableau Server 并绑定要求。
- Tableau Server 配置已针对 Active Directory 进行优化。如果安装到 Active Directory 中，我们建议使用 [配置初始节点设置](https://help.tableau.com/v0.0/server-linux/zh-cn/config_general.htm#tsm-ui-steps)配置身份存储。
- LDAP 绑定与用户身份验证无关。例如，您可以将 Tableau Server 配置为使用简单绑定来向 LDAP 目录进行身份验证，然后将 Tableau Server 配置为在安装后使用 Kerberos 进行用户身份验证。
- 不要通过不安全的连接使用简单绑定连接到 LDAP。默认情况下，使用简单绑定的 LDAP 以明文发送数据。使用 LDAPS 通过简单绑定加密流量。请参见[将加密通道配置为 LDAP 外部身份存储](https://help.tableau.com/v0.0/server-linux/zh-cn/config_encrypt_ldap.htm)。
- 若要为具有 Tableau Server 服务的 LDAP 绑定使用 Kerberos 身份验证，您将需要用于 GSSAPI 绑定的密钥表文件，如以上部分所述。另请参见[了解密钥表要求](https://help.tableau.com/v0.0/server-linux/zh-cn/kerberos_keytab.htm)。在 Kerberos 的上下文中，您只需在 Tableau Server 的基本安装过程中进行 GSSAPI 绑定。安装服务器之后，您可以随后[为用户身份验证配置 Kerberos](https://help.tableau.com/v0.0/server-linux/zh-cn/config_kerberos.htm) 以及[将 Kerberos 委派给数据源](https://help.tableau.com/v0.0/server-linux/zh-cn/kerberos_delegation.htm)。
- 在本主题中，我们区分了 _LDAP_（用于连接到目录服务的协议）和 _LDAP 服务器_（目录服务的实现）。例如，`slapd` 是 OpenLDAP 项目中的 LDAP 服务器。
- 在初始化服务器之前验证 LDAP 配置，请参见[配置初始节点设置](https://help.tableau.com/v0.0/server-linux/zh-cn/config_general.htm)。
- 只会在初始配置过程中导入 JSON 配置文件。如果需要在导入 JSON 配置文件并初始化 Tableau Server 后进行 LDAP 更改，请不要尝试重新导入 JSON 文件。而是使用本机 tsm 命令或 `tsm configuration set` 进行单独的键更改。请参见[外部身份识存储配置参考](https://help.tableau.com/v0.0/server-linux/zh-cn/ldap_config.htm)。

## 配置模板

此部分中的 JSON 模板用于配置具有不同身份存储方案的 Tableau Server。除非您正在配置本地身份存储，否则需要选择并编辑特定于 LDAP 环境的配置文件模板。

考虑使用 [Tableau 身份存储配置工具](https://tagyoureit.github.io/tableau-identitystore-config-tool/)来帮助生成 LDAP JSON 配置文件。该工具本身不受 Tableau 支持。不过，使用该工具创建的 JSON 文件（而不是手动创建文件）不会改变服务器的受支持状态。

选择身份存储配置模板以编辑：

- 本地
- LDAP - Active Directory
- OpenLDAP - GSSAPI 绑定
- OpenLDAP - 简单绑定

有关配置文件、实体和密钥的更多说明，请参见[配置文件示例](https://help.tableau.com/v0.0/server-linux/zh-cn/config_file_example.htm)。

### 本地

如果组织还没有用于用户身份验证的 Active Directory 或 LDAP 服务器，请将“本地”配置为身份存储类型。选择“本地”作为身份存储类型时，可以使用 Tableau Server 创建和管理用户。

为本地身份存储配置 Tableau Server 的另一种方法是在安装过程中运行安装程序 GUI 并选择“本地”。请参见[配置初始节点设置](https://help.tableau.com/v0.0/server-linux/zh-cn/config_general.htm)。

{
  "configEntities": {
    "identityStore": {
       "\_type": "identityStoreType",
       "type": "local"
     }
   }
}			
		

![](/tableau/next/zh-cn/server-linux/zh-cn/Img/Road-sign-alert.png)

### 重要信息

下面的 LDAP 配置模板是一些示例。所呈现的模板将不会在您的组织中配置 LDAP 连接。您必须与您的目录管理员一起编辑 LDAP 模板值才能成功部署。  
  
此外，configEntities 中引用的所有文件均必须位于本地计算机上。不要指定 UNC 路径。

### LDAP - Active Directory

Tableau Server 配置已针对 Active Directory 进行优化。如果安装到 Active Directory 中，请使用 [配置初始节点设置](https://help.tableau.com/v0.0/server-linux/zh-cn/config_general.htm#tsm-ui-steps)配置身份存储。

需要与 Active Directory 的加密连接。请参见[将加密通道配置为 LDAP 外部身份存储](https://help.tableau.com/v0.0/server-linux/zh-cn/config_encrypt_ldap.htm)。

如果由于某种原因无法将身份存储配置为使用 TSM Web 界面与 Active Directory 通信，请使用此 JSON 模板配置 Tableau Server 以连接到 Active Directory。此模板使用 GSSAPI (Kerberos) 绑定向 Active Directory 验证 Tableau Server 服务的身份。Tableau Server 包括对 Active Directory 架构的支持。因此，如果将 `"directoryServiceType"` 选项设置为 `"activedirectory"`，则不需要在 `"identityStoreSchemaType"` 选项中提供架构信息。

如果将 Linux 版 Tableau Server 安装到 Active Directory，并且您在其中安装 Tableau Server 的计算机已加入域，则计算机可能已经有 Kerberos 配置文件和密钥表文件。严格来说，您可以将这些文件用于 GSSAPI 绑定，但我们不建议使用这些文件。而是要联系您的 Active Directory 管理员，并专门为 Tableau Server 服务请求一个 keytab。

{
  "configEntities":{
    "identityStore": {
		"\_type": "identityStoreType",
		"type": "activedirectory",
		"domain": "your-domain.lan",
		"nickname": "YOUR-DOMAIN-NICKNAME",
		"directoryServiceType": "activedirectory",
		"bind": "gssapi",
		"kerberosKeytab": "<path to local key tab file>",
		"kerberosConfig": "/etc/krb5.conf",
		"kerberosPrincipal": "your-principal@YOUR.DOMAIN"
		}
	}
}			

我们建议您使用 GSSAPI 绑定到 Active Directory。但是，您可以使用简单的绑定和 LDAPS 进行连接。要使用简单绑定进行连接，请将 `bind` 更改为 `simple`，删除三个 Kerberos 实体，并添加 `port`/`sslPort`、`username` 和 `password` 选项。以下示例显示了 Active Directory 以及简单绑定 json。

{
  "configEntities":{
	"identityStore": {
		"\_type": "identityStoreType",
		"type": "activedirectory",
		"domain": "your-domain.lan",
		"nickname": "YOUR-DOMAIN-NICKNAME",
		"directoryServiceType": "activedirectory",
		"hostname": "optional-ldap-server", 
		"sslPort": "636",
		"bind": "simple",
		"username": "username",
		"password": "password"	
		}
	}
}			
		

### OpenLDAP - GSSAPI 绑定

使用下面的模板来配置包含 GSSAPI 绑定的 OpenLDAP。如果您的组织正在运行 Active Directory，请不要使用此模板。如果要安装到 Active Directory 中，请使用下面的 LDAP - Active Directory 模板。

大多数情况下，将 OpenLDAP 与 GSSAPI (Kerberos) 配合使用的组织将使用密钥表文件来存储凭据。在以下示例中，keytab 文件用于存储身份验证凭据。

但是，您可以通过 `username` 和 `password` 实体提供凭据。

您还可以同时指定密钥表以及用户名和密码对。在这种情况下，Tableau Server 将尝试使用 keytab，但是如果由于任何原因导致身份验证失败，它将回退并使用用户名和密码凭据。

{
  "configEntities":{
		"identityStore": {
			"\_type": "identityStoreType",
			"type": "activedirectory",
			"domain": "your-domain.lan",
			"nickname": "YOUR-DOMAIN-NICKNAME",
			"directoryServiceType": "openldap",
			"bind": "gssapi",
			"kerberosKeytab": "<path to local key tab file>",
			"kerberosConfig": "/etc/krb5.conf",
			"kerberosPrincipal": "your-principal@YOUR.DOMAIN",
			"identityStoreSchemaType": {
			   "userBaseFilter": "(objectClass=inetOrgPerson)",
			   "userUsername": "user",
			   "userDisplayName": "displayname",
			   "userEmail": "email",
			   "userCertificate": "certificate",
			   "userThumbnail": "thumbnail",
			   "userJpegPhoto": "photo",
			   "groupBaseFilter": "(objectClass=groupofNames)",
			   "groupName": "groupname",
			   "groupEmail": "groupemail",
			   "groupDescription": "groupdescription",
			   "member": "member",
			   "distinguishedNameAttribute": "",
			   "serverSideSorting": "",
			   "rangeRetrieval": "",
			   "userClassNames": \["inetOrgPerson","someClass2"\],
			   "groupClassNames": \["groupOfUniqueNames1","groupOfUniqueNames2"\]
			   }
		   }			
	  }			
}
		

### OpenLDAP - 简单绑定

{
  "configEntities":{
		"identityStore": {
			"\_type": "identityStoreType",
			"type": "activedirectory",
			"domain": "my.root",
			"nickname": "",
			"hostname": "optional-ldap-server",
			"port": "389",
			"directoryServiceType": "openldap",
			"bind": "simple",
			"username": "cn=username,dc=your,dc=domain",
			"password": "password",
			"identityStoreSchemaType": {
			   "userBaseFilter": "(objectClass=inetOrgPerson)",
			   "userUsername": "user",
			   "userDisplayName": "displayname",
			   "userEmail": "email",
			   "userCertificate": "certificate",
			   "userThumbnail": "thumbnail",
			   "userJpegPhoto": "photo",
			   "groupBaseFilter": "(objectClass=groupofNames)",
			   "groupName": "groupname",
			   "groupEmail": "groupemail",
			   "groupDescription": "groupdescription",
			   "member": "member",
			   "distinguishedNameAttribute": "",
			   "serverSideSorting": "",
			   "rangeRetrieval": "",
			   "userClassNames": \["inetOrgPerson","someClass2"\],
			   "groupClassNames": \["groupOfUniqueNames1","groupOfUniqueNames2"\]
			   }
		 }
  }
}			
		

## 配置模板参考

### 共享身份存储选项

type

您想要在其中存储用户身份信息的位置。`local` 或 `activedirectory`。（如果要连接到任何 LDAP 服务器，请选择 `activedirectory`。）

domain

您在其中安装 Tableau Server 的计算机的域。

nickname

域的昵称。这在 Windows 环境中也称为 NetBIOS 名称。

所有 LDAP 实体都需要 `nickname` 选项。如果您的组织不需要昵称/NetBIOS，则传递一个空白键，例如：`"nickname": ""`。

### LDAP GSSAPI 绑定选项

directoryservicetype

要连接到的目录服务的类型。`activedirectory` 或 `openldap`。

kerberosConfig

本地计算机上 Kerberos 配置文件的路径。如果要安装到 Active Directory 目录，我们不建议使用现有 Kerberos 配置文件或联接域的计算机上已有的密钥表文件。请参见[身份存储](https://help.tableau.com/v0.0/server-linux/zh-cn/plan_identity_store.htm)。

kerberosKeytab

本地计算机上 Kerberos 密钥表文件的路径。建议您创建一个包含专门用于 Tableau Server 服务的密钥的密钥表文件，并且不要与计算机上的其他应用程序共享此密钥表文件。例如，在 Linux 上，您可以将 keytab 文件放在 `/var/opt/tableau/keytab` 目录中。

kerberosPrincipal

Tableau Server 在主计算机上的服务主体名称。密钥表必须具有此主体的权限。不要使用位于 `/etc/krb5.keytab` 的现有系统密钥表。相反，我们建议您注册一个新的服务主体名称。若要查看给定密钥表中的主体，请运行 `klist -k` 命令。请参见[了解密钥表要求](https://help.tableau.com/v0.0/server-linux/zh-cn/kerberos_keytab.htm)。

### LDAP 简单绑定选项

directoryservicetype

要连接到的目录服务的类型。`activedirectory` 或 `openldap`。

hostname

LDAP 服务器的主机名。您可以为此值输入主机名或 IP 地址。此处指定的主机将仅用于主域上的用户/组查询。如果用户/组查询在其他域中（不在主域中），Tableau Server 将不会使用此值，而是会查询 DNS 以识别适当的域控制器。

port

使用此选项指定 LDAP 服务器的非安全端口。明文通常使用 389。

sslPort

使用此选项启用 LDAPS。指定 LDAP 服务器的安全端口。LDAPS 通常使用端口 636。若要使用 LDAPS，还必须指定 hostname 选项。请参见[将加密通道配置为 LDAP 外部身份存储](https://help.tableau.com/v0.0/server-linux/zh-cn/config_encrypt_ldap.htm)。

username

要用于连接到目录服务的用户名。指定的帐户必须具有查询目录服务的权限。对于 Active Directory，输入用户名，例如 `jsmith`。对于 LDAP 服务器，请输入进行连接所要使用的用户可分辨名称 (DN)。例如，您可能会输入 `cn=username,dc=your-local-domain,dc=lan`。

password

要用于连接到 LDAP 服务器的用户的密码。

#### LDAPS 和子域

如果您在 Active Directory 中启用 LDAPS 并连接到子域，则需要运行以下 TSM 命令来为子域配置 LDAPS 端口 (TCP 636)。该命令采用指定 `subdomainFQDN:port` 的参数。

示例：`tsm configuration set -k wgserver.domain.ldap.domain_custom_ports -v subdomain1.lan:636,subdomain2.lan:636,subdomain3.lan:636`

有关详细信息，请参见[tsm configuration set 选项](https://help.tableau.com/v0.0/server-linux/zh-cn/cli_configuration-set_tsm.htm)。

### 共享 LDAP 选项

可以为通用 LDAP、OpenLDAP 或 Active Directory 实现设置以下选项。

bind

将身份验证通信从 Tableau Server 服务传递到 LDAP 目录服务的所需方式。为 GSSAPI (Kerberos) 输入 `gssapi`。

domain

在 Active Directory 环境中，指定安装 Tableau Server 所在的域，例如“example.lan”。

对于非 AD LDAP：您为此值输入的字符串显示在用户管理工具的“域”列中。您可以输入任意字符串，但键不能为空。

root

仅限 LDAP。不要为 Active Directory 指定。

如果不在 LDAP 根中使用 dc 组件，或者要指定更复杂的根，您需要设置 LDAP 根。使用“o=my,u=root”格式。例如，对于域 `example.lan`，根将为 `"o=example,u=lan"`。

membersRetrievalPageSize

此选项确定 LDAP 查询返回的最大结果数。

例如，假设有这样一种场景：Tableau Server 正在导入包含 50,000 名用户的 LDAP 组。尝试在一次操作中导入如此大量的用户不是最佳做法。此选项设置为 1500 时，Tableau Server 会在第一次响应中导入前 1500 名用户。处理了这些用户之后，Tableau Server 将从 LDAP 服务器请求接下来的 1500 名用户，依此类推。

我们建议只有在要适应 LDAP 服务器的需求时才修改此选项。

### `identityStoreSchemaType` 选项

如果配置与 LDAP 服务器的 LDAP 连接，您可以在 `identityStoreSchemaType` 对象中输入特定于 LDAP 服务器的架构信息。

**重要信息：**如果连接到 Active Directory (`"directoryServiceType": "activedirectory"`)，则不要配置这些选项。

userBaseFilter

要用于 Tableau Server 用户的筛选器。例如，您可以指定对象类属性和组织单元属性。

userUsername

与 LDAP 服务器上的用户名对应的属性。

userDisplayName

与 LDAP 服务器上的用户显示名称对应的属性。

userEmail

与 LDAP 服务器上的用户电子邮件地址对应的属性。

userCertificate

与 LDAP 服务器上的用户证书对应的属性。

userThumbnail

与 LDAP 服务器上的用户缩略图图像对应的属性。

userJpegPhoto

与 LDAP 服务器上的用户配置文件图像对应的属性。

groupBaseFilter

要用于 Tableau Server 用户组的筛选器。例如，您可以指定对象类属性和组织单元属性。

groupName

与 LDAP 服务器上的组名称对应的属性。

groupEmail

与 LDAP 服务器上的组电子邮件地址对应的属性。

groupDescription

与 LDAP 服务器上的组说明对应的属性。

member

用于描述组中用户列表的属性。

distinguishedNameAttribute

用于存储用户的可分辨名称的属性。此属性是可选属性，但它大大提高了 LDAP 查询的性能。

serverSideSorting

是否为查询结果的服务器端排序配置了 LDAP 服务器。如果您的 LDAP 服务器支持服务器端排序，请将此选项设置为 `true`。如果不确定您的 LDAP 服务器是否支持此功能，请输入 `false`，因为配置不正确可能会导致错误。

rangeRetrieval

LDAP 服务器是否配置为返回请求查询结果的范围。这意味着将以多个小的集合的形式请求包含多个用户的组，而不是一次请求全部。支持范围检索的 LDAP 服务器执行大型查询的性能更出色。如果您的 LDAP 服务器支持范围检索，请将此选项设置为 `true`。如果不确定您的 LDAP 服务器是否支持范围检索，请输入 `false`，因为配置不正确可能会导致错误。

groupClassNames

默认情况下，Tableau Server 会查找包含字符串“group”的 LDAP 组对象类。如果您的 LDAP 组对象不适合默认类名，请通过设置此值来覆盖默认值。您可以提供由逗号分隔的多个类名。此选项采用字符串列表，该列表要求以引号或方括号传递每个 IP 或主机，用逗号（无空格）分隔。例如：`["basegroup","othergroup"]`。

userClassNames

默认情况下，Tableau Server 会查找包含字符串“user”和“inetOrgPerson”的 LDAP 用户对象类。如果您的 LDAP 用户对象不使用这些默认类名，请通过设置此值来覆盖默认值。您可以提供由逗号分隔的多个类名。此选项采用字符串列表，该列表要求以引号或方括号传递每个 IP 或主机，用逗号（无空格）分隔。例如：`["userclass1",userclass2”]`。

## 导入 JSON 文件

编辑完 JSON 文件后，请使用以下命令传递 .json 文件并应用设置：

`tsm settings import -f path-to-file.json`

`tsm pending-changes apply`

如果待定更改需要重新启动服务器，`pending-changes apply` 命令将显示一个提示，告知您将进行重新启动。即使服务器已停止，此提示也会显示，但在这种情况下不会重新启动。您可以使用 `--ignore-prompt` 选项隐藏提示，但这样做不会改变重新启动行为。如果更改不需要重新启动，则会在不提示的情况下应用更改。有关详细信息，请参见[tsm pending-changes apply](https://help.tableau.com/v0.0/server-linux/zh-cn/cli_pending-changes.htm#pending-changes-apply)。