I am new to Spring Boot and CF but I have a spring boot application running which needs Kerberos Authentication to connect to HIVE. I have a keytab and I have given it the path of "src/resources..." when I run it in my local machine, and it runs without a problem! But when I migrate this to Cloud Foundry, I have given it the path of "/home/vcap/..." which should be the right path for it to grab the keytab from. I am also running this:
System.setProperty("java.security.krb5.conf", PropertiesUtils.getProperty("KRB5_ENV"));
System.setProperty("security.auth.login.config", PropertiesUtils.getProperty("JAAS_CONF"));
for me to authenticate with the keytab. The JAAS config file has the location of the and the principal as well. I am getting this error when I am executing the application in Cloud Foundry
java.sql.SQLException: [Simba][HiveJDBCDriver](500168) Error creating login context using ticket cache: Unable to obtain Principal Name for authentication.
Any help is appreciated! Thank you.