Latest version: 4.3.x
Hive Connector - Kerberos/Jaas & UserPassword
Question
What does a jaas.conf
file have to look like when I use Kerberos and UserPassword configuration with the HiveSinkConnector?
Example Kafka Hive Sink Connector:
connect.hive.security.kerberos.user: someUsername
connect.hive.security.kerberos.password: somePassword
connect.hive.security.kerberos.enabled: true
connect.hive.security.kerberos.auth.mode: "USERPASSWORD"
connect.hive.security.kerberos.krb5: krb5.conf
connect.hive.security.kerberos.jaas: jaas.conf
connect.hive.security.kerberos.jaas.entry.name: "someJaasEntryName"
connect.hive.database.name: someHiveDBName
connect.hive.metastore: "someMetastore"
connect.hive.metastore.uris: someMetastoreURIs
connect.hive.security.principal: "someService/somePrincipal"
connect.hive.security.metastore.principal: "someService/somePrincipal"
connect.hive.fs.defaultFS: someHDFSUrl
connect.hive.hdfs.conf.dir: /some/path/to/hdfs.conf.dir
connect.hive.conf.dir: /some/path/to/hive.conf.dir
topics: "someTopic"
name: someHiveSinkConnector
value.converter: org.apache.kafka.connect.json.JsonConverter
value.converter.schemas.enable: true
connect.hive.kcql: "..."
Answer
In order for the connector to pass the credentials in the JAAS file, the Jaas file must have the following key/value
doNotPrompt=false
Example Jaas
{
com.sun.security.auth.module.Krb5LoginModule required
debug=true
doNotPrompt=false
useKeyTab=false
storeKey=true
serviceName="someService";
}