Create keytab file linux

Create keytab file linux

You can use the same user account for authentication on all nodes of a cluster. To do so, you must create a keytab file containing the service principal name (SPN) for each of these nodes.

Unique ID of the service in the network for authentication over the Kerberos protocol.

File containing pairs of unique names (principals) for clients who are permitted to use Kerberos authentication, and encrypted keys obtained from the Kerberos password. Keytab files are used in remote systems which support Kerberos for authenticating users without the need to enter a password.

To create a keytab file:

  1. On the domain controller server, create a user account named control- in the Active Directory Users and Computers snap-in.
  2. If you want to use the AES256-SHA1 encryption algorithm, do the following in the Active Directory Users and Computers snap-in:
    1. Open the properties of the created account.
    2. On the Account tab, select the This account supports Kerberos AES 256 bit encryption check box.
  3. Create a keytab file for the user named control- . To do so, run the following command in the command line:

    C:\Windows\system32\ktpass.exe -princ HTTP/ @ -mapuser control- @ -crypto -ptype KRB5_NT_PRINCIPAL -pass > -out C:\control- .keytab

    Example name of a node: node01.test.local@TEST.LOCAL

    The SPN of the node with role Control will be added to the created keytab file.

    For each node of the cluster, add an SPN entry to the keytab file. To do so, run the following command:

    C:\Windows\system32\ktpass.exe -princ HTTP/ @ -mapuser control- @ -crypto -ptype KRB5_NT_PRINCIPAL -pass > -in C:\control- .keytab -out C:\control- .keytab -setupn -setpass

    A keytab file named C:\control- .keytab will be created. This file will contain all added SPNs of cluster nodes.

    For example, you created a file named control-tmp1.keytab when completing step 3. In this case, to add one more SPN, you must run the following command:

    C:\Windows\system32\ktpass.exe -princ HTTP/ @ -mapuser control- @ -crypto -ptype KRB5_NT_PRINCIPAL -pass > -in C:\control-tmp1.keytab -out C:\control-tmp2.keytab -setupn -setpass

    To add a third SPN, you must run the following command:

    C:\Windows\system32\ktpass.exe -princ HTTP/ @ -mapuser control- @ -crypto -ptype KRB5_NT_PRINCIPAL -pass > -in C:\control-tmp2.keytab -out C:\control-tmp3.keytab -setupn -setpass

    This will result in the creation of a file named control-tmp3.keytab containing all three added SPNs.

    Источник

    Create keytab file linux

    Вы можете использовать одну учетную запись для аутентификации на всех узлах кластера. Для этого требуется создать keytab-файл, содержащий имя субъекта-службы (далее также «SPN») для каждого из этих узлов.

    Уникальный идентификатор службы в сети для проверки подлинности по протоколу Kerberos.

    Файл, содержащий пары уникальных имен (principals) для клиентов, которым разрешается Kerberos-аутентификация, и зашифрованные ключи, полученные из пароля Kerberos. Keytab-файлы используются в удаленных системах, поддерживающих Kerberos, для аутентификации пользователей без ввода пароля.

    Чтобы создать keytab-файл, выполните следующие действия:

    1. На сервере контроллера домена в оснастке Active Directory Users and Computers создайте учетную запись пользователя с именем control- .
    2. Если вы хотите использовать алгоритм шифрования AES256-SHA1, то в оснастке Active Directory Users and Computers выполните следующие действия:
      1. Откройте свойства созданной учетной записи.
      2. На закладке Account установите флажок This account supports Kerberos AES 256 bit encryption .
    3. Создайте keytab-файл для пользователя control- . Для этого в командной строке выполните следующую команду:

      C:\Windows\system32\ktpass.exe -princ HTTP/ @ -mapuser control- @ -crypto -ptype KRB5_NT_PRINCIPAL -pass > -out C:\control- .keytab

      Пример ввода имени узла: node01.test.local@TEST.LOCAL

      В созданный keytab-файл будет добавлено SPN Управляющего узла.

      Для каждого узла кластера добавьте в keytab-файл запись SPN. Для этого выполните следующую команду:

      C:\Windows\system32\ktpass.exe -princ HTTP/ @ -mapuser control- @ -crypto -ptype KRB5_NT_PRINCIPAL -pass > -in C:\control- .keytab -out C:\control- .keytab -setupn -setpass

      Keytab-файл с именем C:\control- .keytab будет создан. Этот файл будет содержать все добавленные SPN узлов кластера.

      Например, при выполнении шага 3 вы создали файл под названием control-tmp1.keytab . Тогда для добавления еще одного SPN необходимо выполнить следующую команду:

      C:\Windows\system32\ktpass.exe -princ HTTP/ @ -mapuser control- @ -crypto -ptype KRB5_NT_PRINCIPAL -pass > -in C:\control-tmp1.keytab -out C:\control-tmp2.keytab -setupn -setpass

      Для добавления третьего SPN необходимо выполнить следующую команду:

      C:\Windows\system32\ktpass.exe -princ HTTP/ @ -mapuser control- @ -crypto -ptype KRB5_NT_PRINCIPAL -pass > -in C:\control-tmp2.keytab -out C:\control-tmp3.keytab -setupn -setpass

      В результате будет создан файл с именем control-tmp3.keytab , содержащий все три добавленные SPN.

      Источник

      Kerberos

      Содержание

      Kerberos

      Kerberos это система сетевой аутентифиации, основанная на принципах доверия третьей стороне. Другие две стороны — это пользователь и сервис, на котором он хочет авторизоваться. Не все сервисы и приложения могут использовать Kerberos, но те, которые могут, приближают сетевое окружение на один шаг к технологии единого входа (Single Sign On — SSO).

      Этот раздел раскрывает установку и настройку сервера Kerberos, а также некоторые примеры клиентских настроек.

      Обзор

      Если вы новичок в Kerberos, есть несколько терминов, которые хорошо понять до установки сервера Kerberos. Большинство терминов связаны с вещами, которые могут быть вам знакомы по другим окружениям:

      Учетная запись (Principal): любые пользователи, компьютеры или сервисы, предоставляемые серверами, должны быть определены как учетные записи Kerberos .

      Требования (Instances): используются для сервисных и специальных административных учетных записей.

      Области (Realms): уникальная область управления, обеспечиваемая установкой Kerberos. Представляйте ее себе как домен или группу ваших компьютеров и пользователей, ей принадлежащих. По умолчанию Ubuntu использует имя DNS домена в верхнем регистре (EXAMPLE.COM) в качестве имени области.

      Центр распространения ключей (KDC): состоит из трех частей: базы данных всех учетных записей, сервера аутентификации и сервера предоставления билетов. Для каждой области должен быть хотя бы один KDC.

      Билет для получения билета (TGT): изданный сервером аутентификации, TGT зашифровывается на пароле пользователя, который известен только пользователю и KDC.

      Сервер распространения билетов (TGS): выпускает сервисные билеты для клиентов по запросу.

      Билеты (Tickets): подтверждение идентичности двух учетных записей. Одна учетная запись — пользователь, а другая — сервис, запрашиваемый этим пользователем. Билеты устанавливают секретный ключ, используемый для защищенного соединения во время авторизованной сессии.

      Файлы ключей (Keytab Files): файлы, извлеченные из базы учетных записей KDC и содержащие ключ шифрования для сервиса или компьютера.

      Чтобы сложить все вместе: Область содержит как минимум один KDC, лучше больше для обеспечения безотказности, которые содержат базу данных учетных записей. Когда пользователь под учетной записью заходит на рабочую станцию, которая настроена на Kerberos аутентификацию, KDC выпускает билет для получения билетов (TGT). Если пользователь предоставляет совпадающие параметры, он считается аутентифицированным и может запрашивать билеты для сервисов, поддерживающих Kerberos, на сервере распространения билетов (TGS). Сервисные билеты позволяют пользователю аутентифицироваться на сервисах без ввода имени и пароля.

      Источник

      Understanding Keytab Requirements

      Kerberos authentication relies on credentials that are stored in specially formatted files called keytab files. You may need to generate keytab files for your Tableau Server deployment. This topic describes the keytab files that Tableau Server uses to access various services in a typical organization. You may need to generate keytabs for Tableau Server to integrate into the following services:

      • User authentication (SSO) in Windows Active Directory
      • Datasource delegation
      • Operating system
      • Directory service

      If your organization includes IT professionals who handle identity, authentication, and/or security, then you should work with them to create a plan for generating appropriate keytabs for your Tableau Server deployment.

      User authentication (SSO) in Windows Active Directory

      If you will be using Active Directory as the identity store for Tableau Server, and you want users to authenticate with Kerberos SSO, then you will need to generate a keytab file for Tableau Server.

      Tableau is running on. Need to manually generate a keytab?
      Windows in Active DirectoryВ domain Yes
      Linux in Active Directory domain Yes
      Windows or Linux in non-Active Directory environment Kerberos SSO is not a supported scenario.

      Follow these recommendations (for Windows and Linux versions of Tableau Server):

      Create a service account in your directory for Tableau Server.

      Create a keytab specifically for the Tableau Server service account. Do not reuse the keytab file that the computer account/OS uses to authenticate. You may use the same keytab for Kerberos SSO as you use for the directory authentication in the scenario above.

      You must create service principal names (SPN) in Active Directory for the Tableau Server service.

      Use the batch file in the next section to create the SPNs and the keytab file.

      After you have created the SPNs, upload the keytab file as described in Configure Kerberos.

      Batch file: Set SPN and create keytab in Active Directory

      You can use a batch file to set the service principal names (SPN) and create a keytab file. These operations are a part of the process to enable Kerberos SSO for Tableau Server (on Windows or Linux) running in Active Directory.

      In previous versions of Tableau Server (before 2018.2), the configuration script was generated from the Tableau Server Configuration utility.

      To generate a configuration script, copy and paste the following batch file contents into a text file. The batch file creates service principal names (SPN) for Tableau Server and will create a keytab file for the user you specify in the file.

      Follow the directions in the file contents. After you have finished customizing the file, save it as a .bat file.

      This file must be run in an Active Directory domain by a Domain admin, who will be prompted for the service account password of the account you specify in the file.

      Note: The batch file below is self-documented. However, if you do not have experience with Kerberos and generating keytab files, we recommend that you read the Microsoft blog post, All you need to know about Keytab files (Link opens in a new window) , before proceeding. Environmental details in your organization may require additional configuration of the ktpass command. For example, you must determine what to set for the /crypto parameter. We recommend specifying a single /crypto value that is required by your KDC. See the Microsoft article, ktpass (Link opens in a new window) for the full list of supported values for the /crypto parameter.

      SPN and keytab batch file contents

      Operating system

      If your organization uses Kerberos for authentication, then the computer where Tableau Server is running must be authenticated with the Kerberos realm in which it’s running.

      Tableau is running on. Need to manually generate a keytab?
      Windows in Active DirectoryВ domain No
      Linux in Active DirectoryВ domain Yes
      Windows or Linux in non-Active Directory environment Yes

      If you are running TableauВ Server on Windows, and the computer is joined to the Active Directory, then you do not need to manage or generate a keytab file for the operating system.

      If you are running Tableau Server on Linux in a Kerberos realm (MITВ KDCВ or Active Directory), then you will need to generate a keytab file specifically for the computer operating system. The keytab you create for the computer should be specifically for OS authentication. Do not use the same keytab file for OSВ authentication that you will be using for the other services described later in this topic.

      Directory service

      If your organization uses a directory service, such as LDAP or Active Directory, to manage user identity, then Tableau Server requires read-only access to the directory.

      Alternatively, you can configure Tableau Server to manage all accounts by installing with a local identity store. In this case, you do not need a keytab.

      The following table summarizes keytab requirements:

      Tableau is running on. Directory service Need to manually generate a keytab?
      Windows in ADВ domain Active Directory No
      Windows LDAP (GSSAPI bind) Yes
      Linux Active Directory or LDAP (GSSAPI bind) Yes
      Windows or Linux Active Directory or LDAP (Simple bind) No
      Windows or Linux Local identity store No keytab required.

      If you need to manually generate a keytab for this scenario, then you will use it for GSSAPI bind to the directory. Follow these recommendations:

      Create a service account in your directory for Tableau Server.

      Create a keytab specifically for the Tableau Server service account. Do not reuse the keytab file that the computer account/OS uses to authenticate.

      Upload the keytab file as part of the json configuration of the Tableau Server identity store. See identityStore Entity.

      As part of your disaster recovery plan, we recommend keeping a backup of the keytab and conf files in a safe location off of the Tableau Server. The keytab and conf files that you add to Tableau Server will be stored and distributed to other nodes by the Client File Service. However, the files are not stored in a recoverable format. See Tableau Server Client File Service.

      Datasource delegation

      You can also use Kerberos delegation to access data sources in an Active Directory. In this scenario, users can be authenticated to Tableau Server with any supported authentication mechanism (SAML, local authentication, Kerberos, etc), but can access datasources that are enabled by Kerberos.

      Follow these recommendations:

      The computer account for Tableau Server (Windows or Linux) must be in Active Directory domain.

      The keytab file that you use for Kerberos delegation can be the same keytab that you use for Kerberos user authentication (SSO).

      The keytab must be mapped to the service principal for Kerberos delegation in Active Directory.

      You may use the same keytab for multiple data sources.

      For more information, see the following configuration topics:

      Источник

      Читайте также:  Linux intel atom wifi driver
Оцените статью