Skip to content

Commit ab1fac4

Browse files
committed
Release 2.2.0
`webauthn-server-core`: Changes: - Changed internal structure of `RegistrationResult` and `AssertionResult`. This may affect you if you use Jackson or similar tools to serialize these values to JSON, for example. This is not an officially supported use case and thus does not warrant a major version bump. - Removed methods `RegistrationResult.toBuilder()` and `AssertionResult.toBuilder()`. Both had package-private return types, and thus were not usable by outside callers. New features: - (Experimental) Added support for the new `BE` (backup eligible) and `BS` (backup state) flags in authenticator data: - NOTE: Experimental features may receive breaking changes without a major version increase. - Added `BE` and `BS` properties to `AuthenticatorDataFlags`, reflecting the respective flags (bits 0x08 and 0x10). - Added methods `isBackupEligible()` and `isBackedUp()` to `RegistrationResult` and `AssertionResult`, reflecting respectively the `BE` and `BS` flags. - Added properties `backupEligible` and `backupState`, getters `isBackupEligible()` and `isBackedUp()`, and corresponding builder methods to `RegisteredCredential`. `RelyingParty.finishAssertion(...)` will now validate that if `RegisteredCredential.isBackupEligible()` is present, then the `BE` flag of any assertion of that credential must match the stored value. Fixes: - Fixed TPM attestation verification rejecting attestation certificates with TPM Device Attributes split between multiple RelativeDistinguishedName structures in the Subject Alternative Names extension. - Thanks to Oussama Zgheb for the contribution, see #241 - Fixed various errors in JavaDoc. `webauthn-server-attestation`: Fixes: - Improved documentation of guarantees provided by `FidoMetadataDownloader` and required of its parameters.
2 parents 3468431 + 780f5a9 commit ab1fac4

31 files changed

+1403
-587
lines changed

.github/workflows/release-verify-signatures.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: Reproducible binary
66

77
on:
88
release:
9-
types: [published, edited]
9+
types: [published]
1010

1111
jobs:
1212
download:

NEWS

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1+
== Version 2.2.0 ==
2+
3+
`webauthn-server-core`:
4+
5+
Changes:
6+
7+
* Changed internal structure of `RegistrationResult` and `AssertionResult`. This
8+
may affect you if you use Jackson or similar tools to serialize these values
9+
to JSON, for example. This is not an officially supported use case and thus
10+
does not warrant a major version bump.
11+
* Removed methods `RegistrationResult.toBuilder()` and
12+
`AssertionResult.toBuilder()`. Both had package-private return types, and thus
13+
were not usable by outside callers.
14+
15+
New features:
16+
17+
* (Experimental) Added support for the new `BE` (backup eligible) and `BS`
18+
(backup state) flags in authenticator data:
19+
** NOTE: Experimental features may receive breaking changes without a major
20+
version increase.
21+
** Added `BE` and `BS` properties to `AuthenticatorDataFlags`, reflecting the
22+
respective flags (bits 0x08 and 0x10).
23+
** Added methods `isBackupEligible()` and `isBackedUp()` to
24+
`RegistrationResult` and `AssertionResult`, reflecting respectively the `BE`
25+
and `BS` flags.
26+
** Added properties `backupEligible` and `backupState`, getters
27+
`isBackupEligible()` and `isBackedUp()`, and corresponding builder methods
28+
to `RegisteredCredential`. `RelyingParty.finishAssertion(...)` will now
29+
validate that if `RegisteredCredential.isBackupEligible()` is present, then
30+
the `BE` flag of any assertion of that credential must match the stored
31+
value.
32+
33+
Fixes:
34+
35+
* Fixed TPM attestation verification rejecting attestation certificates with TPM
36+
Device Attributes split between multiple RelativeDistinguishedName structures
37+
in the Subject Alternative Names extension.
38+
** Thanks to Oussama Zgheb for the contribution, see
39+
https://github.com/Yubico/java-webauthn-server/pull/241
40+
* Fixed various errors in JavaDoc.
41+
42+
43+
`webauthn-server-attestation`:
44+
45+
Fixes:
46+
47+
* Improved documentation of guaranteed provided by `FidoMetadataDownloader` and
48+
required of its parameters.
49+
50+
151
== Version 2.1.0 ==
252

353
`webauthn-server-core`:
@@ -16,7 +66,6 @@ Deprecations:
1666

1767
New features:
1868

19-
* Added method `FidoMetadataDownloader.refreshBlob()`.
2069
* Added function `COSEAlgorithmIdentifier.fromPublicKey(ByteArray)`.
2170
* Added method `AssertionResult.getCredential(): RegisteredCredential`.
2271
* Added support for the `"tpm"` attestation statement format.
@@ -48,6 +97,10 @@ Changes:
4897
* Promoted log messages in `FidoMetadataDownloader` about BLOB signature failure
4998
and cache corruption from DEBUG level to WARN level.
5099

100+
New features:
101+
102+
* Added method `FidoMetadataDownloader.refreshBlob()`.
103+
51104
Fixes:
52105

53106
* Fixed various typos and mistakes in JavaDocs.

README

Lines changed: 51 additions & 38 deletions
Large diffs are not rendered by default.

buildSrc/build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ repositories {
77
}
88

99
dependencies {
10-
implementation("commons-io:commons-io:2.5")
11-
implementation("info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.5.1")
10+
implementation("info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.9.0")
1211
}

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,

test-platform/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ description = "Dependency constraints for tests"
77
dependencies {
88
constraints {
99
api("junit:junit:4.13.2")
10+
api("org.bouncycastle:bcpkix-jdk18on:[1.62,2)")
11+
api("org.bouncycastle:bcprov-jdk18on:[1.62,2)")
1012
api("org.mockito:mockito-core:4.7.0")
1113
api("org.scalacheck:scalacheck_2.13:1.16.0")
1214
api("org.scalatest:scalatest_2.13:3.2.13")
1315
api("org.scalatestplus:junit-4-13_2.13:3.2.13.0")
1416
api("org.scalatestplus:scalacheck-1-16_2.13:3.2.13.0")
17+
api("org.slf4j:slf4j-nop:2.0.3")
1518
api("uk.org.lidalia:slf4j-test:1.2.0")
16-
api("org.bouncycastle:bcpkix-jdk18on:[1.62,2)")
17-
api("org.bouncycastle:bcprov-jdk18on:[1.62,2)")
1819
}
1920
}

0 commit comments

Comments
 (0)