Keytab 要件の理解

Kerberos 認証はキータブファイルと呼ばれる特別に書式設定されたファイルに保存されている認証資格情報に依存します。Tableau Server 展開向けにキータブファイルを生成する必要がある場合があります。このトピックでは、Tableau Server が一般的な組織内での様々なサービスにアクセスする際に使用するキータブファイルについて説明しています。Tableau Server を次のサービスに統合するには、キータブを生成しなければならない場合があります。

  • Windows Active Directory でのユーザー認証 (SSO)
  • データ ソースの委任
  • オペレーティング システム
  • ディレクトリ サービス

重要: Tableau Server 2021.2.25、2021.3.24、2021.4.19、2022.1.15、2022.3.7、および 2023.1.3 (またはそれ以降) では、keytab ファイルが AES-128 暗号または AES-256 暗号を使用して作成されていることを確認してください。RC4 暗号と 3DES 暗号はサポートされなくなりました。詳細については、Tableau ナレッジ ベースの「Tableau Server が自分を自動的に認証できない」(新しいウィンドウでリンクが開く)を参照してください。

組織内に Id、認証、および/またはセキュリティを扱う IT 専門家がいる場合は、彼らと共に Tableau Server 展開のための適切なキータブの生成計画を作成するべきです。

Windows Active Directory でのユーザー認証 (SSO)

Active Directory を Tableau Server のアイデンティティ ストアとして使用し、ユーザーに Kerberos SSO で認証することを求める場合は、Tableau Server 用のキータブファイルを生成する必要があります。

Tableau が...で実行されている。キータブを手動生成する必要がありますか?
Active Directory ドメイン内の Windowsはい
Active Directory ドメイン内の Linuxはい
非 Active Directory 環境内の Windows または LinuxKerberos SSO はサポートされているシナリオではありません。

以下の推奨に従ってください(Windows および Linux バージョンの Tableau Server 向け):

  • サービス アカウントを Tableau Server のディレクトリに作成する。

  • Tableau Server アカウント向けにキータブ ファイルを作成します。PC アカウント/OS が認証に使用するキータブファイルを再利用しないでください。同じ Kerberos SSO 向けキータブを、上記シナリオでディレクトリ認証に対して使用するのと同じように使用できます。

  • サービスプリンシパル名 (SPN) を Tableau Server サービスの Active Directory に作成する必要があります。

  • 次のセクションのバッチファイルを使用して SPN およびキータブファイルを作成します。

  • SPN の作成後、キータブファイルを Kerberos の構成に記載されているようにアップロードします。

バッチファイル: SPN を設定してキータブを Active Directory に作成します。

バッチファイルを使用してサービスプリンシパル名(SPN)を設定しキータブファイルを作成できます。これらの操作は、Active Directory で実行されている (Windows または Linux 上の) Tableau Server 向け Kerberos SSO を有効にするためのプロセスの一部です。

以前のバージョンの Tableau Server(2018.2 以前)、構成スクリプトは Tableau Server 構成ユーティリティから生成されました。

構成スクリプトを生成するには、以下のバッチファイルコンテンツをコピーしてテキストファイルに貼り付けます。バッチファイルは Tableau Server のサービスプリンシパル名(SPN)を作成して、ファイルに指定したユーザー向けのキータブファイルを作成します。

ファイル内容の指示に従います。ファイルのカスタマイズ完了後、.bat ファイルとして保存します。

このファイルは定義域管理者により Active Directory 定義域で実行される必要があります。定義域管理者はファイルで指定したアカウントのサービス アカウント パスワードをプロンプト表示で通知されます。

このバッチ ファイルでは、Windows の set(新しいウィンドウでリンクが開く)setspn(新しいウィンドウでリンクが開く)、および ktpass(新しいウィンドウでリンクが開く) コマンドを使用します。

