AbsaOSS / AbsaOSS/enceladus

Invalid keytab file throws NPE

Ouverte
#1,010 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
bug Conformance priority: undecided Standardization
Langage dominant
Scala
Étoiles
33
Forks
16
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

## 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:
1. Run std or conf with `--menas-auth-keytab` pointing to a plain file or anything else
2. 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
```

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start at MenasAuthUtils.scala:50, then follow the call from MenasCredentials.scala:55. Reproduce the failure by passing a plain file to --menas-auth-keytab in a standard or conf run. Done means invalid keytab input reports a clear credentials-extraction error instead of throwing a NullPointerException.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
scala, spark
Domaine
authentication, security
Type d'issue
Bug
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.