@@ -21,11 +21,16 @@ Here is a high-level outline of what needs to be updated:
21
21
- Remove uses of removed features.
22
22
- Update uses of renamed and replaced features.
23
23
- 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`].
25
25
- Rename imports of classes in `com.yubico.fido.metadata` .
26
26
- Update `getUserVerification()` and `getResidentKey()` calls
27
27
to expect `Optional` values.
28
28
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
+
29
34
30
35
== Replace dependency on `webauthn-server-core-minimal`
31
36
@@ -41,7 +46,7 @@ Maven example:
41
46
- <artifactId>webauthn-server-core-minimal</artifactId>
42
47
- <version>1.12.2</version>
43
48
+ <artifactId>webauthn-server-core</artifactId>
44
- + <version>2.1 .0</version>
49
+ + <version>2.0 .0</version>
45
50
<scope>compile</scope>
46
51
</dependency>
47
52
----------
@@ -51,7 +56,7 @@ Gradle:
51
56
[source,diff]
52
57
----------
53
58
-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'
55
60
----------
56
61
57
62
@@ -85,7 +90,7 @@ implementation 'org.bouncycastle:bcprov-jdk15on:1.70'
85
90
----------
86
91
87
92
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`].
89
94
90
95
Example:
91
96
@@ -102,9 +107,9 @@ Security.addProvider(new BouncyCastleProvider());
102
107
Several fields, methods and settings have been removed:
103
108
104
109
- 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`]
106
111
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`],
108
113
and its associated methods.
109
114
They were removed in WebAuthn Level 2 and have no replacement.
110
115
+
@@ -127,7 +132,7 @@ Example:
127
132
----------
128
133
129
134
- 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`].
131
136
+
132
137
WebAuthn Level 2 now recommends that unrequested extensions should be allowed,
133
138
so this setting has been removed and is now always enabled.
@@ -207,11 +212,11 @@ Example:
207
212
== Update uses of renamed and replaced features
208
213
209
214
- 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`]
211
216
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)`]
213
218
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()`],
215
220
respectively.
216
221
+
217
222
Replace `requireResidentKey(false)`
@@ -262,17 +267,17 @@ Example:
262
267
== Replace implementations of `MetadataService`
263
268
264
269
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`].
266
271
The new interface has some key differences:
267
272
268
273
- `MetadataService` implementations were expected to validate
269
274
the attestation certificate path.
270
275
`AttestationTrustSource` implementations are not;
271
276
instead they only need to retrieve the trust root certificates.
272
277
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`]
274
279
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()`].
276
281
The `AttestationTrustSource` may also return a `CertStore`
277
282
of untrusted certificates and CRLs that may be needed
278
283
for certificate path validation,
@@ -286,10 +291,10 @@ The new interface has some key differences:
286
291
but `RelyingParty` will not integrate them in the core result types.
287
292
288
293
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
290
295
for `AttestationTrustSource`] for details on how to implement it,
291
296
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`]
293
298
class in the
294
299
link:../webauthn-server-attestation[`webauthn-server-attestation` module]
295
300
for a reference implementation.
@@ -323,16 +328,16 @@ link:https://github.com/w3c/webauthn/issues/1253[turned out to cause confusion].
323
328
Therefore, browsers have started issuing console warnings
324
329
when `userVerification` is not set explicitly.
325
330
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`]
327
332
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`],
329
334
but this inadvertently suppresses any browser console warnings
330
335
since the library emits parameter objects with an explicit value set,
331
336
even if the value was not explicitly set at the library level.
332
337
The defaults have therefore been removed,
333
338
and the corresponding getters now return `Optional` values.
334
339
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`]
336
341
as well.
337
342
338
343
The setters for these settings remain unchanged,
0 commit comments