Class KerberosConfig
java.lang.Object
com.norconex.crawler.fs.fetch.impl.hdfs.KerberosConfig
Configuration for Kerberos/SPNEGO authentication against a secured
WebHDFS endpoint. Only used when
HdfsFetcherConfig.setAuthMethod(HdfsAuthMethod) is set to
HdfsAuthMethod.KERBEROS.
Typical usage
At a minimum, you need a valid Kerberos configuration file
(krb5.conf) and either a keytab file or access to the system
ticket cache.
- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanPath to a keytab file containing the principal's key.Path to the Kerberos configuration file (krb5.conf).The JAAS login module name.The Kerberos principal name used for login (e.g.inthashCode()booleanWhether to use the system ticket cache for authentication.setKeytabPath(Path keytabPath) Path to a keytab file containing the principal's key.setKrb5ConfigPath(Path krb5ConfigPath) Path to the Kerberos configuration file (krb5.conf).setLoginModuleName(String loginModuleName) The JAAS login module name.setPrincipal(String principal) The Kerberos principal name used for login (e.g.setUseTicketCache(boolean useTicketCache) Whether to use the system ticket cache for authentication.toString()
-
Constructor Details
-
KerberosConfig
public KerberosConfig()
-
-
Method Details
-
getKrb5ConfigPath
Path to the Kerberos configuration file (krb5.conf). Ifnull, the JVM default is used (e.g./etc/krb5.confon Linux or the value ofjava.security.krb5.conf). -
getKeytabPath
Path to a keytab file containing the principal's key. When set, authentication uses this keytab instead of requiring a password or ticket cache. -
getPrincipal
The Kerberos principal name used for login (e.g.user@REALM). Required when using a keytab file. When not using a keytab, the credentials fromBaseAuthNioFetcherConfig.getCredentials()are used. -
isUseTicketCache
public boolean isUseTicketCache()Whether to use the system ticket cache for authentication. Whentrue, an existing ticket obtained viakinit(or OS-level SSO) is used and no password or keytab is required. Default isfalse. -
getLoginModuleName
The JAAS login module name. Whennull(default), a built-in JAAS configuration is created automatically based on the other properties in this class. Set this only if you have a custom JAAS login configuration file and entry name. -
setKrb5ConfigPath
Path to the Kerberos configuration file (krb5.conf). Ifnull, the JVM default is used (e.g./etc/krb5.confon Linux or the value ofjava.security.krb5.conf).- Returns:
this.
-
setKeytabPath
Path to a keytab file containing the principal's key. When set, authentication uses this keytab instead of requiring a password or ticket cache.- Returns:
this.
-
setPrincipal
The Kerberos principal name used for login (e.g.user@REALM). Required when using a keytab file. When not using a keytab, the credentials fromBaseAuthNioFetcherConfig.getCredentials()are used.- Returns:
this.
-
setUseTicketCache
Whether to use the system ticket cache for authentication. Whentrue, an existing ticket obtained viakinit(or OS-level SSO) is used and no password or keytab is required. Default isfalse.- Returns:
this.
-
setLoginModuleName
The JAAS login module name. Whennull(default), a built-in JAAS configuration is created automatically based on the other properties in this class. Set this only if you have a custom JAAS login configuration file and entry name.- Returns:
this.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-