Skip to content

Commit

Permalink
Release 2.5.0
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
emlun committed Jul 5, 2023
2 parents 2bebcbb + e1ed27c commit 345762b
Show file tree
Hide file tree
Showing 53 changed files with 1,487 additions and 498 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ jobs:
- name: Compile libraries and tests
run: ./gradlew clean testClasses

- name: Build archives
run: ./gradlew assemble

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
Expand All @@ -56,6 +53,19 @@ jobs:
- name: Run tests against JDK17-compiled code
run: ./gradlew test --exclude-task compileJava

- name: Archive HTML test report on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test-reports-java17-java${{ matrix.java }}-${{ matrix.distribution }}-html
path: "*/build/reports/**"

- name: Build and test with JDK ${{ matrix.java }}
run: ./gradlew clean test

- name: Build archives
run: ./gradlew assemble

- name: Archive HTML test report
if: ${{ always() }}
uses: actions/upload-artifact@v3
Expand All @@ -71,6 +81,7 @@ jobs:
path: "*/build/test-results/**/*.xml"

- name: Check binary reproducibility
if: ${{ matrix.java != 8 }} # JDK 8 does not produce reproducible binaries
run: |
./gradlew clean primaryPublishJar
find . -name '*.jar' | xargs sha256sum | tee checksums.sha256sum
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-verify-signatures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

strategy:
matrix:
java: [17]
java: ["17.0.7"]
distribution: [temurin, zulu, microsoft]

steps:
Expand Down
47 changes: 47 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
== Version 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.


== Version 2.4.1 ==

