-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-16644.java.io.IOException Invalid token in javax.security.sasl.qop #5962
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
Conversation
💔 -1 overall
This message was automatically generated. |
Hi @Hexiaoqiao @haiyang1987 Could you help review this when you have time? Thanks a lot~ |
Those failed unit tests were unrelated to the change. And they work fine locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request addresses a potential issue where illegal qop values could overwrite existing configuration by creating a modified copy of the SASL properties.
- Introduces a new TreeMap (dynamicSaslProps) to hold a copy of the original SASL properties.
- Updates the SASL handshake process to use the modified properties map when setting the qop value and during validation.
Comments suppressed due to low confidence (1)
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/SaslDataTransferServer.java:382
- [nitpick] Consider renaming 'dynamicSaslProps' to 'updatedSaslProps' to more clearly reflect that this map is a modified copy of the original SASL properties.
Map<String, String> dynamicSaslProps = new TreeMap<>(saslProps);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. This is because the saslProps object is initialized once and used again and again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
It's a partial fix but at least it limits the damage to 2.10 clients only.
💔 -1 overall
This message was automatically generated. |
Description of PR
This change prevents qop values from being overwritten with illegal values.
JIRA: HDFS-16644
How was this patch tested?
Test in a production environment
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?