Skip to content

Commit 3dd10a4

Browse files
committed
Restore migration guide to referring to webauthn-server-core 2.0.0
1 parent 7eaac10 commit 3dd10a4

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

doc/Migrating_from_v1.adoc

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -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

8792
Then 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

9095
Example:
9196

@@ -102,9 +107,9 @@ Security.addProvider(new BouncyCastleProvider());
102107
Several 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
+
132137
WebAuthn Level 2 now recommends that unrequested extensions should be allowed,
133138
so 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
+
217222
Replace `requireResidentKey(false)`
@@ -262,17 +267,17 @@ Example:
262267
== Replace implementations of `MetadataService`
263268

264269
The `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`].
266271
The 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

288293
See 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
290295
for `AttestationTrustSource`] for details on how to implement it,
291296
and 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`]
293298
class in the
294299
link:../webauthn-server-attestation[`webauthn-server-attestation` module]
295300
for a reference implementation.
@@ -323,16 +328,16 @@ link:https://github.com/w3c/webauthn/issues/1253[turned out to cause confusion].
323328
Therefore, browsers have started issuing console warnings
324329
when `userVerification` is not set explicitly.
325330
This 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`]
327332
and
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`],
329334
but this inadvertently suppresses any browser console warnings
330335
since the library emits parameter objects with an explicit value set,
331336
even if the value was not explicitly set at the library level.
332337
The defaults have therefore been removed,
333338
and the corresponding getters now return `Optional` values.
334339
For 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`]
336341
as well.
337342

338343
The setters for these settings remain unchanged,

0 commit comments

Comments
 (0)