Skip to content

Conversation

RRRadicalEdward
Copy link
Collaborator

@RRRadicalEdward RRRadicalEdward commented Nov 1, 2022

This PR adds an implementation of the PKU2U authorization protocol in the sspi-rs and updated FFI-bindings to support this protocol.
Also, I've improved the Negotiate module: now if a user will try to log in under the AzureAD domain then it automatically will switch to the PKU2U.

Important note: for the PKU2U Azure AD certificate is needed with the corresponding private key. The current implementation will try to extract them from the Windows Certificate Store using WinAPI bindings. Requirements for the certificate:

  • It has to be installed in the current user certificate store in the personal folder
  • It has to have the corresponding private key that is marked as exportable;
  • An issuer CN has to start with the MS-Organization-P2P-Access like MS-Organization-P2P-Access [2021] or MS-Organization-P2P-Access [2022];
  • ClientAuth extended key usage has to be present.

Used Docs & References:

sspi: pku2u: move config in separate file (module);
sspi: negotiate: improve negotiation algorithm;
ffi: add Pku2u package support;
…m the certificate; remove hardcoded authenticator checksum
sspi: credssp: fix negotokens on pub key auth stage;
…ation on Linus OS;

ffi: fix compilation on Linux OS;
sspi: fix merge conflicts; improve negotiate module; fix compilation without features;
ffi: fix merge conflicts;
@RRRadicalEdward RRRadicalEdward force-pushed the pku2u branch 2 times, most recently from e69cfe6 to a61031a Compare November 1, 2022 17:05
@CBenoit CBenoit self-requested a review November 1, 2022 18:12
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.

Good work! 👍

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.

Thank you Alex! 🙂

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