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

fix: Allow ExtKeyUsageAny for Webauthn attestation certificates #51201

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

codingllama
Copy link
Contributor

Windows Hello attestation checks fail because its attestation certificates set ExtKeyUsage 2.23.133.8.3 (and also 1.3.6.1.4.1.311.21.36, which doesn't seem to be thoroughly documented).

This PR fixes that by allowing any ExtKeyUsage to be part of attestation certificates. That is partly because there are no consts for the OIDs above, but also because it doesn't seem like a reason to fail attestation.

Changelog: Fixed WebAuthn attestation for Windows Hello

@codingllama codingllama changed the title Allow ExtKeyUsageAny for Webauthn attestation certificates fix: Allow ExtKeyUsageAny for Webauthn attestation certificates Jan 17, 2025
allowed = true // OK, but keep checking
} else {
log.DebugContext(context.Background(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added some logging to help future debugging. The first certificate in the Hello chain fails validation, which is good to know (the second passes so thankfully it works).

For the curious, the error is "x509: unhandled critical extension".

@codingllama
Copy link
Contributor Author

Thanks for the quick review, Noah.

Friendly ping @EdwardDowling.

@codingllama codingllama added this pull request to the merge queue Jan 20, 2025
@codingllama
Copy link
Contributor Author

Thanks everyone for the quick reviews.

After mailing this I double-checked other Certificate.Verify calls in the codebase (looks OK, Device Trust has a similar check by Noah).

It also occurred to me to check certificate expiration for certs such as the Microsoft TPM one, as that is yet another way this may fail to no fault of the customer. The NotAfter for this particular cert is "Dec 10 21:39:28 2039 GMT", so it looks like we are good in that regard. I'll consider a bit more whether to tweak the "now" date for the check.

Merged via the queue into master with commit 8158da2 Jan 20, 2025
43 of 44 checks passed
@codingllama codingllama deleted the codingllama/webauthn-attest-extkey branch January 20, 2025 18:07
@public-teleport-github-review-bot

@codingllama See the table below for backport results.

Branch Result
branch/v15 Failed
branch/v16 Failed
branch/v17 Failed

github-merge-queue bot pushed a commit that referenced this pull request Jan 21, 2025
)

* Allow ExtKeyUsageAny for Webauthn attestation certificates (#51201)

* Use logrus instead of slog
github-merge-queue bot pushed a commit that referenced this pull request Jan 21, 2025
)

* Allow ExtKeyUsageAny for Webauthn attestation certificates (#51201)

* Use logrus instead of slog
github-merge-queue bot pushed a commit that referenced this pull request Jan 21, 2025
)

* Allow ExtKeyUsageAny for Webauthn attestation certificates (#51201)

* Use logrus instead of slog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants