Bug: set trust anchor with trusted certificates#789
Closed
zll600 wants to merge 1 commit intoweb-auth:5.3.xfrom
Closed
Bug: set trust anchor with trusted certificates#789zll600 wants to merge 1 commit intoweb-auth:5.3.xfrom
zll600 wants to merge 1 commit intoweb-auth:5.3.xfrom
Conversation
…e certificate path
Contributor
|
I created another PR with those changes and based on 5.2.x. |
Contributor
Author
|
Real thanks 🙇 Just for others' references, the new PR: #793 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Target branch: 5.x
Resolves issue #788
Overview
Set the trust anchor with the trusted certificates when validating the certificate path.
Problems
The implementation passes the trusted certificate as the first certificate of the certificate path when validating.
webauthn-framework/src/webauthn/src/MetadataService/CertificateChain/PhpCertificateChainValidator.php
Lines 190 to 191 in eb2aa67
This works well when the trusted certificate is self-signed because the self-signed certificate can be used to verify itself.
But it fails when the trusted certificate is an intermediate certificate(e.g., trust anchor from FIDO MDS).
The intermediate CA can not verify itself, which can only be verified with its issuer.
For any CA of FIDO MDS, we can trust it even if it is an intermediate CA, and use it as the trust anchor directly to verify the trust path of the attestation.