Override CeremonyStepManagerFactory to enforce authenticator quality#244
Open
kayjoosten wants to merge 5 commits intomainfrom
Open
Override CeremonyStepManagerFactory to enforce authenticator quality#244kayjoosten wants to merge 5 commits intomainfrom
kayjoosten wants to merge 5 commits intomainfrom
Conversation
Replace the vendor CeremonyStepManagerFactory with an explicit, controlled implementation. Registration now rejects TYPE_NONE attestation, requires hardware key protection, requires FIDO certification, and blocks backup-eligible (multi-device/passkey) credentials. Both ceremony step lists are explicit so future library upgrades cannot silently add steps. Status reports are sorted by effectiveDate before evaluation so the most recent report is always used regardless of repository ordering.
…radation CheckHardwareKeyProtection and CheckFidoCertified were silently omitted when MDS was not configured. creationCeremony() now throws LogicException if enableMetadataStatementSupport() was not called, making misconfiguration visible at runtime rather than silently bypassing security checks.
…ce assert with explicit guard TYPE_NONE rejection now happens before CheckMetadataStatement so the explicit error message is always shown. Replace assert() in mostRecentReport() with a LogicException for predictable behaviour regardless of PHP assertion config.
Add explicit test for CTAP1/U2F authenticators (null UUID): CheckFidoCertified rejects them because they have no MDS status reports. Add comment to CheckHardwareKeyProtection's MDS-absent test documenting that CheckFidoCertified is the safety net for authenticators not present in the MDS.
79aece5 to
e8c8a5e
Compare
johanib
reviewed
May 7, 2026
| $this->counterChecker = new ThrowExceptionIfInvalid(); | ||
| $this->algorithmManager = Manager::create()->add(ES256::create(), RS256::create()); | ||
| $this->attestationStatementSupportManager = new AttestationStatementSupportManager([ | ||
| new NoneAttestationStatementSupport(), |
Contributor
There was a problem hiding this comment.
Why is new NoneAttestationStatementSupport(), here? We do not support NONE, right?
Contributor
There was a problem hiding this comment.
Oh, the parent constructor always adds that. This is default bootstrapping it seems.
| /** @return string[] */ | ||
| private function getStepClasses(CeremonyStepManager $manager): array | ||
| { | ||
| $reflection = new ReflectionClass($manager); |
Contributor
There was a problem hiding this comment.
Flag: reflection needed to test
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.
Replace the vendor CeremonyStepManagerFactory with an explicit, controlled implementation. Registration now rejects TYPE_NONE attestation, requires hardware key protection, requires FIDO certification, and blocks backup-eligible (multi-device/passkey) credentials. Both ceremony step lists are explicit so future library upgrades cannot silently add steps.
Status reports are sorted by effectiveDate before evaluation so the most recent report is always used regardless of repository ordering.