-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: properly map SSPI flags to Kerberos GSSAPI flags #189
Conversation
It looks good to me, I'm surprised it has worked so far. We'll need to test that it doesn't break things for other protocols though |
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 for that! I left a few comments for improvements, but I didn’t spot any significant issue just by looking at the code in isolation. Let’s test this more thoroughly (via FreeRDP, IronRDP, etc) once merged.
Feel free to address the comments (or not), and merge yourself.
PS: I’ll rename the PR title to better reflect the changes, and keep consistency with other commits (although casing for commit type is not imposed by conventional commit specification).
Co-authored-by: Benoît Cortier <bcortier@proton.me>
@awakecoding , one thing to notice is that, this flag should also has an effect when encrypt/decrypt payloads. For example, if sign is on and seal is off, the message should comes with a signature but with unencrypted payload. I'll open a issue to track it |
For future reference. here is a screenshot that it works no sign, no seal, plain TCP connection
|
…ons/sspi-rs into Fix-Hard-Coded-GSS-FLAG
Co-authored-by: Benoît Cortier <bcortier@proton.me>
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 👍
Don't you always want confidentiality and integrity by default, you should only not be setting it if the NO_INTEGRITY flag is specified.
AFAIK LDAP (when using LDAPS or LDAP + StartTLS) is the only one that has needed this and specifically with the |
LDAPS does not allow sealing since the connection is already encrypted. |
Only when using |
Yes agreed we will make sure to fix this. |
@jborean93 added new issue #198 according to the thread. |
Note: This change might be breaking. Confidentiality and integrity is not implied anymore. User needs to actively specify these two flag to get sign and seal.
This change is critical for LDAPs, as Active Directory does not accept Kerberos with sign and seal flags.
This implementation requires reviewers attention, in particular, at line 408 of src/kerberos/client/generators.rs. Where windows never specified how these flags map to the GSS checksum flags. This is purely guessed from their Kerberos documentation at section 3.2.5.2. and the SSPI documentation .
Whether this implementation is correct or not, we need a way for caller to change that flag.