-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snakebite doesn't work with HDFS RPC encryption #8
Comments
Updating this issue with some info about testing done. The
After a lot of tests and debugging comparing the code running https://lists.andrew.cmu.edu/pipermail/cyrus-sasl/2017-March/003002.html So the extra 4 bytes in front are the length of the payload, added by GSS-API. Cyrus Sasl follows a RFC, Java another one. The trick to make everything to work is to:
All the above was to make cyrus sasl to work with RPCs between Client and Namenode, that use GSS-API/kerberos in my case. This makes snakebite to work with calls like So next step is to implement the missing code and see if it works. If so, we'll be able to switch snakebite back to cyrus sasl and finally use it in Hadoop clusters with Kerberos and RPC encryption. |
As reference https://issues.apache.org/jira/browse/HDFS-6606 |
I tried very hard to make everything working, but for the moment I am declaring defeated after many unsuccessful tries. The main issue is that the encrypt/decrypt part of python-sasl (and hence cyrus sasl) seems not working for the DIGEST-MD5 encryption. This is an example of what snakebite receives after a successful sasl handshake:
The various Iv and Key fields are encrypted, by the Datanode, using the DIGEST-MD5 session keys negotiated via SASL just before (when using The first issue was the error described in cyrusimap/cyrus-sasl#614. I found a workaround, namely patching |
This is a tracking task to list all the work needed to solve one outstanding issue with snakebite. When RPC encryption is enabled for HDFS, the following happens:
pure-sasl
(namely DIGEST-MD5).I opened an issue to
pure-sasl
(thobbs/pure-sasl#32) but some work would be needed to add the missing features.The alternative would be to use
sasl
(https://github.com/cloudera/python-sasl) but unfortunately the library is not maintained since 2016. There is a fork that we could consider that should support DIGEST-MD5 + GSS-API: cloudera/python-sasl#15 (comment)The text was updated successfully, but these errors were encountered: