Skip to content

Commit 4d1c05d

Browse files
committed
Add missing FIDO MDS data model fields
1 parent 4f7164e commit 4d1c05d

6 files changed

Lines changed: 349 additions & 6 deletions

File tree

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

Lines changed: 179 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@
4545
@Builder(toBuilder = true)
4646
@Jacksonized
4747
@JsonIgnoreProperties({
48-
"maxAuthenticatorConfigLength",
49-
"defaultCredProtect"
50-
}) // Present in example but not defined
48+
"maxAuthenticatorConfigLength", // Present in example but not defined
49+
"defaultCredProtect", // Present in example but not defined
50+
"encIdentifier", // Nonsensical in MDS context
51+
"encCredStoreState" // Nonsensical in MDS context
52+
})
5153
public class AuthenticatorGetInfo {
5254

5355
/**
@@ -178,6 +180,126 @@ public class AuthenticatorGetInfo {
178180
Integer remainingDiscoverableCredentials;
179181
Set<Integer> vendorPrototypeConfigCommands;
180182

183+
/**
184+
* @see <a
185+
* href="https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#authenticatorGetInfo">Client
186+
* to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
187+
*/
188+
List<String> attestationFormats;
189+
190+
/**
191+
* <code>true</code> if the <code>longTouchForReset</code> member is set to <code>true</code> or
192+
* <code>false</code> in the metadata statement. <code>false</code> if the <code>longTouchForReset
193+
* </code> member is absent in the metadata statement.
194+
*
195+
* @see <a
196+
* href="https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#authenticatorGetInfo">Client
197+
* to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
198+
*/
199+
boolean longTouchForReset;
200+
201+
/**
202+
* @see <a
203+
* href="https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#authenticatorGetInfo">Client
204+
* to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
205+
*/
206+
Integer uvCountSinceLastPinEntry;
207+
208+
/**
209+
* @see <a
210+
* href="https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#authenticatorGetInfo">Client
211+
* to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
212+
*/
213+
Set<String> transportsForReset;
214+
215+
/**
216+
* <code>true</code> if the <code>pinComplexityPolicy</code> member is set to <code>true</code> or
217+
* <code>false</code> in the metadata statement. <code>false</code> if the <code>
218+
* pinComplexityPolicy</code> member is absent in the metadata statement.
219+
*
220+
* @see <a
221+
* href="https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#authenticatorGetInfo">Client
222+
* to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
223+
*/
224+
boolean pinComplexityPolicy;
225+
226+
/**
227+
* @see <a
228+
* href="https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#authenticatorGetInfo">Client
229+
* to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
230+
*/
231+
String pinComplexityPolicyURL;
232+
233+
/**
234+
* @see <a
235+
* href="https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#authenticatorGetInfo">Client
236+
* to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
237+
*/
238+
Integer maxPINLength;
239+
240+
Set<Integer> authenticatorConfigCommands;
241+
242+
AuthenticatorGetInfo(
243+
@NonNull Set<CtapVersion> versions,
244+
Set<String> extensions,
245+
AAGUID aaguid,
246+
SupportedCtapOptions options,
247+
Integer maxMsgSize,
248+
Set<CtapPinUvAuthProtocolVersion> pinUvAuthProtocols,
249+
Integer maxCredentialCountInList,
250+
Integer maxCredentialIdLength,
251+
Set<AuthenticatorTransport> transports,
252+
List<PublicKeyCredentialParameters> algorithms,
253+
Integer maxSerializedLargeBlobArray,
254+
Boolean forcePINChange,
255+
Integer minPINLength,
256+
Integer firmwareVersion,
257+
Integer maxCredBlobLength,
258+
Integer maxRPIDsForSetMinPINLength,
259+
Integer preferredPlatformUvAttempts,
260+
Set<UserVerificationMethod> uvModality,
261+
Map<CtapCertificationId, Integer> certifications,
262+
Integer remainingDiscoverableCredentials,
263+
Set<Integer> vendorPrototypeConfigCommands,
264+
List<String> attestationFormats,
265+
Boolean longTouchForReset,
266+
Integer uvCountSinceLastPinEntry,
267+
Set<String> transportsForReset,
268+
Boolean pinComplexityPolicy,
269+
String pinComplexityPolicyURL,
270+
Integer maxPINLength,
271+
Set<Integer> authenticatorConfigCommands) {
272+
this.versions = versions;
273+
this.extensions = extensions;
274+
this.aaguid = aaguid;
275+
this.options = options;
276+
this.maxMsgSize = maxMsgSize;
277+
this.pinUvAuthProtocols = pinUvAuthProtocols;
278+
this.maxCredentialCountInList = maxCredentialCountInList;
279+
this.maxCredentialIdLength = maxCredentialIdLength;
280+
this.transports = transports;
281+
this.algorithms = algorithms;
282+
this.maxSerializedLargeBlobArray = maxSerializedLargeBlobArray;
283+
this.forcePINChange = forcePINChange;
284+
this.minPINLength = minPINLength;
285+
this.firmwareVersion = firmwareVersion;
286+
this.maxCredBlobLength = maxCredBlobLength;
287+
this.maxRPIDsForSetMinPINLength = maxRPIDsForSetMinPINLength;
288+
this.preferredPlatformUvAttempts = preferredPlatformUvAttempts;
289+
this.uvModality = uvModality;
290+
this.certifications = certifications;
291+
this.remainingDiscoverableCredentials = remainingDiscoverableCredentials;
292+
this.vendorPrototypeConfigCommands = vendorPrototypeConfigCommands;
293+
this.attestationFormats = attestationFormats;
294+
this.longTouchForReset = longTouchForReset != null;
295+
this.uvCountSinceLastPinEntry = uvCountSinceLastPinEntry;
296+
this.transportsForReset = transportsForReset;
297+
this.pinComplexityPolicy = pinComplexityPolicy != null;
298+
this.pinComplexityPolicyURL = pinComplexityPolicyURL;
299+
this.maxPINLength = maxPINLength;
300+
this.authenticatorConfigCommands = authenticatorConfigCommands;
301+
}
302+
181303
/**
182304
* @see <a
183305
* href="https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#authenticatorGetInfo">Client
@@ -358,6 +480,60 @@ public Optional<Set<Integer>> getVendorPrototypeConfigCommands() {
358480
return Optional.ofNullable(vendorPrototypeConfigCommands);
359481
}
360482

483+
/**
484+
* @see <a
485+
* href="https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#authenticatorGetInfo">Client
486+
* to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
487+
*/
488+
public Optional<List<String>> getAttestationFormats() {
489+
return Optional.ofNullable(attestationFormats);
490+
}
491+
492+
/**
493+
* @see <a
494+
* href="https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#authenticatorGetInfo">Client
495+
* to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
496+
*/
497+
public Optional<Integer> getUvCountSinceLastPinEntry() {
498+
return Optional.ofNullable(uvCountSinceLastPinEntry);
499+
}
500+
501+
/**
502+
* @see <a
503+
* href="https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#authenticatorGetInfo">Client
504+
* to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
505+
*/
506+
public Optional<Set<String>> getTransportsForReset() {
507+
return Optional.ofNullable(transportsForReset);
508+
}
509+
510+
/**
511+
* @see <a
512+
* href="https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#authenticatorGetInfo">Client
513+
* to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
514+
*/
515+
public Optional<String> getPinComplexityPolicyURL() {
516+
return Optional.ofNullable(pinComplexityPolicyURL);
517+
}
518+
519+
/**
520+
* @see <a
521+
* href="https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#authenticatorGetInfo">Client
522+
* to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
523+
*/
524+
public Optional<Integer> getMaxPINLength() {
525+
return Optional.ofNullable(maxPINLength);
526+
}
527+
528+
/**
529+
* @see <a
530+
* href="https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#authenticatorGetInfo">Client
531+
* to Authenticator Protocol (CTAP) §6.4. authenticatorGetInfo (0x04)</a>
532+
*/
533+
public Optional<Set<Integer>> getAuthenticatorConfigCommands() {
534+
return Optional.ofNullable(authenticatorConfigCommands);
535+
}
536+
361537
private static class SetFromIntJsonDeserializer
362538
extends JsonDeserializer<Set<UserVerificationMethod>> {
363539
@Override

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.yubico.fido.metadata;
22

3+
import com.fasterxml.jackson.annotation.JsonProperty;
34
import java.util.Optional;
45
import lombok.Builder;
56
import lombok.Value;
@@ -24,6 +25,7 @@ public class BiometricAccuracyDescriptor {
2425

2526
Double selfAttestedFRR;
2627
Double selfAttestedFAR;
28+
Double iAPARThreshold;
2729
Integer maxTemplates;
2830
Integer maxRetries;
2931
Integer blockSlowdown;
@@ -46,6 +48,16 @@ public Optional<Double> getSelfAttestedFAR() {
4648
return Optional.ofNullable(selfAttestedFAR);
4749
}
4850

51+
/**
52+
* @see <a
53+
* href="https://fidoalliance.org/specs/mds/fido-metadata-statement-v3.1-ps-20250521.html#sctn-type-bad">FIDO
54+
* Metadata Statement §3.3. BiometricAccuracyDescriptor dictionary</a>
55+
*/
56+
@JsonProperty("iAPARThreshold")
57+
public Optional<Double> getIAPARThreshold() {
58+
return Optional.ofNullable(iAPARThreshold);
59+
}
60+
4961
/**
5062
* @see <a
5163
* href="https://fidoalliance.org/specs/mds/fido-metadata-statement-v3.0-ps-20210518.html#biometricaccuracydescriptor-dictionary">FIDO

0 commit comments

Comments
 (0)