: 以下のバッチ ファイルは自己文書化されたものです。ただし、Kerberos の使用やキータブ ファイルの生成の経験がない場合は、続行する前に Microsoft ブログ投稿「All you need to know about Keytab files」(新しいウィンドウでリンクが開く)を読むことをお勧めします。組織内の環境設定によっては、ktpass コマンドの追加の構成が必要になる場合があります。たとえば、/crypto パラメーターの設定を決定する必要があります。KDC で必要とされる単一の /crypto 値を指定することをお勧めします。/crypto パラメーターでサポートされている値の完全なリストについては、Microsoft 記事「ktpass」(新しいウィンドウでリンクが開く)を参照してください。

SPN およびキータブ バッチファイル コンテンツ

Tableau Server 2022.3、2022.1.8、2021.4.12、2021.3.17、2021.2.18、2021.1.20、2020.4.23 以降

@echo off
setlocal EnableDelayedExpansion

REM ******* 

REM This script generates the Service Principal Names (SPNs) and keytab files required for 
REM Kerberos SSO with Apache.
REM This script executes set, setspn, and ktpass commands included in any Windows Server 
REM Operating System from 2003 on.
REM Before running this script you must enter configuration information for the setspn and 
REM ktpass commands. 
REM Elements that require your configuration information are enclosed in as such:
REM  ! -- and --!. 
REM After you customize this file, save it as a .bat file, and run on a domain-joined 
REM computer. 
REM This script must be run by a Domain admin.

REM **********

REM The following set command will prompt the domain admin for credentials of the 
REM Tableau Server service account. 
REM This account must be a valid domain user account.
REM If the password contains a literal \" (blackslash - double quote), all backslashes 
REM immediately before the double quote must be
REM duplicated when typed for the password to work, e.g. if password contains 
REM  \" replace with \\", if passwords contains \\" replace with \\\\"

set /p adpass= "Enter password for the Tableau Server service account."
set adpass=!adpass:"=\"!

REM **********

REM The following setspn commands create the SPN in the domain.
REM More information on setspn can be found here: 
REM http://technet.microsoft.com/en-us/library/cc731241(WS.10).aspx  
REM Enter the canonical FQDN and the host names for Tableau Server followed by the  
REM Tableau Server service account name.
REM Use this syntax: HTTP/hostname domain\service_account_name.
REM The example below shows syntax for a computer named "tableau01" in the "example.lan"  
REM domain, with service account, "tab-serv-account":
REM setspn -s HTTP/tableau01 example\tab-serv-account
REM setspn -s HTTP/tableau01.example.lan example\tab-serv-account  
REM DNS and AD are not case sensitive, but the keytab files are.  Verify that host names  
REM match letter case as stored in DNS. 
REM Use Windows Server's DNS Manager utility to verify host name case.

REM **********

echo Creating SPNs...
setspn -s HTTP/!--replace with canonical host name and service account --!
setspn -s HTTP/!--replace with canonical FQDN and service account --!

REM **********

REM The following commands create the keytab file in the same directory where the 
REM bat file is run. More information on ktpass can be found here: 
REM https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/ktpass 
REM Note: keytab files are case-sensitive.
REM The realm following the FQDN should be all uppercase.
REM Syntax is:
REM ktpass /princ HTTP/!--FQDN--!@!--Kerberos_Realm--! /pass !adpass!
REM /pttype KRB5_NTPRINCIPAL /crypto !--cipher--! /out keytabs\kerberos.keytab
REM Best practice: specify the /crypto value that is required by your KDC. 
REM Options for /crypto = {DES-CBC-CRC|DES-CBC-MD5|AES256-SHA1|AES128-SHA1|All}
REM Do not specify /crypto All because it will result in a keytab that contains ciphers that are not supported
REM and cause errors.
REM When using AES256-SHA1 OR AES128-SHA1, the /mapuser option must be included 
REM in the ktpass command to ensure the keytab file is mapped properly to the user. For example:
REM ktpass /princ HTTP/!--FQDN--!@!--Kerberos_Realm--! /pass !adpass! /ptype KRB5_NT_PRINCIPAL /mapuser <domain\username> /crypto AES256-SHA1 /out keytabs\kerberos.keytab
REM The following example shows the ktpass syntax with the example.lan configuration from above:
REM ktpass /princ HTTP/!--FQDN--!@!--Kerberos_Realm--! /pass !adpass! /ptype KRB5_NT_PRINCIPAL /crypto DES-CBC-CRC /out keytabs\kerberos.keytab
					
