Skip to content

Commit 02f0529

Browse files
committed
Add RETIRED status to AuthenticatorStatus
1 parent 2584188 commit 02f0529

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

webauthn-server-attestation/src/main/java/com/yubico/fido/metadata/AuthenticatorStatus.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,18 @@ public enum AuthenticatorStatus {
9999
*/
100100
UPDATE_AVAILABLE(0),
101101

102+
/**
103+
* The authenticator vendor has decided to retire the product, that this authenticator should not
104+
* be accepted any longer. For example if a prototype version of the authenticator was added to
105+
* FIDO MDS and has now been superseded by the final product, the entry for the prototype might be
106+
* set to "retired".
107+
*
108+
* @see <a
109+
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.1.1-rd-20251016.html#enumdef-authenticatorstatus">FIDO
110+
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
111+
*/
112+
RETIRED(0),
113+
102114
/**
103115
* The FIDO Alliance has determined that this authenticator should not be trusted for any reason.
104116
* For example if it is known to be a fraudulent product or contain a deliberate backdoor. Relying

webauthn-server-attestation/src/test/scala/com/yubico/fido/metadata/FidoMds3Spec.scala

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,54 @@ class FidoMds3Spec extends AnyFunSpec with Matchers {
562562
}
563563
}
564564

565+
it("RETIRED AuthenticatorStatus is parsed correctly.") {
566+
val (blobJwt, cert, crls) = makeBlob("""{
567+
"legalHeader" : "Kom ihåg att du aldrig får snyta dig i mattan!",
568+
"nextUpdate" : "2022-12-01",
569+
"no" : 0,
570+
"entries": [
571+
{
572+
"aaguid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
573+
"statusReports": [
574+
{
575+
"status": "RETIRED",
576+
"effectiveDate": "2022-02-15"
577+
}
578+
],
579+
"timeOfLastStatusChange": "2022-02-15"
580+
}
581+
]
582+
}""")
583+
val downloader: FidoMetadataDownloader = FidoMetadataDownloader
584+
.builder()
585+
.expectLegalHeader("Kom ihåg att du aldrig får snyta dig i mattan!")
586+
.useTrustRoot(cert)
587+
.useBlob(blobJwt)
588+
.clock(
589+
Clock.fixed(Instant.parse("2022-02-15T18:00:00Z"), ZoneOffset.UTC)
590+
)
591+
.useCrls(crls)
592+
.build()
593+
val mds =
594+
FidoMetadataService.builder().useBlob(downloader.loadCachedBlob()).build()
595+
mds should not be null
596+
597+
val entries = mds
598+
.findEntries(
599+
Collections.emptyList(),
600+
Some(
601+
new AAGUID(ByteArray.fromHex("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
602+
).toJava,
603+
)
604+
.asScala
605+
entries should not be empty
606+
entries should have size 1
607+
entries.head.getStatusReports should have size 1
608+
entries.head.getStatusReports.get(0).getStatus should be(
609+
AuthenticatorStatus.RETIRED
610+
)
611+
}
612+
565613
it("More [AuthenticatorTransport] values might be added in the future. FIDO Servers MUST silently ignore all unknown AuthenticatorStatus values.") {
566614
val (blobJwt, cert, crls) = makeBlob("""{
567615
"legalHeader" : "Kom ihåg att du aldrig får snyta dig i mattan!",

0 commit comments

Comments
 (0)