@@ -21,11 +21,16 @@ Here is a high-level outline of what needs to be updated:
2121- Remove uses of removed features.
2222- Update uses of renamed and replaced features.
2323- Replace any implementations of `MetadataService` with
24- link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.1 .0/com/yubico/webauthn/attestation/AttestationTrustSource.html[`AttestationTrustSource`].
24+ link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.0 .0/com/yubico/webauthn/attestation/AttestationTrustSource.html[`AttestationTrustSource`].
2525- Rename imports of classes in `com.yubico.fido.metadata` .
2626- Update `getUserVerification()` and `getResidentKey()` calls
2727 to expect `Optional` values.
2828
29+ This migration guide is written for version `2.0.0` of the
30+ `webauthn-server-core` module. Later `2.x` versions may introduce new features
31+ but should remain compatible without further changes; consult the release notes
32+ for a full list of new features.
33+
2934
3035== Replace dependency on `webauthn-server-core-minimal`
3136
@@ -41,7 +46,7 @@ Maven example:
4146- <artifactId>webauthn-server-core-minimal</artifactId>
4247- <version>1.12.2</version>
4348+ <artifactId>webauthn-server-core</artifactId>
44- + <version>2.1 .0</version>
49+ + <version>2.0 .0</version>
4550 <scope>compile</scope>
4651 </dependency>
4752----------
@@ -51,7 +56,7 @@ Gradle:
5156[source,diff]
5257----------
5358-compile 'com.yubico:webauthn-server-core-minimal:1.12.2'
54- +compile 'com.yubico:webauthn-server-core:2.1 .0'
59+ +compile 'com.yubico:webauthn-server-core:2.0 .0'
5560----------
5661
5762
@@ -85,7 +90,7 @@ implementation 'org.bouncycastle:bcprov-jdk15on:1.70'
8590----------
8691
8792Then set up the provider. This should be done before instantiating
88- link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.1 .0/com/yubico/webauthn/RelyingParty.html[`RelyingParty`].
93+ link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.0 .0/com/yubico/webauthn/RelyingParty.html[`RelyingParty`].
8994
9095Example:
9196
@@ -102,9 +107,9 @@ Security.addProvider(new BouncyCastleProvider());
102107Several fields, methods and settings have been removed:
103108
104109- The `icon` field in
105- link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.1 .0/com/yubico/webauthn/data/RelyingPartyIdentity.html[`RelyingPartyIdentity`]
110+ link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.0 .0/com/yubico/webauthn/data/RelyingPartyIdentity.html[`RelyingPartyIdentity`]
106111 and
107- link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.1 .0/com/yubico/webauthn/data/UserIdentity.html[`UserIdentity`],
112+ link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.0 .0/com/yubico/webauthn/data/UserIdentity.html[`UserIdentity`],
108113 and its associated methods.
109114 They were removed in WebAuthn Level 2 and have no replacement.
110115+
@@ -127,7 +132,7 @@ Example:
127132----------
128133
129134- The setting `allowUnrequestedExtensions(boolean)` in
130- link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.1 .0/com/yubico/webauthn/RelyingParty.html[`RelyingParty`].
135+ link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.0 .0/com/yubico/webauthn/RelyingParty.html[`RelyingParty`].
131136+
132137WebAuthn Level 2 now recommends that unrequested extensions should be allowed,
133138so this setting has been removed and is now always enabled.
@@ -207,11 +212,11 @@ Example:
207212== Update uses of renamed and replaced features
208213
209214- Methods `requireResidentKey(boolean)` and `isRequireResidentKey()` in
210- link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.1 .0/com/yubico/webauthn/data/AuthenticatorSelectionCriteria.html[`AuthenticatorSelectionCriteria`]
215+ link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.0 .0/com/yubico/webauthn/data/AuthenticatorSelectionCriteria.html[`AuthenticatorSelectionCriteria`]
211216 have been replaced by
212- link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.1 .0/com/yubico/webauthn/data/AuthenticatorSelectionCriteria.AuthenticatorSelectionCriteriaBuilder.html#residentKey(com.yubico.webauthn.data.ResidentKeyRequirement)[`residentKey(ResidentKeyRequirement)`]
217+ link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.0 .0/com/yubico/webauthn/data/AuthenticatorSelectionCriteria.AuthenticatorSelectionCriteriaBuilder.html#residentKey(com.yubico.webauthn.data.ResidentKeyRequirement)[`residentKey(ResidentKeyRequirement)`]
213218 and
214- link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.1 .0/com/yubico/webauthn/data/AuthenticatorSelectionCriteria.html#getResidentKey()[`getResidentKey()`],
219+ link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.0 .0/com/yubico/webauthn/data/AuthenticatorSelectionCriteria.html#getResidentKey()[`getResidentKey()`],
215220 respectively.
216221+
217222Replace `requireResidentKey(false)`
@@ -262,17 +267,17 @@ Example:
262267== Replace implementations of `MetadataService`
263268
264269The `MetadataService` interface has been replaced with
265- link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.1 .0/com/yubico/webauthn/attestation/AttestationTrustSource.html[`AttestationTrustSource`].
270+ link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.0 .0/com/yubico/webauthn/attestation/AttestationTrustSource.html[`AttestationTrustSource`].
266271The new interface has some key differences:
267272
268273- `MetadataService` implementations were expected to validate
269274 the attestation certificate path.
270275 `AttestationTrustSource` implementations are not;
271276 instead they only need to retrieve the trust root certificates.
272277 The
273- link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.1 .0/com/yubico/webauthn/RelyingParty.html#finishRegistration(com.yubico.webauthn.FinishRegistrationOptions)[`RelyingParty.finishRegistration`]
278+ link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.0 .0/com/yubico/webauthn/RelyingParty.html#finishRegistration(com.yubico.webauthn.FinishRegistrationOptions)[`RelyingParty.finishRegistration`]
274279 method will perform certificate path validation internally and report the result via
275- link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.1 .0/com/yubico/webauthn/RegistrationResult.html#isAttestationTrusted()[`RegistrationResult.isAttestationTrusted()`].
280+ link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.0 .0/com/yubico/webauthn/RegistrationResult.html#isAttestationTrusted()[`RegistrationResult.isAttestationTrusted()`].
276281 The `AttestationTrustSource` may also return a `CertStore`
277282 of untrusted certificates and CRLs that may be needed
278283 for certificate path validation,
@@ -286,10 +291,10 @@ The new interface has some key differences:
286291 but `RelyingParty` will not integrate them in the core result types.
287292
288293See the
289- link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.1 .0/com/yubico/webauthn/attestation/AttestationTrustSource.html[JavaDoc
294+ link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.0 .0/com/yubico/webauthn/attestation/AttestationTrustSource.html[JavaDoc
290295for `AttestationTrustSource`] for details on how to implement it,
291296and see the
292- link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-attestation/2.1 .0/com/yubico/fido/metadata/FidoMetadataService.html[`FidoMetadataService`]
297+ link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-attestation/2.0 .0/com/yubico/fido/metadata/FidoMetadataService.html[`FidoMetadataService`]
293298class in the
294299link:../webauthn-server-attestation[`webauthn-server-attestation` module]
295300for a reference implementation.
@@ -323,16 +328,16 @@ link:https://github.com/w3c/webauthn/issues/1253[turned out to cause confusion].
323328Therefore, browsers have started issuing console warnings
324329when `userVerification` is not set explicitly.
325330This library has mirrored the defaults for
326- link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.1 .0/com/yubico/webauthn/data/PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder.html#userVerification(com.yubico.webauthn.data.UserVerificationRequirement)[`PublicKeyCredentialRequestOptions.userVerification`]
331+ link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.0 .0/com/yubico/webauthn/data/PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder.html#userVerification(com.yubico.webauthn.data.UserVerificationRequirement)[`PublicKeyCredentialRequestOptions.userVerification`]
327332and
328- link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.1 .0/com/yubico/webauthn/data/AuthenticatorSelectionCriteria.AuthenticatorSelectionCriteriaBuilder.html#userVerification(com.yubico.webauthn.data.UserVerificationRequirement)[`AuthenticatorSelectionCriteria.userVerification`],
333+ link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.0 .0/com/yubico/webauthn/data/AuthenticatorSelectionCriteria.AuthenticatorSelectionCriteriaBuilder.html#userVerification(com.yubico.webauthn.data.UserVerificationRequirement)[`AuthenticatorSelectionCriteria.userVerification`],
329334but this inadvertently suppresses any browser console warnings
330335since the library emits parameter objects with an explicit value set,
331336even if the value was not explicitly set at the library level.
332337The defaults have therefore been removed,
333338and the corresponding getters now return `Optional` values.
334339For consistency, the same change applies to
335- link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.1 .0/com/yubico/webauthn/data/AuthenticatorSelectionCriteria.AuthenticatorSelectionCriteriaBuilder.html#residentKey(com.yubico.webauthn.data.ResidentKeyRequirement)[`AuthenticatorSelectionCriteria.residentKey`]
340+ link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/2.0 .0/com/yubico/webauthn/data/AuthenticatorSelectionCriteria.AuthenticatorSelectionCriteriaBuilder.html#residentKey(com.yubico.webauthn.data.ResidentKeyRequirement)[`AuthenticatorSelectionCriteria.residentKey`]
336341as well.
337342
338343The setters for these settings remain unchanged,
0 commit comments