Skip to content

Commit 260aff2

Browse files
committed
Add @since tags to AttestationTrustSource and FidoMetadataService javadoc
1 parent 648f4f8 commit 260aff2

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

NEWS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
== Version 2.9.0 (unreleased) ==
22

3+
`webauthn-server-core`:
4+
5+
Fixes:
6+
7+
* Added `@since` tags to `AttestationTrustSource` javadoc.
8+
39
`webauthn-server-attestation`:
410

511
New features:
612

713
* Added `AuthenticatorStatus.RETIRED` and `Filters.notRetired()`.
814

15+
Fixes:
16+
17+
* Added `@since` tags to `FidoMetadataService` javadoc.
18+
919

1020
== Version 2.8.1 ==
1121

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

Lines changed: 28 additions & 0 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
*/
@@ -268,6 +272,7 @@ public FidoMetadataServiceBuilder useBlob(@NonNull MetadataBLOBPayload blobPaylo
268272
* Filters#notRetired() Filters.notRetired()} filter, use: <code>
269273
* .prefilter(Filters.allOf(Filters.notRevoked(), Filters.notRetired()))</code>.
270274
*
275+
* @since 2.0.0
271276
* @param prefilter a {@link Predicate} which returns <code>true</code> for metadata entries to
272277
* include in the data source.
273278
* @see #filter(Predicate)
@@ -302,6 +307,7 @@ public FidoMetadataServiceBuilder prefilter(
302307
* @param filter a {@link Predicate} which returns <code>true</code> for metadata entries to
303308
* allow for the corresponding authenticator during credential registration and metadata
304309
* lookup.
310+
* @since 2.0.0
305311
* @see #prefilter(Predicate)
306312
* @see AuthenticatorToBeFiltered
307313
* @see Filters#allOf(Predicate[])
@@ -320,6 +326,7 @@ public FidoMetadataServiceBuilder filter(
320326
*
321327
* @param certStore a {@link CertStore} of additional CRLs and/or intermediate certificates to
322328
* use while validating attestation certificate paths.
329+
* @since 2.0.0
323330
*/
324331
public FidoMetadataServiceBuilder certStore(@NonNull CertStore certStore) {
325332
this.certStore = certStore;
@@ -347,6 +354,7 @@ public FidoMetadataService build()
347354
* FidoMetadataServiceBuilder#prefilter(Predicate) prefilter} and {@link
348355
* FidoMetadataServiceBuilder#filter(Predicate) filter} settings.
349356
*
357+
* @since 2.0.0
350358
* @see FidoMetadataServiceBuilder#prefilter(Predicate)
351359
* @see FidoMetadataServiceBuilder#filter(Predicate)
352360
*/
@@ -360,6 +368,7 @@ public static class Filters {
360368
* @param filters A set of filters.
361369
* @return A filter which only accepts inputs that satisfy ALL of the given <code>
362370
* filters</code>.
371+
* @since 2.0.0
363372
*/
364373
@SafeVarargs
365374
public static <T> Predicate<T> allOf(Predicate<T>... filters) {
@@ -371,6 +380,7 @@ public static <T> Predicate<T> allOf(Predicate<T>... filters) {
371380
* statusReports} array contains no entry with {@link AuthenticatorStatus#REVOKED REVOKED}
372381
* status.
373382
*
383+
* @since 2.0.0
374384
* @see AuthenticatorStatus#REVOKED
375385
*/
376386
public static Predicate<MetadataBLOBPayloadEntry> notRevoked() {
@@ -407,6 +417,7 @@ public static Predicate<MetadataBLOBPayloadEntry> notRetired() {
407417
* {@link AuthenticatorToBeFiltered#getAttestationCertificateChain() attestation certificate
408418
* chain}.
409419
*
420+
* @since 2.0.0
410421
* @see AuthenticatorStatus#ATTESTATION_KEY_COMPROMISE
411422
*/
412423
public static Predicate<AuthenticatorToBeFiltered> noAttestationKeyCompromise() {
@@ -434,6 +445,8 @@ public static Predicate<AuthenticatorToBeFiltered> noAttestationKeyCompromise()
434445
/**
435446
* This class encapsulates parameters for filtering authenticators in the {@link
436447
* FidoMetadataServiceBuilder#filter(Predicate) filter} setting of {@link FidoMetadataService}.
448+
*
449+
* @since 2.0.0
437450
*/
438451
@Value
439452
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@@ -443,12 +456,16 @@ public static class AuthenticatorToBeFiltered {
443456
* The attestation certificate chain from the <a
444457
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#attestation-statement">attestation
445458
* statement</a> from an authenticator about ot be registered.
459+
*
460+
* @since 2.0.0
446461
*/
447462
@NonNull List<X509Certificate> attestationCertificateChain;
448463

449464
/**
450465
* A metadata BLOB entry that matches the {@link #getAttestationCertificateChain()} and {@link
451466
* #getAaguid()} in this same {@link AuthenticatorToBeFiltered} object.
467+
*
468+
* @since 2.0.0
452469
*/
453470
@NonNull MetadataBLOBPayloadEntry metadataEntry;
454471

@@ -461,6 +478,8 @@ public static class AuthenticatorToBeFiltered {
461478
*
462479
* <p>This will not be present if the attested credential data contained an AAGUID of all
463480
* zeroes.
481+
*
482+
* @since 2.0.0
464483
*/
465484
public Optional<AAGUID> getAaguid() {
466485
return Optional.ofNullable(aaguid);
@@ -508,6 +527,7 @@ public Optional<AAGUID> getAaguid() {
508527
* attestationCertificateChain</code>, if any.
509528
* </ul>
510529
*
530+
* @since 2.0.0
511531
* @see #findEntries(List)
512532
* @see #findEntries(List, AAGUID)
513533
*/
@@ -583,6 +603,7 @@ public Set<MetadataBLOBPayloadEntry> findEntries(
583603
/**
584604
* Alias of <code>findEntries(attestationCertificateChain, Optional.empty())</code>.
585605
*
606+
* @since 2.0.0
586607
* @see #findEntries(List, Optional)
587608
*/
588609
public Set<MetadataBLOBPayloadEntry> findEntries(
@@ -593,6 +614,7 @@ public Set<MetadataBLOBPayloadEntry> findEntries(
593614
/**
594615
* Alias of <code>findEntries(attestationCertificateChain, Optional.of(aaguid))</code>.
595616
*
617+
* @since 2.0.0
596618
* @see #findEntries(List, Optional)
597619
*/
598620
public Set<MetadataBLOBPayloadEntry> findEntries(
@@ -611,6 +633,7 @@ public Set<MetadataBLOBPayloadEntry> findEntries(
611633
* .orElseGet(Collections::emptySet)
612634
* </pre>
613635
*
636+
* @since 2.0.0
614637
* @see #findEntries(List, Optional)
615638
*/
616639
public Set<MetadataBLOBPayloadEntry> findEntries(@NonNull RegistrationResult registrationResult) {
@@ -623,6 +646,7 @@ public Set<MetadataBLOBPayloadEntry> findEntries(@NonNull RegistrationResult reg
623646
/**
624647
* Find metadata entries matching the given AAGUID.
625648
*
649+
* @since 2.0.0
626650
* @see #findEntries(List, Optional)
627651
*/
628652
public Set<MetadataBLOBPayloadEntry> findEntries(@NonNull AAGUID aaguid) {
@@ -640,6 +664,7 @@ public Set<MetadataBLOBPayloadEntry> findEntries(@NonNull AAGUID aaguid) {
640664
* @return All metadata entries which satisfy the {@link
641665
* FidoMetadataServiceBuilder#prefilter(Predicate) prefilter} AND for which the <code>filter
642666
* </code> returns <code>true</code>.
667+
* @since 2.0.0
643668
* @see #findEntries(List, Optional)
644669
*/
645670
public Set<MetadataBLOBPayloadEntry> findEntries(
@@ -654,6 +679,9 @@ public Set<MetadataBLOBPayloadEntry> findEntries(
654679
.collect(Collectors.toSet());
655680
}
656681

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

webauthn-server-core/src/main/java/com/yubico/webauthn/attestation/AttestationTrustSource.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public interface AttestationTrustSource {
5757
* an empty result. Implementations MAY reuse the same result object, or parts of it, for
5858
* multiple calls of this method, even with different arguments, but MUST return an empty set
5959
* of trust roots for authenticators that should not be trusted.
60+
* @since 2.0.0
6061
*/
6162
TrustRootsResult findTrustRoots(
6263
List<X509Certificate> attestationCertificateChain, Optional<ByteArray> aaguid);
@@ -77,6 +78,8 @@ TrustRootsResult findTrustRoots(
7778
* <li>define a policy tree validator for the PKIX policy tree result - see {@link
7879
* TrustRootsResultBuilder#policyTreeValidator(Predicate) policyTreeValidator(Predicate)}.
7980
* </ul>
81+
*
82+
* @since 2.0.0
8083
*/
8184
@Value
8285
@Builder(toBuilder = true)
@@ -86,6 +89,8 @@ class TrustRootsResult {
8689
* A set of attestation root certificates trusted to certify the relevant attestation statement.
8790
* If the attestation statement is not trusted, or if no trust roots were found, this should be
8891
* an empty set.
92+
*
93+
* @since 2.0.0
8994
*/
9095
@NonNull private final Set<X509Certificate> trustRoots;
9196

@@ -99,13 +104,17 @@ class TrustRootsResult {
99104
* trustRoots}.
100105
*
101106
* <p>The default is <code>null</code>.
107+
*
108+
* @since 2.0.0
102109
*/
103110
@Builder.Default private final CertStore certStore = null;
104111

105112
/**
106113
* Whether certificate revocation should be checked during certificate path validation.
107114
*
108115
* <p>The default is <code>true</code>.
116+
*
117+
* @since 2.0.0
109118
*/
110119
@Builder.Default private final boolean enableRevocationChecking = true;
111120

@@ -129,6 +138,8 @@ class TrustRootsResult {
129138
* Predicate}.
130139
*
131140
* <p>The default is <code>null</code>.
141+
*
142+
* @since 2.1.0
132143
*/
133144
@Builder.Default private final Predicate<PolicyNode> policyTreeValidator = null;
134145

@@ -153,6 +164,8 @@ private TrustRootsResult(
153164
* trustRoots}.
154165
*
155166
* <p>The default is <code>null</code>.
167+
*
168+
* @since 2.0.0
156169
*/
157170
public Optional<CertStore> getCertStore() {
158171
return Optional.ofNullable(certStore);
@@ -178,6 +191,8 @@ public Optional<CertStore> getCertStore() {
178191
* Predicate}.
179192
*
180193
* <p>The default is <code>null</code>.
194+
*
195+
* @since 2.1.0
181196
*/
182197
public Optional<Predicate<PolicyNode>> getPolicyTreeValidator() {
183198
return Optional.ofNullable(policyTreeValidator);
@@ -193,6 +208,8 @@ public static class Step1 {
193208
* A set of attestation root certificates trusted to certify the relevant attestation
194209
* statement. If the attestation statement is not trusted, or if no trust roots were found,
195210
* this should be an empty set.
211+
*
212+
* @since 2.0.0
196213
*/
197214
public TrustRootsResultBuilder trustRoots(@NonNull Set<X509Certificate> trustRoots) {
198215
return new TrustRootsResultBuilder().trustRoots(trustRoots);
@@ -203,6 +220,8 @@ public TrustRootsResultBuilder trustRoots(@NonNull Set<X509Certificate> trustRoo
203220
* A set of attestation root certificates trusted to certify the relevant attestation
204221
* statement. If the attestation statement is not trusted, or if no trust roots were found,
205222
* this should be an empty set.
223+
*
224+
* @since 2.0.0
206225
*/
207226
// TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
208227
public AttestationTrustSource.TrustRootsResult.TrustRootsResultBuilder trustRoots(
@@ -224,6 +243,8 @@ public AttestationTrustSource.TrustRootsResult.TrustRootsResultBuilder trustRoot
224243
* TrustRootsResultBuilder#trustRoots(Set) trustRoots}.
225244
*
226245
* <p>The default is <code>null</code>.
246+
*
247+
* @since 2.0.0
227248
*/
228249
// TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
229250
public AttestationTrustSource.TrustRootsResult.TrustRootsResultBuilder certStore(
@@ -237,6 +258,8 @@ public AttestationTrustSource.TrustRootsResult.TrustRootsResultBuilder certStore
237258
* Whether certificate revocation should be checked during certificate path validation.
238259
*
239260
* <p>The default is <code>true</code>.
261+
*
262+
* @since 2.0.0
240263
*/
241264
// TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
242265
public AttestationTrustSource.TrustRootsResult.TrustRootsResultBuilder
@@ -267,6 +290,8 @@ public AttestationTrustSource.TrustRootsResult.TrustRootsResultBuilder certStore
267290
* Predicate}.
268291
*
269292
* <p>The default is <code>null</code>.
293+
*
294+
* @since 2.1.0
270295
*/
271296
// TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
272297
public AttestationTrustSource.TrustRootsResult.TrustRootsResultBuilder policyTreeValidator(
@@ -281,6 +306,8 @@ public AttestationTrustSource.TrustRootsResult.TrustRootsResultBuilder policyTre
281306
* A set of attestation root certificates trusted to certify the relevant attestation statement.
282307
* If the attestation statement is not trusted, or if no trust roots were found, this should be
283308
* an empty set.
309+
*
310+
* @since 2.0.0
284311
*/
285312
// TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
286313
@NonNull

0 commit comments

Comments
 (0)