Skip to content

Commit 345762b

Browse files
committed
Release 2.5.0
`webauthn-server-core`: Breaking changes to experimental features: - Added Jackson annotation `@JsonProperty` to method `RegisteredCredential.isBackedUp()`, changing the property name from `backedUp` to `backupState`. `backedUp` is still accepted during deserialization but will no longer be emitted during serialization. New features: - Added method `.isUserVerified()` to `RegistrationResult` and `AssertionResult` as a shortcut for accessing the UV flag in authenticator data. - Updated README and JavaDoc to use the "passkey" term and provide more guidance around passkey use cases. - Added `Automatic-Module-Name` to jar manifest. Fixes: - `AuthenticatorAttestationResponse` now tolerates and ignores properties `"publicKey"` and `"publicKeyAlgorithm"` during JSON deserialization. These properties are emitted by the `PublicKeyCredential.toJSON()` method added in WebAuthn Level 3. - Relaxed Guava dependency version constraint to include major version 32. - `RelyingParty.finishAssertion` now behaves the same if `StartAssertionOptions.allowCredentials` is explicitly set to a present, empty list as when absent. `webauthn-server-attestation`: New features: - Added option `verifyDownloadsOnly(boolean)` to `FidoMetadataDownloader`. When set to `true`, the BLOB signature will not be verified when loading a BLOB from cache or when explicitly given. Default setting is `false`, which preserves the previous behaviour. - Added `Automatic-Module-Name` to jar manifest. Fixes: - Made Jackson setting `PROPAGATE_TRANSIENT_MARKER` unnecessary for JSON serialization with Jackson version 2.15.0-rc1 and later.
2 parents 2bebcbb + e1ed27c commit 345762b

File tree

53 files changed

+1487
-498
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1487
-498
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ jobs:
4444
- name: Compile libraries and tests
4545
run: ./gradlew clean testClasses
4646

47-
- name: Build archives
48-
run: ./gradlew assemble
49-
5047
- name: Set up JDK ${{ matrix.java }}
5148
uses: actions/setup-java@v3
5249
with:
@@ -56,6 +53,19 @@ jobs:
5653
- name: Run tests against JDK17-compiled code
5754
run: ./gradlew test --exclude-task compileJava
5855

56+
- name: Archive HTML test report on failure
57+
if: ${{ failure() }}
58+
uses: actions/upload-artifact@v3
59+
with:
60+
name: test-reports-java17-java${{ matrix.java }}-${{ matrix.distribution }}-html
61+
path: "*/build/reports/**"
62+
63+
- name: Build and test with JDK ${{ matrix.java }}
64+
run: ./gradlew clean test
65+
66+
- name: Build archives
67+
run: ./gradlew assemble
68+
5969
- name: Archive HTML test report
6070
if: ${{ always() }}
6171
uses: actions/upload-artifact@v3
@@ -71,6 +81,7 @@ jobs:
7181
path: "*/build/test-results/**/*.xml"
7282

7383
- name: Check binary reproducibility
84+
if: ${{ matrix.java != 8 }} # JDK 8 does not produce reproducible binaries
7485
run: |
7586
./gradlew clean primaryPublishJar
7687
find . -name '*.jar' | xargs sha256sum | tee checksums.sha256sum

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
strategy:
4141
matrix:
42-
java: [17]
42+
java: ["17.0.7"]
4343
distribution: [temurin, zulu, microsoft]
4444

4545
steps:

NEWS

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
1+
== Version 2.5.0 ==
2+
3+
`webauthn-server-core`:
4+
5+
Breaking changes to experimental features:
6+
7+
* Added Jackson annotation `@JsonProperty` to method
8+
`RegisteredCredential.isBackedUp()`, changing the property name from
9+
`backedUp` to `backupState`. `backedUp` is still accepted during
10+
deserialization but will no longer be emitted during serialization.
11+
12+
New features:
13+
14+
* Added method `.isUserVerified()` to `RegistrationResult` and `AssertionResult`
15+
as a shortcut for accessing the UV flag in authenticator data.
16+
* Updated README and JavaDoc to use the "passkey" term and provide more guidance
17+
around passkey use cases.
18+
* Added `Automatic-Module-Name` to jar manifest.
19+
20+
Fixes:
21+
22+
* `AuthenticatorAttestationResponse` now tolerates and ignores properties
23+
`"publicKey"` and `"publicKeyAlgorithm"` during JSON deserialization. These
24+
properties are emitted by the `PublicKeyCredential.toJSON()` method added in
25+
WebAuthn Level 3.
26+
* Relaxed Guava dependency version constraint to include major version 32.
27+
* `RelyingParty.finishAssertion` now behaves the same if
28+
`StartAssertionOptions.allowCredentials` is explicitly set to a present, empty
29+
list as when absent.
30+
31+
32+
`webauthn-server-attestation`:
33+
34+
New features:
35+
36+
* Added option `verifyDownloadsOnly(boolean)` to `FidoMetadataDownloader`. When
37+
set to `true`, the BLOB signature will not be verified when loading a BLOB
38+
from cache or when explicitly given. Default setting is `false`, which
39+
preserves the previous behaviour.
40+
* Added `Automatic-Module-Name` to jar manifest.
41+
42+
Fixes:
43+
44+
* Made Jackson setting `PROPAGATE_TRANSIENT_MARKER` unnecessary for JSON
45+
serialization with Jackson version 2.15.0-rc1 and later.
46+
47+
148
== Version 2.4.1 ==
249

350
Changes:

README

Lines changed: 203 additions & 69 deletions
Large diffs are not rendered by default.

build.gradle

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ buildscript {
44
}
55
dependencies {
66
classpath 'com.cinnober.gradle:semver-git:2.5.0'
7+
8+
if (project.findProperty('yubicoPublish') == 'true') {
9+
classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
10+
}
711
}
812
}
913
plugins {
1014
id 'java-platform'
11-
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
1215

1316
// The root project has no sources, but the dependency platform also needs to be published as an artifact
1417
// See https://docs.gradle.org/current/userguide/java_platform_plugin.html
@@ -21,10 +24,7 @@ import com.yubico.gradle.GitUtils
2124
rootProject.description = "Metadata root for the com.yubico:webauthn-server-* module family"
2225

2326
project.ext.isCiBuild = System.env.CI == 'true'
24-
25-
project.ext.publishEnabled = !isCiBuild &&
26-
project.hasProperty('yubicoPublish') && project.yubicoPublish &&
27-
project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')
27+
project.ext.publishEnabled = !isCiBuild && project.findProperty('yubicoPublish') == 'true'
2828

2929
wrapper {
3030
gradleVersion = '8.1.1'
@@ -65,6 +65,8 @@ allprojects {
6565
}
6666

6767
if (publishEnabled) {
68+
apply plugin: 'io.github.gradle-nexus.publish-plugin'
69+
6870
nexusPublishing {
6971
repositories {
7072
sonatype {

buildSrc/build.gradle.kts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ repositories {
1010
}
1111

1212
dependencies {
13-
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.13.0")
1413
implementation("info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.9.11")
1514
implementation("io.franzbecker:gradle-lombok:5.0.0")
16-
implementation("io.github.cosmicsilence:gradle-scalafix:0.1.14")
15+
16+
// Spotless dropped Java 8 support in version 2.33.0
17+
if (JavaVersion.current().isJava11Compatible) {
18+
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.19.0")
19+
implementation("io.github.cosmicsilence:gradle-scalafix:0.1.14")
20+
}
1721
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
project.apply(plugin: "com.diffplug.spotless")
2+
project.apply(plugin: "io.github.cosmicsilence.scalafix")
3+
4+
spotless {
5+
java {
6+
googleJavaFormat()
7+
}
8+
scala {
9+
scalafmt("2.6.3").configFile(project.rootProject.file("scalafmt.conf"))
10+
}
11+
}
12+
13+
scalafix {
14+
configFile.set(project.rootProject.file("scalafix.conf"))
15+
16+
// Work around dependency resolution issues in April 2022
17+
semanticdb.autoConfigure.set(true)
18+
semanticdb.version.set("4.5.5")
19+
}
20+
21+
project.dependencies.scalafix("com.github.liancheng:organize-imports_2.13:0.6.0")
22+
23+
24+
project.afterEvaluate {
25+
// These need to be in afterEvaluate due to this plugin
26+
// being conditionally applied for Java 11+ only
27+
project.tasks.spotlessApply.configure { dependsOn(project.tasks.scalafix) }
28+
project.tasks.spotlessCheck.configure { dependsOn(project.tasks.checkScalafix) }
29+
30+
// Scalafix adds tasks in afterEvaluate, so their configuration must be deferred
31+
project.tasks.scalafix.finalizedBy(project.tasks.spotlessApply)
32+
project.tasks.checkScalafix.finalizedBy(project.tasks.spotlessCheck)
33+
}

buildSrc/src/main/groovy/project-convention-publish.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ project.afterEvaluate {
4949
}
5050
}
5151

52-
signing {
53-
useGpgCmd()
54-
sign(publishing.publications.jars)
52+
if (project.findProperty("yubicoPublish") == "true") {
53+
signing {
54+
useGpgCmd()
55+
sign(publishing.publications.jars)
56+
}
5557
}
5658
}
Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,4 @@
1-
plugins {
2-
id("com.diffplug.spotless")
3-
id("io.github.cosmicsilence.scalafix")
4-
}
5-
6-
spotless {
7-
java {
8-
googleJavaFormat()
9-
}
10-
scala {
11-
scalafmt("2.6.3").configFile(project.rootProject.file("scalafmt.conf"))
12-
}
13-
}
14-
15-
scalafix {
16-
configFile.set(project.rootProject.file("scalafix.conf"))
17-
18-
// Work around dependency resolution issues in April 2022
19-
semanticdb.autoConfigure.set(true)
20-
semanticdb.version.set("4.5.5")
21-
}
22-
23-
project.dependencies.scalafix("com.github.liancheng:organize-imports_2.13:0.6.0")
24-
25-
project.tasks.spotlessApply.configure { dependsOn(project.tasks["scalafix"]) }
26-
project.tasks.spotlessCheck.configure { dependsOn(project.tasks["checkScalafix"]) }
27-
28-
// Scalafix adds tasks in afterEvaluate, so their configuration must be deferred
29-
project.afterEvaluate {
30-
project.tasks["scalafix"].finalizedBy(project.tasks.spotlessApply)
31-
project.tasks["checkScalafix"].finalizedBy(project.tasks.spotlessCheck)
1+
// Spotless dropped Java 8 support in version 2.33.0
2+
if (JavaVersion.current().isJava11Compatible) {
3+
apply(plugin = "project-convention-code-formatting-internal")
324
}

buildSrc/src/main/kotlin/project-convention-java.gradle.kts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,15 @@ plugins {
22
java
33
}
44

5-
java {
6-
toolchain {
7-
// Java 8 binaries are not reproducible
8-
languageVersion.set(JavaLanguageVersion.of(11))
9-
}
10-
}
11-
125
tasks.withType(JavaCompile::class) {
136
options.compilerArgs.add("-Xlint:deprecation")
147
options.compilerArgs.add("-Xlint:unchecked")
158
options.encoding = "UTF-8"
16-
options.release.set(8)
17-
}
189

19-
tasks.withType(Test::class) {
20-
javaLauncher.set(javaToolchains.launcherFor {
21-
languageVersion.set(JavaLanguageVersion.of(8))
22-
})
10+
if (JavaVersion.current().isJava9Compatible) {
11+
options.release.set(8)
12+
} else {
13+
targetCompatibility = "1.8"
14+
sourceCompatibility = "1.8"
15+
}
2316
}

0 commit comments

Comments
 (0)