Keytab authorization throws NPE in case of the keytab not being keytab. Like using credentials file but specifying keytab.
To Reproduce
Steps to reproduce the behavior OR commands run:
Run std or conf with --menas-auth-keytab pointing to a plain file or anything else
Get error
Expected behaviour
I would expect an error like Couldn't extract credentials from keytab or something similar.
Stack
19/11/06 07:08:33 INFO state.StateStoreCoordinatorRef: Registered StateStoreCoordinator endpoint
Exception in thread "main" java.lang.NullPointerException
at za.co.absa.enceladus.dao.menasplugin.MenasAuthUtils.getKerberosCredentias(MenasAuthUtils.scala:50)
at za.co.absa.enceladus.dao.menasplugin.MenasKerberosCredentials$.fromFile(MenasCredentials.scala:55)
at za.co.absa.enceladus.dao.menasplugin.MenasKerberosCredentialsFactory.getInstance(MenasCredentialsFactory.scala:43)
at za.co.absa.enceladus.standardization.StandardizationJob$.main(StandardizationJob.scala:61)
at za.co.absa.enceladus.standardization.StandardizationJob.main(StandardizationJob.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:845)
at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:161)
at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:184)
at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:86)
at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:920)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:929)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
19/11/06 07:08:35 INFO spark.SparkContext: Invoking stop() from shutdown hook
Describe the bug
Keytab authorization throws NPE in case of the keytab not being keytab. Like using credentials file but specifying keytab.
To Reproduce
Steps to reproduce the behavior OR commands run:
--menas-auth-keytab
pointing to a plain file or anything elseExpected behaviour
I would expect an error like
Couldn't extract credentials from keytab
or something similar.Stack