Skip to main content

KerberosConfig

Kerberos/SPNEGO authentication settings for HDFS WebHDFS access.

Notes

Shared by two fetchers: HdfsFetcher when its authMethod is KERBEROS, and the web HttpClientFetcher when its authentication method is KERBEROS or SPNEGO. servicePrincipalName applies to the web case only.

At a minimum, provide a valid Kerberos configuration (krb5.conf) and one of the following authentication mechanisms:

  • keytab-based login (keytabPath + principal)
  • ticket-cache login (useTicketCache)
  • username/password JAAS login through the fetcher's credentials

When loginModuleName is not set, the crawler creates a built-in JAAS configuration from the provided properties.

Examples

Uses a keytab and principal for non-interactive authentication against HDFS.

class: HdfsFetcher
authMethod: KERBEROS
kerberosConfig:
krb5ConfigPath: /etc/krb5.conf
keytabPath: /etc/security/keytabs/hdfs-user.keytab
principal: hdfs-user@EXAMPLE.COM

Uses whatever ticket is already in the system cache, as left by kinit. No keytab or password is needed, but the ticket has to be kept alive for the length of the crawl.

class: HdfsFetcher
authMethod: KERBEROS
kerberosConfig:
krb5ConfigPath: /etc/krb5.conf
useTicketCache: true

Web crawling against a SPNEGO-protected site, where the service principal identifies the target server.

authMethod: SPNEGO
kerberosConfig:
krb5ConfigPath: /etc/krb5.conf
servicePrincipalName: HTTP/intranet.example.com@EXAMPLE.COM
useTicketCache: true

Usage

Full configuration skeleton, with every option and its default
keytabPath: string
krb5ConfigPath: string
loginModuleName: string
principal: string
servicePrincipalName: string
useTicketCache: false

Properties

PropertyTypeRequiredDefault
keytabPathstringNo-
krb5ConfigPathstringNo-
loginModuleNamestringNo-
principalstringNo-
servicePrincipalNamestringNo-
useTicketCachebooleanNofalse

Property Details

keytabPath

Path to the keytab file containing the principal key. When set, authentication uses this keytab instead of requiring a password or ticket cache.

krb5ConfigPath

Path to the Kerberos configuration file (krb5.conf). When omitted, the JVM default Kerberos configuration is used.

loginModuleName

Optional JAAS login module entry name. When omitted, an internal JAAS configuration is generated automatically.

principal

Kerberos principal name (for example, user@REALM). Required for keytab-based authentication.

servicePrincipalName

Kerberos service principal name (SPN) of the target service, typically in the form HTTP/hostname@REALM or HTTP/hostname.

useTicketCache

Whether the system ticket cache should be used. When enabled, an existing ticket (for example from kinit) is used and no keytab or password is required.