-
Notifications
You must be signed in to change notification settings - Fork 14k
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
KAFKA-18064: SASL mechanisms that do support neihter integrity nor co… #17901
base: trunk
Are you sure you want to change the base?
Conversation
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.
Thanks for the PR! Left some comments
if (!isComplete()) | ||
throw new IllegalStateException("Authentication exchange has not completed"); | ||
return Arrays.copyOfRange(incoming, offset, offset + len); | ||
throw new IllegalStateException("Mechanism does not support integrity nor confidentality"); |
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.
Should we perhaps alter the message within IllegalStateException
depending on whether the authentication is completed or not and add the name of the mechanism as well? Similar to how the JDK implementation does it for PlainClient
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.
Thanks, re-written to match the JDK behaviour and be more consistent with the existing code.
if (!isComplete()) | ||
throw new IllegalStateException("Authentication exchange has not completed"); | ||
return Arrays.copyOfRange(outgoing, offset, offset + len); | ||
throw new IllegalStateException("Mechanism does not support integrity nor confidentality"); |
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 think you missed the change in OAuthBearerSaslServer
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.
Thank you, fixed.
…nfidentality should throw exception on wrap/unwrap
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!
…nfidentality should throw exception on wrap/unwrap
The current implementation does not implement wrap/unwrap correctly.
This may cause security issues, if the code using the mechanisms does
not check for QOP correctly.
No testing done, if this breaks something, then calling code must be fixed.
Committer Checklist (excluded from commit message)