REM **********

echo Creating Keytab files in %CD%\keytabs
mkdir keytabs
ktpass /princ HTTP/!--FQDN--!@!--Kerberos_Realm--! /pass !adpass! /ptype KRB5_NT_PRINCIPAL /crypto DES-CBC-CRC /out keytabs\kerberos.keytab

Tableau Server の以前のバージョンの場合

@echo off
setlocal EnableDelayedExpansion

REM ******* 

REM This script generates the Service Principal Names (SPNs) and keytab files required for 
REM Kerberos SSO with Apache.
REM This script executes set, setspn, and ktpass commands included in any Windows Server 
REM Operating System from 2003 on.
REM Before running this script you must enter configuration information for the setspn and 
REM ktpass commands. 
REM Elements that require your configuration information are enclosed in as such:
REM  ! -- and --!. 
REM After you customize this file, save it as a .bat file, and run on a domain-joined 
REM computer. 
REM This script must be run by a Domain admin.

REM **********

REM The following set command will prompt the domain admin for credentials of the 
REM Tableau Server service account. 
REM This account must be a valid domain user account.
REM If the password contains a literal \" (blackslash - double quote), all backslashes 
REM immediately before the double quote must be
REM duplicated when typed for the password to work, e.g. if password contains 
REM  \" replace with \\", if passwords contains \\" replace with \\\\"

set /p adpass= "Enter password for the Tableau Server service account."
set adpass=!adpass:"=\"!

REM **********

REM The following setspn commands create the SPN in the domain.
REM More information on setspn can be found here: 
REM http://technet.microsoft.com/en-us/library/cc731241(WS.10).aspx  
REM Enter the canonical FQDN and the host names for Tableau Server followed by the  
REM Tableau Server service account name.
REM Use this syntax: HTTP/hostname domain\service_account_name.
REM The example below shows syntax for a computer named "tableau01" in the "example.lan"  
REM domain, with service account, "tab-serv-account":
REM setspn -s HTTP/tableau01 example\tab-serv-account
REM setspn -s HTTP/tableau01.example.lan example\tab-serv-account  
REM DNS and AD are not case sensitive, but the keytab files are.  Verify that host names  
REM match letter case as stored in DNS. 
REM Use Windows Server's DNS Manager utility to verify host name case.

REM **********

echo Creating SPNs...
setspn -s HTTP/!--replace with canonical host name and service account --!
setspn -s HTTP/!--replace with canonical FQDN and service account --!

REM **********

REM The following commands create the keytab file in the same directory where the 
REM bat file is run. More information on ktpass can be found here: 
REM https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/ktpass 
REM Note: keytab files are case-sensitive.
REM The realm following the FQDN should be all uppercase.
REM Syntax is:
REM ktpass /princ HTTP/!--FQDN--!@!--Kerberos_Realm--! /pass !adpass!
REM /pttype KRB5_NTPRINCIPAL /crypto !--cipher--! /out keytabs\kerberos.keytab
REM Best practice: specify the /crypto value that is required by your KDC. 
REM Options for /crypto = {DES-CBC-CRC|DES-CBC-MD5|RC4-HMAC-NT|AES256-SHA1|AES128-SHA1|All}
REM Specifying /crypto All will result in passwords stored with RC4 cipher, which is
REM no longer considered secure.
REM When using AES256-SHA1 OR AES128-SHA1, the /mapuser option must be included 
REM in the ktpass command to ensure the keytab file is mapped properly to the user. For example:
REM ktpass /princ HTTP/!--FQDN--!@!--Kerberos_Realm--! /pass !adpass! /ptype KRB5_NT_PRINCIPAL /mapuser <domain\username> /crypto AES256-SHA1 /out keytabs\kerberos.keytab
REM The following example shows the ktpass syntax with the example.lan configuration from above:
REM ktpass /princ HTTP/!--FQDN--!@!--Kerberos_Realm--! /pass !adpass! /ptype KRB5_NT_PRINCIPAL /crypto DES-CBC-CRC /out keytabs\kerberos.keytab
					
