Skip to content

refactor(sspi): Kerberos client implementation #435

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

Merged
merged 12 commits into from
May 28, 2025

Conversation

TheBestTvarynka
Copy link
Collaborator

Hi,
I refactored the Kerberos client implementation and added new test to check the Kerberos U2U negotiation.

@TheBestTvarynka TheBestTvarynka self-assigned this May 26, 2025
Comment on lines -71 to +73
// Renewable, Canonicalize, Enc-tkt-in-skey are on by default
// Renewable, Canonicalize.
// https://www.rfc-editor.org/rfc/rfc4120#section-5.4.1
const DEFAULT_TGS_REQ_OPTIONS: [u8; 4] = [0x00, 0x81, 0x00, 0x08];
const DEFAULT_TGS_REQ_OPTIONS: [u8; 4] = [0x00, 0x81, 0x00, 0x00];
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a mistake here after writing new tests. We don't need to set the enc-tkt-in-skey flag by default. It should be set only when the Kerberos U2U is negotiated

@TheBestTvarynka TheBestTvarynka requested a review from CBenoit May 26, 2025 14:34
@TheBestTvarynka TheBestTvarynka marked this pull request as ready for review May 27, 2025 17:51
@TheBestTvarynka
Copy link
Collaborator Author

@CBenoit the PR is ready for review :)


let as_rep = as_exchange(client, yield_point, &kdc_req_body, pa_data_options).await?;

info!("AS exchange finished successfully.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: Please avoid using INFO-level logs in libraries, as it tends to pollute usual logs of applications such as IronRDP and Devolutions Gateway. Let’s use DEBUG and TRACE only in the libraries. Feel free to use INFO in the binaries such as the ffi crate and other examples.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough!
done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: Appears to be an empty file now

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, I know about it. The next PRs contain server-side Kerberos implementation. I decided to keep this file because I need it anyway

Copy link
Member

@CBenoit CBenoit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to merge at your leisure 💯

@TheBestTvarynka TheBestTvarynka merged commit ce028d8 into dev/server-side-kerberos May 28, 2025
42 checks passed
@TheBestTvarynka TheBestTvarynka deleted the refactor/kerberos-client branch May 28, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants