stackabletech / stackabletech/hdfs-operator

Incorrect Kerberos principals are created when external-* listener is configured on namenode

Aperta
#712 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

type/bug
Lingua principale
Rust
Stelle
53
Fork
9
Merge medio
1g 13h
PR unite (30g)
10

Descrizione

Affected Stackable version

25.3

Affected Apache HDFS version

3.4.1

Current and expected behavior

The behaviour occurs when a listenerClass of either external-unstable or external-stable is configured on the namenodes. The kerberos principals added to the namenode keytab containing the IP address of the nodes on which the NodePort is created and not the listener address as expected.

core-site.xml still contains the listener address as expected.

  <property>
    <name>dfs.web.authentication.kerberos.principal</name>
    <value>HTTP/listener-hdfs-namenode-default-0.default.svc.cluster.local@${env.KERBEROS_REALM}</value>
  </property>

This means that connections to the namenode fail since the expected Kerberos principal for the listener address is not present in the namenode keytab.

Current behaviour

The namenode keytab contains principals with the host set to the node IP.

stackable@hdfs-namenode-default-1 /stackable/hadoop-3.4.1 $ klist -kt ../kerberos/keytab
Keytab name: FILE:../kerberos/keytab
KVNO Timestamp         Principal
---- ----------------- --------------------------------------------------------
   1 09/10/25 07:28:05 nn/172.21.0.3@KNAB.COM
   1 09/10/25 07:28:05 nn/172.21.0.3@KNAB.COM
   1 09/10/25 07:28:05 nn/hdfs.default.svc.cluster.local@KNAB.COM
   1 09/10/25 07:28:05 nn/hdfs.default.svc.cluster.local@KNAB.COM
   1 09/10/25 07:28:05 HTTP/172.21.0.3@KNAB.COM
   1 09/10/25 07:28:05 HTTP/172.21.0.3@KNAB.COM
   1 09/10/25 07:28:05 HTTP/hdfs.default.svc.cluster.local@KNAB.COM
   1 09/10/25 07:28:05 HTTP/hdfs.default.svc.cluster.local@KNAB.COM

Expected behaviour

The namenode keytab contains principals with the host set to the listener address.

stackable@hdfs-namenode-default-0 /stackable/hadoop-3.4.1 $ klist -kt ../kerberos/keytab
Keytab name: FILE:../kerberos/keytab
KVNO Timestamp         Principal
---- ----------------- --------------------------------------------------------
   1 09/10/25 09:33:33 nn/listener-hdfs-namenode-default-0.default.svc.cluster.local@KNAB.COM
   1 09/10/25 09:33:33 nn/listener-hdfs-namenode-default-0.default.svc.cluster.local@KNAB.COM
   1 09/10/25 09:33:33 nn/hdfs.default.svc.cluster.local@KNAB.COM
   1 09/10/25 09:33:33 nn/hdfs.default.svc.cluster.local@KNAB.COM
   1 09/10/25 09:33:33 HTTP/listener-hdfs-namenode-default-0.default.svc.cluster.local@KNAB.COM
   1 09/10/25 09:33:33 HTTP/listener-hdfs-namenode-default-0.default.svc.cluster.local@KNAB.COM
   1 09/10/25 09:33:33 HTTP/hdfs.default.svc.cluster.local@KNAB.COM
   1 09/10/25 09:33:33 HTTP/hdfs.default.svc.cluster.local@KNAB.COM
Possible solution

No response

Additional context

No response

Environment

No response

Would you like to work on fixing this bug?

None

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia tracciando in che modo le impostazioni external-unstable ed external-stable di listenerClass influiscono sulla generazione del principal e del keytab di namenode. Confronta l’indirizzo del listener configurato con i principal mostrati da klist e con l’indirizzo conservato in core-site.xml. Il lavoro è completato quando il keytab contiene i principal nn e HTTP per l’indirizzo del listener e le connessioni hanno esito positivo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
kubernetes, rust
Ambito
authentication, backend, distributed-systems, security
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.