---
schema_version: "1"
id: c378eed52b1850db5b488a4b93184cf61764e2be8ddd4f363367c09b03a18f84
title: openIDSettings 實體
collection: tableau
version: next
locale: zh-tw
portal_url: https://docs.salesforce.com/tableau/next/zh-tw/server/entity_openid.md
canonical_url: https://help.tableau.com/v0.0/server/zh-tw/entity_openid.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 0edf4cc718293c235d98742c315ebe298f9f63f58ea6bfcdd5917c5188bf3361
description: Reference for the openIDSettings entity to configure OpenID Connect authentication via JSON.
---
[跳至主要內容](#main-content)

# openIDSettings 實體

在設定 OpenID 驗證之前，請檢閱[使用 OpenID Connect 的要求](https://help.tableau.com/v0.0/server/zh-tw/openid_auth_requirements.htm)。

使用下面的組態檔範本建立一個 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/zh-tw/cli_pending-changes.htm#pending-changes-apply)。

## 組態範本

使用此範本來設定 OpenID 設定。

**重要事項**所有實體選項均大小寫視為相異。

有關組態檔、實體和金鑰的更多說明，請參閱[組態檔範例](https://help.tableau.com/v0.0/server/zh-tw/config_file_example.htm)。

完成 OIDC 的初始設定之後，使用 [tsm authentication openid <commands>](https://help.tableau.com/v0.0/server/zh-tw/cli_authentication_tsm.htm#TSMOIDC) 子類別來設定其他值。

{
	"configEntities": {
	    "openIDSettings": {
		"\_type": "openIDSettingsType",
		"enabled": true,
		"clientId": "required",
		"clientSecret": "required",
		"configURL": "required if staticFile value is not set",
		"staticFile": "required if configURL value is not set",
		"externalURL": "required"
		}
	  }
}		

## 組態檔參考

以下清單包括可隨 `"openIDSettings"` 實體集一起包括的所有選項。

\_type

必需。

請不要變更。

enabled

必需。

設定為 `true`。

clientId

必需。

指定 IdP 已指派給您的應用程式的提供者用戶端 ID。例如，`“laakjwdlnaoiloadjkwha"`。

clientSecret

必需。

指定提供者用戶端密碼。這是 Tableau 用於驗證來自 IdP 的響應的真實性的權杖。此值是密碼，應妥善保管。

例如，`“fwahfkjaw72123="`。

configURL

必需。

指定提供者組態 URL。如果不指定設定 URL，則刪除此選項，並改為指定 `staticFile` 的路徑和檔案名。

staticFile

必需。

指定靜態 OIDC 發現 JSON 檔的本機路徑。如果不指定靜態檔，則刪除此選項，並改為指定 `configURL` 的 URL。

externalURL

必需。

伺服器的 URL。這通常是您的伺服器的公共名稱，例如 `http://example.tableau.com`。

connectionTimeout

可選。

指定連線逾時範圍（以秒為單位）。預設值為 `10`。

readTimeout

可選。

指定讀取超時範圍（以秒為單位）。預設值為 `30`。

ignoreDomain

如果滿足以下條件，請將此項設定為 `true`：

- 您使用電子郵寄位址作為 Tableau Server 中的使用者名
- 您在 IdP 中設定了具有多個功能變數名稱的使用者
- 您想要從 IdP 中忽略 `email` 宣告的網功能變數名稱稱部分

在繼續之前，請檢查由於將此選項設定為 `true` 而使用的使用者名。可能會發生使用者名衝突。如果發生使用者名衝突，資訊洩露的風險將很高。請參閱[使用 OpenID Connect 的要求](https://help.tableau.com/v0.0/server/zh-tw/openid_auth_requirements.htm)。

ignoreJWK

如果您的 IdP 不支援 JWK 驗證，請將此項設定為 `true`。在這種情況下，我們建議使用相互 TLS 或另一種網路層安全通訊協定向 IdP 驗證通訊的身分。預設值為 `false`。

customScope

指定可用於查詢 IdP 的自訂範圍使用者相關值。請參閱[使用 OpenID Connect 的要求](https://help.tableau.com/v0.0/server/zh-tw/openid_auth_requirements.htm)。

idClaim

如果您的 IdP 不支援使用 `sub` 宣告在 ID 權杖中唯一標識使用者，請變更此值。您指定的 IdP 宣告應包含單個唯一的字串。

usernameClaim

將此值變更為組織將使用的 IdP 宣告以與 Tableau Server 中儲存的使用者名匹配。

clientAuthentication

指定 OpenID Connect 的自訂用戶端驗證方法。

若要將 Tableau Server 設定為使用 Salesforce IdP，請將此值設定為 `client_secret_post`。

iFramedIDPEnabled

設定為 `true` 以允許 IdP 顯示在 iFrame 中。IdP 必須停用 Clickjack 保護才能允許進行 iFrame 展示。