Skip to content
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

kdc: Add support for PKINIT freshness #1182

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jsutton24
Copy link
Contributor

This implementation is interoperable with that of Windows.

@jsutton24 jsutton24 force-pushed the kdc-pkinit-freshness branch 2 times, most recently from a70dd99 to 3bb2264 Compare October 10, 2023 22:55
kdc/pkinit.c Outdated Show resolved Hide resolved
* Match Windows by preferring the authenticator nonce over the one in the
* request body.
*/
r->ek.nonce = _kdc_pk_nonce(pkp);
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this break interop with earlier versions of Heimdal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don’t know. At any rate, we haven’t noticed this KDC‐side change cause any problems interoperating with the Heimdal client.

Copy link
Contributor

Choose a reason for hiding this comment

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

Meaning that you deployed this fix on the KDCs without also upgrading all clients?

@nicowilliams
Copy link
Contributor

Except for my question about interop this looks great to me, and thank you! (And sorry for the delay.)

@nicowilliams
Copy link
Contributor

This branch now has conflicts.

Assists Samba to address CVE-2022-2031

This allows the plugin to check the endtime of a ticket against the
KDC's current time, to see if the ticket will expire in the next two
minutes.

Samba BUG: https://bugzilla.samba.org/show_bug.cgi?id=15047

Signed-off-by: Joseph Sutton <[email protected]>
This matches the behaviour of the Windows KDC.

Signed-off-by: Joseph Sutton <[email protected]>
For a PK-INIT request, we want to have the local krbtgt key available to
encrypt a new freshness token, and to decrypt a freshness token sent us
by a client.

Signed-off-by: Joseph Sutton <[email protected]>
Clients indicating support for PKINIT Freshness (by means of an empty
PADATA_AS_FRESHNESS type) will receive in the reply a freshness token to
be included in the client’s PK-INIT request which proves the client’s
recent possession of the private key.

The require-pkinit-freshness option, if enabled, will reject PK-INIT
requests that lack this token.

Freshness tokens are only supported with the PA-PK-AS-REQ padata type.
The PA-PK-AS-REQ-Win2k type has no field to contain a freshness token.

Signed-off-by: Joseph Sutton <[email protected]>
@jsutton24
Copy link
Contributor Author

This branch now has conflicts.

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants