AbsaOSS / AbsaOSS/enceladus

Invalid keytab file throws NPE

Offen
#1,010 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug Conformance priority: undecided Standardization
Vorherrschende Sprache
Scala
Sterne
33
Forks
16
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

## 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
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
scala, spark
Bereich
authentication, security
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.