REM **********

echo Creating Keytab files in %CD%\keytabs
mkdir keytabs
ktpass /princ HTTP/!--FQDN--!@!--Kerberos_Realm--! /pass !adpass! /ptype KRB5_NT_PRINCIPAL /crypto DES-CBC-CRC /out keytabs\kerberos.keytab

オペレーティング システム

所属する組織が Kerberos を認証に使用している場合は、Tableau Server が実行されている PC はそれが実行されている Kerberos のアドレス体系で認証される必要があります。

Tableau が...で実行されている。キータブを手動生成する必要がありますか?
Active Directory ドメイン内の Windowsいいえ
Active Directory ドメイン内の Linuxはい
非 Active Directory 環境内の Windows または Linuxはい

Tableau Server on Windows を実行していて、PC が Active Directory に参加している場合は、オペレーティング システム用のキータブ ファイルを管理または生成する必要はありません。

Tableau Server を Linux の Kerberos アドレス体系(MIT KDC または Active Directory)で実行している場合は、その PC のオペレーティングシステム専用のキータブファイルを生成する必要があります。PC 向けに作成したキータブは OS 認証専用です。OS 認証用と同じキータブファイルを、本トピックの後半で説明するその他サービスに使用しないでください。

ディレクトリ サービス

所属する組織が LDAP または Active Directory などのディレクトリ サービスを使用して、ユーザー アイデンティティを管理している場合、Tableau Server はそのディレクトリへの読み取り専用アクセスが必要です。

あるいは、Tableau Server をローカルアイデンティティストアとともにインストールしてすべてのアカウントを管理するように構成できます。この場合、キータブは不要です。

以下の表はキータブ要件をまとめています。

Tableau が...で実行されている。ディレクトリ サービスキータブを手動生成する必要がありますか?
AD 定義域での WindowsActive Directoryいいえ
WindowsLDAP (GSSAPI バインド)はい
LinuxActive Directory または LDAP (GSSAPI バインド)はい
Windows または LinuxActive Directory または LDAP (シンプル バインド)いいえ
Windows または Linuxローカル アイデンティティ ストアキータブは必要ありません。

このシナリオでキータブを手動生成する必要がある場合は、ディレクトリへの GSSAPI バインド用に使用します。以下の推奨に従ってください。

  • サービス アカウントを Tableau Server のディレクトリに作成する。

  • Tableau Server アカウント向けにキータブ ファイルを作成します。PC アカウント/OS が認証に使用するキータブファイルを再利用しないでください。

  • キータブファイルを Tableau Server アイデンティティ ストアの json 構成の一部としてアップロードします。identityStore エンティティを参照してください。

災害復旧計画の一環として、Tableau Server 外部の安全な場所にキータブと conf ファイルのバックアップを保存することをお勧めします。Tableau Server に追加するキータブと conf ファイルは、クライアント ファイル サービスによって他のノードに格納および配布されます。ただし、ファイルは復元可能な形式では格納されません。Tableau Server クライアント ファイル サービスを参照してください。

データソース委任

Kerberos 委任を使用して Active Directory にあるデータソースにアクセスすることも可能です。このシナリオでは、ユーザーは任意のサポートされている認証機構(SAML、ローカル認証、Kerberos など)で Tableau Server に認証されますが、Kerberos により有効化されたデータソースにアクセスできます。

以下の推奨に従ってください。

  • Tableau Server (Windows または Linux) のコンピューター アカウントは、Active Directory ドメイン内にある必要があります。

  • Kerberos 委任に使用するキータブ ファイルは、Kerberos ユーザー認証 (SSO) に使用する同じキータブであることが可能です。

  • キータブは Active Directory での Kerberos 委任のサービス プリンシパルにマップされる必要があります。

  • 同じキータブを複数のデータソースに作成できます。

詳細については、次の構成トピックを参照してください。

フィードバックをありがとうございます。フィードバックは正常に送信されました。ありがとうございます!