Skip to content

Override CeremonyStepManagerFactory to enforce authenticator quality#244

Open
kayjoosten wants to merge 5 commits intomainfrom
feature/issue-242-ceremony-step-factory
Open

Override CeremonyStepManagerFactory to enforce authenticator quality#244
kayjoosten wants to merge 5 commits intomainfrom
feature/issue-242-ceremony-step-factory

Conversation

@kayjoosten
Copy link
Copy Markdown
Contributor

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.

kayjoosten added 4 commits May 5, 2026 14:54
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.
@kayjoosten kayjoosten force-pushed the feature/issue-242-ceremony-step-factory branch from 79aece5 to e8c8a5e Compare May 5, 2026 13:01
@kayjoosten kayjoosten requested a review from johanib May 6, 2026 10:36
@johanib johanib linked an issue May 7, 2026 that may be closed by this pull request
$this->counterChecker = new ThrowExceptionIfInvalid();
$this->algorithmManager = Manager::create()->add(ES256::create(), RS256::create());
$this->attestationStatementSupportManager = new AttestationStatementSupportManager([
new NoneAttestationStatementSupport(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why is new NoneAttestationStatementSupport(), here? We do not support NONE, right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Flag: reflection needed to test

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.

Override CeremonyStepManagerFactory to enforce authenticator quality

2 participants