Changes:
Expand Down
272 changes: 203 additions & 69 deletions README

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ buildscript {
}
dependencies {
classpath 'com.cinnober.gradle:semver-git:2.5.0'

if (project.findProperty('yubicoPublish') == 'true') {
classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
}
}
}
plugins {
id 'java-platform'
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'

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

project.ext.isCiBuild = System.env.CI == 'true'

project.ext.publishEnabled = !isCiBuild &&
project.hasProperty('yubicoPublish') && project.yubicoPublish &&
project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')
project.ext.publishEnabled = !isCiBuild && project.findProperty('yubicoPublish') == 'true'

wrapper {
gradleVersion = '8.1.1'
Expand Down Expand Up @@ -65,6 +65,8 @@ allprojects {
}

if (publishEnabled) {
apply plugin: 'io.github.gradle-nexus.publish-plugin'

nexusPublishing {
repositories {
sonatype {
Expand Down
8 changes: 6 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ repositories {
}

dependencies {
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.13.0")
implementation("info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.9.11")
implementation("io.franzbecker:gradle-lombok:5.0.0")
implementation("io.github.cosmicsilence:gradle-scalafix:0.1.14")

// Spotless dropped Java 8 support in version 2.33.0
if (JavaVersion.current().isJava11Compatible) {
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.19.0")
implementation("io.github.cosmicsilence:gradle-scalafix:0.1.14")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
project.apply(plugin: "com.diffplug.spotless")
project.apply(plugin: "io.github.cosmicsilence.scalafix")

spotless {
java {
googleJavaFormat()
}
scala {
scalafmt("2.6.3").configFile(project.rootProject.file("scalafmt.conf"))
}
}

scalafix {
configFile.set(project.rootProject.file("scalafix.conf"))

// Work around dependency resolution issues in April 2022
semanticdb.autoConfigure.set(true)
semanticdb.version.set("4.5.5")
}

project.dependencies.scalafix("com.github.liancheng:organize-imports_2.13:0.6.0")


project.afterEvaluate {
// These need to be in afterEvaluate due to this plugin
// being conditionally applied for Java 11+ only
project.tasks.spotlessApply.configure { dependsOn(project.tasks.scalafix) }
project.tasks.spotlessCheck.configure { dependsOn(project.tasks.checkScalafix) }

// Scalafix adds tasks in afterEvaluate, so their configuration must be deferred
project.tasks.scalafix.finalizedBy(project.tasks.spotlessApply)
project.tasks.checkScalafix.finalizedBy(project.tasks.spotlessCheck)
}
8 changes: 5 additions & 3 deletions buildSrc/src/main/groovy/project-convention-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ project.afterEvaluate {
}
}

signing {
useGpgCmd()
sign(publishing.publications.jars)
if (project.findProperty("yubicoPublish") == "true") {
signing {
useGpgCmd()
sign(publishing.publications.jars)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,32 +1,4 @@
plugins {
id("com.diffplug.spotless")
id("io.github.cosmicsilence.scalafix")
}

spotless {
java {
googleJavaFormat()
}
scala {
scalafmt("2.6.3").configFile(project.rootProject.file("scalafmt.conf"))
}
}

scalafix {
configFile.set(project.rootProject.file("scalafix.conf"))

// Work around dependency resolution issues in April 2022
semanticdb.autoConfigure.set(true)
semanticdb.version.set("4.5.5")
}

project.dependencies.scalafix("com.github.liancheng:organize-imports_2.13:0.6.0")

project.tasks.spotlessApply.configure { dependsOn(project.tasks["scalafix"]) }
project.tasks.spotlessCheck.configure { dependsOn(project.tasks["checkScalafix"]) }

// Scalafix adds tasks in afterEvaluate, so their configuration must be deferred
project.afterEvaluate {
project.tasks["scalafix"].finalizedBy(project.tasks.spotlessApply)
project.tasks["checkScalafix"].finalizedBy(project.tasks.spotlessCheck)
// Spotless dropped Java 8 support in version 2.33.0
if (JavaVersion.current().isJava11Compatible) {
apply(plugin = "project-convention-code-formatting-internal")
}
19 changes: 6 additions & 13 deletions buildSrc/src/main/kotlin/project-convention-java.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@ plugins {
java
}

java {
toolchain {
// Java 8 binaries are not reproducible
languageVersion.set(JavaLanguageVersion.of(11))
}
}

tasks.withType(JavaCompile::class) {
options.compilerArgs.add("-Xlint:deprecation")
options.compilerArgs.add("-Xlint:unchecked")
options.encoding = "UTF-8"
options.release.set(8)
}

tasks.withType(Test::class) {
javaLauncher.set(javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(8))
})
if (JavaVersion.current().isJava9Compatible) {
options.release.set(8)
} else {
targetCompatibility = "1.8"
sourceCompatibility = "1.8"
}
}
3 changes: 0 additions & 3 deletions buildSrc/src/main/kotlin/project-convention-scala.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ tasks.withType(ScalaCompile::class) {
// See: https://github.com/gradle/gradle/pull/23198
// See: https://github.com/gradle/gradle/pull/23751
scalaCompileOptions.additionalParameters = mutableListOf("-Wunused")
javaLauncher.set(javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(8))
})
}
14 changes: 14 additions & 0 deletions doc/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ Developer docs
===


Setup for publishing
---

To enable publishing to Maven Central via Sonatype Nexus, set
`yubicoPublish=true` in `$HOME/.gradle/gradle.properties` and add your Sonatype
username and password. Example:

```properties
yubicoPublish=true
ossrhUsername=8pnmjKQP
ossrhPassword=bmjuyWSIik8P3Nq/ZM2G0Xs0sHEKBg+4q4zTZ8JDDRCr
```


Code formatting
---

Expand Down
Loading

1 comment on commit 345762b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mutation test results

Package Coverage Stats Prev Prev
Overall 84 % 🟢 1326 🔺 / 1570 🔺 81 % 1269 / 1561
com.yubico.fido.metadata 83 % 🟢 270 🔺 / 323 🔺 68 % 219 / 318
com.yubico.internal.util 47 % 🔹 57 🔹 / 120 🔹 47 % 57 / 120
com.yubico.webauthn 87 % 🔹 565 🔺 / 643 🔺 87 % 560 / 639
com.yubico.webauthn.attestation 92 % 🔹 13 🔹 / 14 🔹 92 % 13 / 14
com.yubico.webauthn.data 93 % 🔹 396 🔺 / 423 🔹 93 % 395 / 423
com.yubico.webauthn.extension.appid 100 % 🏆 13 🔹 / 13 🔹 100 % 13 / 13
com.yubico.webauthn.extension.uvm 50 % 🔹 12 🔹 / 24 🔹 50 % 12 / 24
com.yubico.webauthn.meta 0 % 🔹 0 🔹 / 10 🔹 0 % 0 / 10

Previous run: 1576b3d - Diff

Detailed reports: workflow run #233

Please sign in to comment.