-
Notifications
You must be signed in to change notification settings - Fork 159
Add RETIRED status to AuthenticatorStatus #454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Test Results2 308 tests 2 300 ✅ 1m 2s ⏱️ Results for commit 3825292. ♻️ This comment has been updated with latest results. |
emlun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 😄
Reading the description I think it seems appropriate to add a Filters constructor for this status, like notRevoked(): https://github.com/Yubico/java-webauthn-server/blob/main/webauthn-server-attestation/src/main/java/com/yubico/fido/metadata/FidoMetadataService.java#L374
I don't think it should be applied by default, but we can mention it in the docs:
diff --git a/webauthn-server-attestation/src/main/java/com/yubico/fido/metadata/FidoMetadataService.java b/webauthn-server-attestation/src/main/java/com/yubico/fido/metadata/FidoMetadataService.java
index fdf4b2c9..0b6ce73f 100644
--- a/webauthn-server-attestation/src/main/java/com/yubico/fido/metadata/FidoMetadataService.java
+++ b/webauthn-server-attestation/src/main/java/com/yubico/fido/metadata/FidoMetadataService.java
@@ -264,7 +264,9 @@ public final class FidoMetadataService implements AttestationTrustSource {
* <p>The default is {@link Filters#notRevoked() Filters.notRevoked()}. Setting a different
* filter overrides this default; to preserve the "not revoked" condition in addition to the new
* filter, you must explicitly include the condition in the few filter. For example, by using
- * {@link Filters#allOf(Predicate[]) Filters.allOf(Predicate...)}.
+ * {@link Filters#allOf(Predicate[]) Filters.allOf(Predicate...)}. For example, to add the
+ * {@link Filters#notRetired() Filters.notRetired()} filter, use: <code>
+ * .prefilter(Filters.allOf(Filters.notRevoked(), Filters.notRetired()))</code>.
*
* @param prefilter a {@link Predicate} which returns <code>true</code> for metadata entries to
* include in the data source.
@@ -288,7 +290,9 @@ public final class FidoMetadataService implements AttestationTrustSource {
* Filters.noAttestationKeyCompromise()}. Setting a different filter overrides this default; to
* preserve this condition in addition to the new filter, you must explicitly include the
* condition in the few filter. For example, by using {@link Filters#allOf(Predicate[])
- * Filters.allOf(Predicate...)}.
+ * Filters.allOf(Predicate...)}. For example, to add the {@link Filters#notRetired()
+ * Filters.notRetired()} filter, use: <code>
+ * .filter(Filters.allOf(Filters.noAttestationKeyCompromise(), Filters.notRetired()))</code>.
*
* <p>Note: Returning <code>true</code> in the filter predicate does not automatically make the
* authenticator trusted, as its attestation certificate must also correctly chain to a trusted(pipe this into git apply to apply it locally)
And with that, we should also expand these filter tests to cover the new filter:
Line 725 in 2584188
| describe("The noAttestationKeyCompromise filter") { |
|
I suppose we should also add the |
For example, the test now detects if the filter implementation is changed to `(entry) -> false` which was not detected before.
emlun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great initiative! 🎉
From the latest update to FIDO MDS: https://fidoalliance.org/specs/mds/fido-metadata-service-v3.1.1-rd-20251016.html#enumdef-authenticatorstatus