Skip to content

Commit e70320a

Browse files
authored
Merge pull request #454 from Yubico/mds-3.1.1-retired
Add RETIRED status to AuthenticatorStatus
2 parents 2584188 + 157d79a commit e70320a

File tree

5 files changed

+266
-3
lines changed

5 files changed

+266
-3
lines changed

NEWS

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
== Version 2.9.0 (unreleased) ==
2+
3+
`webauthn-server-core`:
4+
5+
Fixes:
6+
7+
* Added `@since` tags to `AttestationTrustSource` javadoc.
8+
9+
`webauthn-server-attestation`:
10+
11+
New features:
12+
13+
* Added `AuthenticatorStatus.RETIRED` and `Filters.notRetired()`.
14+
15+
Fixes:
16+
17+
* Added `@since` tags to `AuthenticatorStatus` and `FidoMetadataService` javadoc.
18+
19+
120
== Version 2.8.1 ==
221

322
Fixes:

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

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,24 @@
77
* or attestationCertificateKeyIdentifiers and potentially some additional information (such as a
88
* specific attestation key).
99
*
10+
* @since 2.0.0
1011
* @see <a
1112
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#enumdef-authenticatorstatus">FIDO
1213
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
1314
*/
1415
public enum AuthenticatorStatus {
15-
/** (NOT DEFINED IN SPEC) Placeholder for any unknown {@link AuthenticatorStatus} value. */
16+
/**
17+
* (NOT DEFINED IN SPEC) Placeholder for any unknown {@link AuthenticatorStatus} value.
18+
*
19+
* @since 2.0.0
20+
*/
1621
@JsonEnumDefaultValue
1722
UNKNOWN(0),
1823

1924
/**
2025
* This authenticator is not FIDO certified.
2126
*
27+
* @since 2.0.0
2228
* @see <a
2329
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#enumdef-authenticatorstatus">FIDO
2430
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
@@ -29,6 +35,7 @@ public enum AuthenticatorStatus {
2935
* This authenticator has passed FIDO functional certification. This certification scheme is
3036
* phased out and will be replaced by {@link #FIDO_CERTIFIED_L1}.
3137
*
38+
* @since 2.0.0
3239
* @see <a
3340
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#enumdef-authenticatorstatus">FIDO
3441
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
@@ -40,6 +47,7 @@ public enum AuthenticatorStatus {
4047
* authenticator could be used without the user’s consent and potentially even without the user’s
4148
* knowledge.
4249
*
50+
* @since 2.0.0
4351
* @see <a
4452
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#enumdef-authenticatorstatus">FIDO
4553
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
@@ -53,6 +61,7 @@ public enum AuthenticatorStatus {
5361
* new registrations of the compromised authenticator. The Authenticator manufacturer should set
5462
* the date to the date when compromise has occurred.
5563
*
64+
* @since 2.0.0
5665
* @see <a
5766
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#enumdef-authenticatorstatus">FIDO
5867
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
@@ -65,6 +74,7 @@ public enum AuthenticatorStatus {
6574
* to be generated or side channels that allow keys or signatures to be forged, guessed or
6675
* extracted.
6776
*
77+
* @since 2.0.0
6878
* @see <a
6979
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#enumdef-authenticatorstatus">FIDO
7080
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
@@ -75,6 +85,7 @@ public enum AuthenticatorStatus {
7585
* This authenticator has known weaknesses in its key protection mechanism(s) that allow user keys
7686
* to be extracted by an adversary in physical possession of the device.
7787
*
88+
* @since 2.0.0
7889
* @see <a
7990
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#enumdef-authenticatorstatus">FIDO
8091
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
@@ -93,17 +104,32 @@ public enum AuthenticatorStatus {
93104
* #USER_KEY_PHYSICAL_COMPROMISE}, {@link #REVOKED}. The Relying party MUST reject the Metadata
94105
* Statement if the authenticatorVersion has not increased
95106
*
107+
* @since 2.0.0
96108
* @see <a
97109
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#enumdef-authenticatorstatus">FIDO
98110
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
99111
*/
100112
UPDATE_AVAILABLE(0),
101113

114+
/**
115+
* The authenticator vendor has decided to retire the product, that this authenticator should not
116+
* be accepted any longer. For example if a prototype version of the authenticator was added to
117+
* FIDO MDS and has now been superseded by the final product, the entry for the prototype might be
118+
* set to "retired".
119+
*
120+
* @since 2.9.0
121+
* @see <a
122+
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.1.1-rd-20251016.html#enumdef-authenticatorstatus">FIDO
123+
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
124+
*/
125+
RETIRED(0),
126+
102127
/**
103128
* The FIDO Alliance has determined that this authenticator should not be trusted for any reason.
104129
* For example if it is known to be a fraudulent product or contain a deliberate backdoor. Relying
105130
* parties SHOULD reject any future registration of this authenticator model.
106131
*
132+
* @since 2.0.0
107133
* @see <a
108134
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#enumdef-authenticatorstatus">FIDO
109135
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
@@ -115,6 +141,7 @@ public enum AuthenticatorStatus {
115141
* FIDO Alliance. If this completed checklist is publicly available, the URL will be specified in
116142
* url.
117143
*
144+
* @since 2.0.0
118145
* @see <a
119146
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#enumdef-authenticatorstatus">FIDO
120147
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
@@ -125,6 +152,7 @@ public enum AuthenticatorStatus {
125152
* The authenticator has passed FIDO Authenticator certification at level 1. This level is the
126153
* more strict successor of {@link #FIDO_CERTIFIED}.
127154
*
155+
* @since 2.0.0
128156
* @see <a
129157
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#enumdef-authenticatorstatus">FIDO
130158
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
@@ -135,6 +163,7 @@ public enum AuthenticatorStatus {
135163
* The authenticator has passed FIDO Authenticator certification at level 1+. This level is the
136164
* more than level 1.
137165
*
166+
* @since 2.0.0
138167
* @see <a
139168
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#enumdef-authenticatorstatus">FIDO
140169
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
@@ -145,6 +174,7 @@ public enum AuthenticatorStatus {
145174
* The authenticator has passed FIDO Authenticator certification at level 2. This level is more
146175
* strict than level 1+.
147176
*
177+
* @since 2.0.0
148178
* @see <a
149179
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#enumdef-authenticatorstatus">FIDO
150180
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
@@ -155,6 +185,7 @@ public enum AuthenticatorStatus {
155185
* The authenticator has passed FIDO Authenticator certification at level 2+. This level is more
156186
* strict than level 2.
157187
*
188+
* @since 2.0.0
158189
* @see <a
159190
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#enumdef-authenticatorstatus">FIDO
160191
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
@@ -165,6 +196,7 @@ public enum AuthenticatorStatus {
165196
* The authenticator has passed FIDO Authenticator certification at level 3. This level is more
166197
* strict than level 2+.
167198
*
199+
* @since 2.0.0
168200
* @see <a
169201
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#enumdef-authenticatorstatus">FIDO
170202
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>
@@ -175,6 +207,7 @@ public enum AuthenticatorStatus {
175207
* The authenticator has passed FIDO Authenticator certification at level 3+. This level is more
176208
* strict than level 3.
177209
*
210+
* @since 2.0.0
178211
* @see <a
179212
* href="https://fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#enumdef-authenticatorstatus">FIDO
180213
* Metadata Service §3.1.4. AuthenticatorStatus enum</a>

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

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@
8787
*
8888
* <p>Use the {@link #builder() builder} to configure settings, then use the {@link
8989
* #findEntries(List, AAGUID)} method or its overloads to retrieve metadata entries.
90+
*
91+
* @since 2.0.0
9092
*/
9193
@Slf4j
9294
public final class FidoMetadataService implements AttestationTrustSource {
@@ -234,6 +236,7 @@ public static class Step1 {
234236
*
235237
* <p>This is an alias of <code>useBlob(blob.getPayload()</code>.
236238
*
239+
* @since 2.0.0
237240
* @see FidoMetadataDownloader#loadCachedBlob()
238241
* @see #useBlob(MetadataBLOBPayload)
239242
*/
@@ -247,6 +250,7 @@ public FidoMetadataServiceBuilder useBlob(@NonNull MetadataBLOB blob) {
247250
* <p>The {@link FidoMetadataDownloader#loadCachedBlob()} method returns a value whose {@link
248251
* MetadataBLOB#getPayload() .getPayload()} result is suitable for use here.
249252
*
253+
* @since 2.0.0
250254
* @see FidoMetadataDownloader#loadCachedBlob()
251255
* @see #useBlob(MetadataBLOB)
252256
*/
@@ -263,9 +267,12 @@ public FidoMetadataServiceBuilder useBlob(@NonNull MetadataBLOBPayload blobPaylo
263267
*
264268
* <p>The default is {@link Filters#notRevoked() Filters.notRevoked()}. Setting a different
265269
* filter overrides this default; to preserve the "not revoked" condition in addition to the new
266-
* filter, you must explicitly include the condition in the few filter. For example, by using
267-
* {@link Filters#allOf(Predicate[]) Filters.allOf(Predicate...)}.
270+
* filter, you must explicitly include the condition in the new filter, for example by using
271+
* {@link Filters#allOf(Predicate[]) Filters.allOf(Predicate...)}. To add the {@link
272+
* Filters#notRetired() Filters.notRetired()} filter, use: <code>
273+
* .prefilter(Filters.allOf(Filters.notRevoked(), Filters.notRetired()))</code>.
268274
*
275+
* @since 2.0.0
269276
* @param prefilter a {@link Predicate} which returns <code>true</code> for metadata entries to
270277
* include in the data source.
271278
* @see #filter(Predicate)
@@ -300,6 +307,7 @@ public FidoMetadataServiceBuilder prefilter(
300307
* @param filter a {@link Predicate} which returns <code>true</code> for metadata entries to
301308
* allow for the corresponding authenticator during credential registration and metadata
302309
* lookup.
310+
* @since 2.0.0
303311
* @see #prefilter(Predicate)
304312
* @see AuthenticatorToBeFiltered
305313
* @see Filters#allOf(Predicate[])
@@ -318,6 +326,7 @@ public FidoMetadataServiceBuilder filter(
318326
*
319327
* @param certStore a {@link CertStore} of additional CRLs and/or intermediate certificates to
320328
* use while validating attestation certificate paths.
329+
* @since 2.0.0
321330
*/
322331
public FidoMetadataServiceBuilder certStore(@NonNull CertStore certStore) {
323332
this.certStore = certStore;
@@ -345,6 +354,7 @@ public FidoMetadataService build()
345354
* FidoMetadataServiceBuilder#prefilter(Predicate) prefilter} and {@link
346355
* FidoMetadataServiceBuilder#filter(Predicate) filter} settings.
347356
*
357+
* @since 2.0.0
348358
* @see FidoMetadataServiceBuilder#prefilter(Predicate)
349359
* @see FidoMetadataServiceBuilder#filter(Predicate)
350360
*/
@@ -358,6 +368,7 @@ public static class Filters {
358368
* @param filters A set of filters.
359369
* @return A filter which only accepts inputs that satisfy ALL of the given <code>
360370
* filters</code>.
371+
* @since 2.0.0
361372
*/
362373
@SafeVarargs
363374
public static <T> Predicate<T> allOf(Predicate<T>... filters) {
@@ -369,6 +380,7 @@ public static <T> Predicate<T> allOf(Predicate<T>... filters) {
369380
* statusReports} array contains no entry with {@link AuthenticatorStatus#REVOKED REVOKED}
370381
* status.
371382
*
383+
* @since 2.0.0
372384
* @see AuthenticatorStatus#REVOKED
373385
*/
374386
public static Predicate<MetadataBLOBPayloadEntry> notRevoked() {
@@ -378,6 +390,21 @@ public static Predicate<MetadataBLOBPayloadEntry> notRevoked() {
378390
statusReport -> AuthenticatorStatus.REVOKED.equals(statusReport.getStatus()));
379391
}
380392

393+
/**
394+
* Include any metadata entry whose {@link MetadataBLOBPayloadEntry#getStatusReports()
395+
* statusReports} array contains no entry with {@link AuthenticatorStatus#RETIRED RETIRED}
396+
* status.
397+
*
398+
* @since 2.9.0
399+
* @see AuthenticatorStatus#RETIRED
400+
*/
401+
public static Predicate<MetadataBLOBPayloadEntry> notRetired() {
402+
return (entry) ->
403+
entry.getStatusReports().stream()
404+
.noneMatch(
405+
statusReport -> AuthenticatorStatus.RETIRED.equals(statusReport.getStatus()));
406+
}
407+
381408
/**
382409
* Accept any authenticator whose matched metadata entry does NOT indicate a compromised
383410
* attestation key.
@@ -390,6 +417,7 @@ public static Predicate<MetadataBLOBPayloadEntry> notRevoked() {
390417
* {@link AuthenticatorToBeFiltered#getAttestationCertificateChain() attestation certificate
391418
* chain}.
392419
*
420+
* @since 2.0.0
393421
* @see AuthenticatorStatus#ATTESTATION_KEY_COMPROMISE
394422
*/
395423
public static Predicate<AuthenticatorToBeFiltered> noAttestationKeyCompromise() {
@@ -417,6 +445,8 @@ public static Predicate<AuthenticatorToBeFiltered> noAttestationKeyCompromise()
417445
/**
418446
* This class encapsulates parameters for filtering authenticators in the {@link
419447
* FidoMetadataServiceBuilder#filter(Predicate) filter} setting of {@link FidoMetadataService}.
448+
*
449+
* @since 2.0.0
420450
*/
421451
@Value
422452
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@@ -426,12 +456,16 @@ public static class AuthenticatorToBeFiltered {
426456
* The attestation certificate chain from the <a
427457
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#attestation-statement">attestation
428458
* statement</a> from an authenticator about ot be registered.
459+
*
460+
* @since 2.0.0
429461
*/
430462
@NonNull List<X509Certificate> attestationCertificateChain;
431463

432464
/**
433465
* A metadata BLOB entry that matches the {@link #getAttestationCertificateChain()} and {@link
434466
* #getAaguid()} in this same {@link AuthenticatorToBeFiltered} object.
467+
*
468+
* @since 2.0.0
435469
*/
436470
@NonNull MetadataBLOBPayloadEntry metadataEntry;
437471

@@ -444,6 +478,8 @@ public static class AuthenticatorToBeFiltered {
444478
*
445479
* <p>This will not be present if the attested credential data contained an AAGUID of all
446480
* zeroes.
481+
*
482+
* @since 2.0.0
447483
*/
448484
public Optional<AAGUID> getAaguid() {
449485
return Optional.ofNullable(aaguid);
@@ -491,6 +527,7 @@ public Optional<AAGUID> getAaguid() {
491527
* attestationCertificateChain</code>, if any.
492528
* </ul>
493529
*
530+
* @since 2.0.0
494531
* @see #findEntries(List)
495532
* @see #findEntries(List, AAGUID)
496533
*/
@@ -566,6 +603,7 @@ public Set<MetadataBLOBPayloadEntry> findEntries(
566603
/**
567604
* Alias of <code>findEntries(attestationCertificateChain, Optional.empty())</code>.
568605
*
606+
* @since 2.0.0
569607
* @see #findEntries(List, Optional)
570608
*/
571609
public Set<MetadataBLOBPayloadEntry> findEntries(
@@ -576,6 +614,7 @@ public Set<MetadataBLOBPayloadEntry> findEntries(
576614
/**
577615
* Alias of <code>findEntries(attestationCertificateChain, Optional.of(aaguid))</code>.
578616
*
617+
* @since 2.0.0
579618
* @see #findEntries(List, Optional)
580619
*/
581620
public Set<MetadataBLOBPayloadEntry> findEntries(
@@ -594,6 +633,7 @@ public Set<MetadataBLOBPayloadEntry> findEntries(
594633
* .orElseGet(Collections::emptySet)
595634
* </pre>
596635
*
636+
* @since 2.0.0
597637
* @see #findEntries(List, Optional)
598638
*/
599639
public Set<MetadataBLOBPayloadEntry> findEntries(@NonNull RegistrationResult registrationResult) {
@@ -606,6 +646,7 @@ public Set<MetadataBLOBPayloadEntry> findEntries(@NonNull RegistrationResult reg
606646
/**
607647
* Find metadata entries matching the given AAGUID.
608648
*
649+
* @since 2.0.0
609650
* @see #findEntries(List, Optional)
610651
*/
611652
public Set<MetadataBLOBPayloadEntry> findEntries(@NonNull AAGUID aaguid) {
@@ -623,6 +664,7 @@ public Set<MetadataBLOBPayloadEntry> findEntries(@NonNull AAGUID aaguid) {
623664
* @return All metadata entries which satisfy the {@link
624665
* FidoMetadataServiceBuilder#prefilter(Predicate) prefilter} AND for which the <code>filter
625666
* </code> returns <code>true</code>.
667+
* @since 2.0.0
626668
* @see #findEntries(List, Optional)
627669
*/
628670
public Set<MetadataBLOBPayloadEntry> findEntries(
@@ -637,6 +679,9 @@ public Set<MetadataBLOBPayloadEntry> findEntries(
637679
.collect(Collectors.toSet());
638680
}
639681

682+
/**
683+
* @since 2.0.0
684+
*/
640685
@Override
641686
public TrustRootsResult findTrustRoots(
642687
List<X509Certificate> attestationCertificateChain, Optional<ByteArray> aaguid) {

0 commit comments

Comments
 (0)