smengcl commented on pull request #10:
URL: 
https://github.com/apache/ozone-docker-runner/pull/10#issuecomment-1031356088


   
   After some digging, I realized that the reason curl SPNEGO is throwing gss 
error `HTTP/ORG` is that it actually first fails to auth with principal 
`HTTP/scm1.org`. Then as a fallback it tries `HTTP/ORG`. The fallback instance 
name (`ORG`) is the DNS search domain on the node, which can be verified by 
running `hostname -d`. But only the final error is thrown back to the client 
(curl in this case), which is a bit misleading. Such behavior can be observed 
in KDC log:
   
   ```bash
   # Ran on scm1.org: kinit -k HTTP/[email protected] -t 
/etc/security/keytabs/HTTP.keytab
   
   kdc_1        | Feb 07 10:53:46 kdc krb5kdc[7](info): AS_REQ (8 etypes 
{aes256-cts-hmac-sha1-96(18), aes128-cts-hmac-sha1-96(17), 
aes256-cts-hmac-sha384-192(20), aes128-cts-hmac-sha256-128(19), 
DEPRECATED:des3-cbc-sha1(16), DEPRECATED:arcfour-hmac(23), 
camellia128-cts-cmac(25), camellia256-cts-cmac(26)}) 172.25.0.116: ISSUE: 
authtime 1644231226, etypes {rep=aes256-cts-hmac-sha1-96(18), 
tkt=aes256-cts-hmac-sha1-96(18), ses=aes256-cts-hmac-sha1-96(18)}, 
HTTP/[email protected] for krbtgt/[email protected]
   
   # Ran on scm1.org: curl -v --negotiate -u : -I http://scm1.org:9876/
   
   # First tried HTTP/scm1.org -- no match
   kdc_1        | Feb 07 10:54:03 kdc krb5kdc[7](info): TGS_REQ (8 etypes 
{aes256-cts-hmac-sha1-96(18), aes128-cts-hmac-sha1-96(17), 
aes256-cts-hmac-sha384-192(20), aes128-cts-hmac-sha256-128(19), 
DEPRECATED:des3-cbc-sha1(16), DEPRECATED:arcfour-hmac(23), 
camellia128-cts-cmac(25), camellia256-cts-cmac(26)}) 172.25.0.116: 
LOOKING_UP_SERVER: authtime 0, etypes {rep=UNSUPPORTED:(0)} 
HTTP/[email protected] for HTTP/[email protected], Server not found in 
Kerberos database
   
   # Fallback to HTTP/ORG -- still no match. Thrown to the client (curl)
   kdc_1        | Feb 07 10:54:03 kdc krb5kdc[7](info): TGS_REQ (8 etypes 
{aes256-cts-hmac-sha1-96(18), aes128-cts-hmac-sha1-96(17), 
aes256-cts-hmac-sha384-192(20), aes128-cts-hmac-sha256-128(19), 
DEPRECATED:des3-cbc-sha1(16), DEPRECATED:arcfour-hmac(23), 
camellia128-cts-cmac(25), camellia256-cts-cmac(26)}) 172.25.0.116: 
UNKNOWN_SERVER: authtime 0, etypes {rep=UNSUPPORTED:(0)} HTTP/[email protected] 
for krbtgt/[email protected], Server not found in Kerberos database
   ```
   
   Then we would observe curl (with verbose) printing this error message:
   
   ```
   * gss_init_sec_context() failed: : Server krbtgt/[email protected] not found 
in Kerberos database
   ```
   
   However, this issue exists even in the current image version 
(`OZONE_RUNNER_VERSION=20211202-1` with centos 7.6). So this is not likely the 
root cause of `ozonesecure-ha` initialization timeout (that I am observing on 
my Linux box) when running its `test.sh`. There might be something else 
blocking it.
   
   Nonetheless, this seems to be silently breaking other HTTP communication 
between recon and om1/2/3 as I have observed in KDC log as well. Which might 
need to be fixed in 
[ozone-docker-testkrb5](https://github.com/apache/ozone-docker-testkrb5). 
Should just be some simple line addition in 
[`init.sh`](https://github.com/apache/ozone-docker-testkrb5/blame/master/init.sh#L28).
 Then add similar lines in 
[`update-keytabs.sh`](https://github.com/apache/ozone/blob/master/hadoop-ozone/dist/src/main/keytabs/update-keytabs.sh#L33)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to