Best practices when using Kerberos
This script executes a utility that protects a cached ticket from vulnerabilities:
beeline-inexima.sh
BASH
# cat beeline-indexima.sh
#!/bin/sh
echo "Kerberos authentication..."
kinit -kt /etc/security/keytabs/hive.service.keytab hive/$(hostname -f)@INDEXIMA.CO
klist
echo "------------------------------------------------------------"
echo "Start beeline for INDEXIMA..."
beeline -u "jdbc:hive2://$(hostname -f):12000/default;principal=hive/$(hostname -f)@INDEXIMA.CO;auth=kerberos"
echo "------------------------------------------------------------"
#echo "Protect the cached ticket..."
kdestroy
echo "done"