Skip to content

Commit d0bcdc7

Browse files
committed
Version 1.9.0
webauthn-server-attestation: - Fixed that `SimpleAttestationResolver` would return empty transports when transports are unknown. webauthn-server-core: - Added support for the `"apple"` attestation statement format. Other: - Dependency versions moved to new meta-module `webauthn-server-parent`. Users should never need to depend on `webauthn-server-parent` directly.
2 parents 9023482 + f96ca0a commit d0bcdc7

File tree

206 files changed

+16757
-12783
lines changed

Some content is hidden

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

206 files changed

+16757
-12783
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,34 @@ jobs:
2424
- name: Run tests
2525
run: ./gradlew cleanTest check
2626

27-
- name: Archive test report
27+
- name: Archive HTML test report
2828
if: ${{ always() }}
2929
uses: actions/upload-artifact@v2
3030
with:
31-
name: test-reports
31+
name: test-reports-java${{ matrix.java }}-html
3232
path: "*/build/reports/**"
3333

34+
- name: Archive JUnit test report
35+
if: ${{ always() }}
36+
uses: actions/upload-artifact@v2
37+
with:
38+
name: test-reports-java${{ matrix.java }}-xml
39+
path: "*/build/test-results/**/*.xml"
40+
3441
- name: Build JavaDoc
3542
run: ./gradlew assembleJavadoc
43+
44+
publish-test-results:
45+
name: Publish test results
46+
needs: test
47+
runs-on: ubuntu-latest
48+
if: ${{ always() && github.event_name == 'pull_request' }}
49+
50+
steps:
51+
- name: Download artifacts
52+
uses: actions/download-artifact@v2
53+
54+
- name: Publish test results
55+
uses: EnricoMi/publish-unit-test-result-action@v1
56+
with:
57+
files: "**/*.xml"

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: "Code scanning - action"
22

33
on:
44
push:
5+
branches-ignore: 'dependabot/**'
56
pull_request:
67
schedule:
78
- cron: '0 12 * * 2'

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,20 @@ jobs:
3636
3737
wget https://github.com/${GITHUB_REPOSITORY}/releases/download/${TAGNAME}/webauthn-server-attestation-${TAGNAME}.jar.asc
3838
wget https://github.com/${GITHUB_REPOSITORY}/releases/download/${TAGNAME}/webauthn-server-core-${TAGNAME}.jar.asc
39+
wget https://github.com/${GITHUB_REPOSITORY}/releases/download/${TAGNAME}/webauthn-server-core-minimal-${TAGNAME}.jar.asc
3940
4041
gpg --no-default-keyring --keyring yubico --verify webauthn-server-attestation-${TAGNAME}.jar.asc webauthn-server-attestation/build/libs/webauthn-server-attestation-${TAGNAME}.jar
41-
gpg --no-default-keyring --keyring yubico --verify webauthn-server-core-${TAGNAME}.jar.asc webauthn-server-core/build/libs/webauthn-server-core-${TAGNAME}.jar
42+
gpg --no-default-keyring --keyring yubico --verify webauthn-server-core-${TAGNAME}.jar.asc webauthn-server-core-bundle/build/libs/webauthn-server-core-${TAGNAME}.jar
43+
gpg --no-default-keyring --keyring yubico --verify webauthn-server-core-minimal-${TAGNAME}.jar.asc webauthn-server-core/build/libs/webauthn-server-core-minimal-${TAGNAME}.jar
4244
4345
- name: Verify signatures from Maven Central
4446
run: |
4547
export TAGNAME=${GITHUB_REF#refs/tags/}
4648
4749
wget -O webauthn-server-core-${TAGNAME}.jar.mavencentral.asc https://repo1.maven.org/maven2/com/yubico/webauthn-server-core/${TAGNAME}/webauthn-server-core-${TAGNAME}.jar.asc
50+
wget -O webauthn-server-core-minimal-${TAGNAME}.jar.mavencentral.asc https://repo1.maven.org/maven2/com/yubico/webauthn-server-core-minimal-/${TAGNAME}/webauthn-server-core-minimal-${TAGNAME}.jar.asc
4851
wget -O webauthn-server-attestation-${TAGNAME}.jar.mavencentral.asc https://repo1.maven.org/maven2/com/yubico/webauthn-server-attestation/${TAGNAME}/webauthn-server-attestation-${TAGNAME}.jar.asc
4952
5053
gpg --no-default-keyring --keyring yubico --verify webauthn-server-attestation-${TAGNAME}.jar.mavencentral.asc webauthn-server-attestation/build/libs/webauthn-server-attestation-${TAGNAME}.jar
51-
gpg --no-default-keyring --keyring yubico --verify webauthn-server-core-${TAGNAME}.jar.mavencentral.asc webauthn-server-core/build/libs/webauthn-server-core-${TAGNAME}.jar
54+
gpg --no-default-keyring --keyring yubico --verify webauthn-server-core-${TAGNAME}.jar.mavencentral.asc webauthn-server-core-bundle/build/libs/webauthn-server-core-${TAGNAME}.jar
55+
gpg --no-default-keyring --keyring yubico --verify webauthn-server-core-minimal-${TAGNAME}.jar.mavencentral.asc webauthn-server-core/build/libs/webauthn-server-core-minimal-${TAGNAME}.jar

NEWS

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
== Version 1.9.0 ==
2+
3+
webauthn-server-attestation:
4+
5+
* Fixed that `SimpleAttestationResolver` would return empty transports when
6+
transports are unknown.
7+
8+
webauthn-server-core:
9+
10+
* Added support for the `"apple"` attestation statement format.
11+
12+
Other:
13+
14+
* Dependency versions moved to new meta-module `webauthn-server-parent`. Users
15+
should never need to depend on `webauthn-server-parent` directly.
16+
17+
118
== Version 1.8.0 ==
219

320
Changes:

README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ Maven:
2525
<dependency>
2626
<groupId>com.yubico</groupId>
2727
<artifactId>webauthn-server-core</artifactId>
28-
<version>1.8.0</version>
28+
<version>1.9.0</version>
2929
<scope>compile</scope>
3030
</dependency>
3131
----------
3232

3333
Gradle:
3434

3535
----------
36-
compile 'com.yubico:webauthn-server-core:1.8.0'
36+
compile 'com.yubico:webauthn-server-core:1.9.0'
3737
----------
3838

3939
=== Semantic versioning

build.gradle

Lines changed: 125 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@ buildscript {
44
}
55
dependencies {
66
classpath 'com.cinnober.gradle:semver-git:2.5.0'
7+
classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.12.4'
8+
classpath 'io.github.cosmicsilence:gradle-scalafix:0.1.8'
79
}
810
}
911
plugins {
10-
id 'com.github.kt3k.coveralls' version '2.11.0'
12+
id 'java-platform'
13+
id 'com.github.kt3k.coveralls' version '2.12.0'
1114
id 'io.codearte.nexus-staging' version '0.30.0'
1215
id 'io.franzbecker.gradle-lombok' version '4.0.0'
1316
}
1417

1518
import io.franzbecker.gradle.lombok.LombokPlugin
1619
import io.franzbecker.gradle.lombok.task.DelombokTask
1720

21+
rootProject.description = "Metadata root for the com.yubico:webauthn-server-* module family"
22+
1823
project.ext.isCiBuild = System.env.CI == 'true'
1924

2025
project.ext.publishEnabled = !isCiBuild &&
@@ -33,11 +38,36 @@ wrapper {
3338
gradleVersion = '6.8'
3439
}
3540

41+
dependencies {
42+
constraints {
43+
api('ch.qos.logback:logback-classic:[1.2.3,2)')
44+
api('com.augustcellars.cose:cose-java:[1.0.0,2)')
45+
api('com.fasterxml.jackson.core:jackson-databind:[2.11.0,3)')
46+
api('com.google.guava:guava:[24.1.1,31)')
47+
api('com.upokecenter:cbor:[4.0.1,5)')
48+
api('javax.ws.rs:javax.ws.rs-api:[2.1,3)')
49+
api('javax.xml.bind:jaxb-api:[2.3.0,3)')
50+
api('junit:junit:[4.12,5)')
51+
api('org.apache.httpcomponents:httpclient:[4.5.2,5)')
52+
api('org.bouncycastle:bcpkix-jdk15on:[1.62,2)')
53+
api('org.bouncycastle:bcprov-jdk15on:[1.62,2)')
54+
api('org.eclipse.jetty:jetty-servlet:[9.4.9.v20180320,10)')
55+
api('org.glassfish.jersey.containers:jersey-container-servlet-core:[2.26,3)')
56+
api('org.glassfish.jersey.containers:jersey-container-servlet:[2.26,3)')
57+
api('org.glassfish.jersey.inject:jersey-hk2:[2.26,3)')
58+
api('org.mockito:mockito-core:[2.27.0,3)')
59+
api('org.scalacheck:scalacheck_2.13:[1.14.0,2)')
60+
api('org.scalatest:scalatest_2.13:[3.0.8,3.1)')
61+
api('org.slf4j:slf4j-api:[1.7.25,2)')
62+
}
63+
}
64+
3665
allprojects {
3766
ext.snapshotSuffix = "<count>.g<sha>-SNAPSHOT<dirty>"
3867
ext.dirtyMarker = "-DIRTY"
3968

4069
apply plugin: 'com.cinnober.gradle.semver-git'
70+
apply plugin: 'com.diffplug.spotless'
4171
apply plugin: 'idea'
4272

4373
group = 'com.yubico'
@@ -48,34 +78,6 @@ allprojects {
4878
}
4979
}
5080

51-
Map<String, String> dependencyVersions = [
52-
'ch.qos.logback:logback-classic:[1.2.3,2)',
53-
'com.augustcellars.cose:cose-java:[1.0.0,2)',
54-
'com.fasterxml.jackson.core:jackson-databind:[2.11.0,3)',
55-
'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:[2.11.0,3)',
56-
'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:[2.11.0,3)',
57-
'com.google.guava:guava:[24.1.1,30)',
58-
'com.upokecenter:cbor:[4.0.1,5)',
59-
'javax.activation:activation:[1.1.1,2)',
60-
'javax.ws.rs:javax.ws.rs-api:[2.1,3)',
61-
'javax.xml.bind:jaxb-api:[2.3.0,3)',
62-
'junit:junit:[4.12,5)',
63-
'org.apache.httpcomponents:httpclient:[4.5.2,5)',
64-
'org.bouncycastle:bcpkix-jdk15on:[1.62,2)',
65-
'org.bouncycastle:bcprov-jdk15on:[1.62,2)',
66-
'org.eclipse.jetty:jetty-server:[9.4.9.v20180320,10)',
67-
'org.eclipse.jetty:jetty-servlet:[9.4.9.v20180320,10)',
68-
'org.glassfish.jersey.containers:jersey-container-servlet-core:[2.26,3)',
69-
'org.glassfish.jersey.containers:jersey-container-servlet:[2.26,3)',
70-
'org.glassfish.jersey.inject:jersey-hk2:[2.26,3)',
71-
'org.mockito:mockito-core:[2.27.0,3)',
72-
'org.scala-lang:scala-library:[2.13.1,3)',
73-
'org.scalacheck:scalacheck_2.13:[1.14.0,2)',
74-
'org.scalatest:scalatest_2.13:[3.0.8,3.1)',
75-
'org.slf4j:slf4j-api:[1.7.25,2)',
76-
].collectEntries { [(it.split(':')[0..1].join(':')): it] }
77-
rootProject.ext.addVersion = { dep -> dependencyVersions[dep] }
78-
7981
subprojects {
8082
apply plugin: LombokPlugin
8183

@@ -94,6 +96,16 @@ subprojects {
9496

9597
maven { url "https://repo.maven.apache.org/maven2" }
9698
}
99+
100+
spotless {
101+
java {
102+
googleJavaFormat()
103+
}
104+
scala {
105+
scalafmt('2.6.3').configFile(rootProject.file('scalafmt.conf'))
106+
}
107+
}
108+
tasks.check.dependsOn spotlessCheck
97109
}
98110

99111
allprojects {
@@ -111,20 +123,34 @@ String getGitCommit() {
111123
def proc = "git rev-parse HEAD".execute(null, projectDir)
112124
proc.waitFor()
113125
if (proc.exitValue() != 0) {
114-
throw new RuntimeException("Failed to get git commit ID");
126+
return null
115127
}
116128
return proc.text.trim()
117129
}
118130

119-
subprojects { project ->
131+
String getGitCommitOrUnknown() {
132+
return getGitCommit() ?: 'UNKNOWN'
133+
}
120134

121-
sourceCompatibility = 1.8
122-
targetCompatibility = 1.8
135+
subprojects { project ->
123136

137+
if (project.plugins.hasPlugin('scala')) {
138+
project.scalafix {
139+
configFile = rootProject.file('scalafix.conf')
140+
}
141+
dependencies.scalafix('com.github.liancheng:organize-imports_2.13:0.5.0')
142+
project.tasks.spotlessApply.dependsOn(project.tasks.scalafix)
143+
project.tasks.spotlessCheck.dependsOn(project.tasks.checkScalafix)
144+
project.tasks.scalafix.finalizedBy(project.tasks.spotlessApply)
145+
project.tasks.checkScalafix.finalizedBy(project.tasks.spotlessCheck)
146+
}
124147

125148
tasks.withType(JavaCompile) {
126149
options.encoding = 'UTF-8'
127150
}
151+
tasks.withType(ScalaCompile) {
152+
scalaCompileOptions.additionalParameters = ['-Wunused']
153+
}
128154

129155
tasks.withType(AbstractArchiveTask) {
130156
from(rootProject.file('COPYING'))
@@ -136,7 +162,7 @@ subprojects { project ->
136162
it.dependsOn check
137163
}
138164

139-
test {
165+
tasks.withType(AbstractTestTask) {
140166
testLogging {
141167
showStandardStreams = isCiBuild
142168
}
@@ -192,6 +218,10 @@ subprojects { project ->
192218
apply plugin: 'maven-publish'
193219
apply plugin: 'signing'
194220

221+
if (getGitCommit() == null) {
222+
throw new RuntimeException("Failed to get git commit ID");
223+
}
224+
195225
publishing {
196226
publications {
197227
jars(MavenPublication) {
@@ -248,10 +278,70 @@ subprojects { project ->
248278
}
249279
}
250280

281+
// The root project has no sources, but the dependency platform also needs to be published as an artifact
282+
// See https://docs.gradle.org/current/userguide/java_platform_plugin.html
283+
// See https://github.com/Yubico/java-webauthn-server/issues/93#issuecomment-822806951
284+
if (publishEnabled) {
285+
apply plugin: 'maven-publish'
286+
apply plugin: 'signing'
287+
288+
publishing {
289+
publications {
290+
jars(MavenPublication) {
291+
from components.javaPlatform
292+
293+
pom {
294+
name = project.name
295+
description = project.description
296+
url = 'https://developers.yubico.com/java-webauthn-server/'
297+
298+
developers {
299+
developer {
300+
id = 'emil'
301+
name = 'Emil Lundberg'
302+
303+
}
304+
}
305+
306+
licenses {
307+
license {
308+
name = 'BSD-license'
309+
comments = 'Revised 2-clause BSD license'
310+
}
311+
}
312+
313+
scm {
314+
url = 'scm:git:git://github.com/Yubico/java-webauthn-server.git'
315+
connection = 'scm:git:git://github.com/Yubico/java-webauthn-server.git'
316+
developerConnection = 'scm:git:ssh://[email protected]/Yubico/java-webauthn-server.git'
317+
tag = 'HEAD'
318+
}
319+
}
320+
}
321+
}
322+
323+
repositories {
324+
maven {
325+
name = "sonatypeNexus"
326+
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
327+
credentials {
328+
username ossrhUsername
329+
password ossrhPassword
330+
}
331+
}
332+
}
333+
}
334+
335+
signing {
336+
useGpgCmd()
337+
sign publishing.publications.jars
338+
}
339+
}
340+
251341
task pitestMerge(type: com.yubico.gradle.pitest.tasks.PitestMergeTask)
252342

253343
coveralls {
254-
sourceDirs = subprojects.sourceSets.main.allSource.srcDirs.flatten()
344+
sourceDirs = subprojects.findAll({ project.hasProperty('sourceSets') }).sourceSets.main.allSource.srcDirs.flatten()
255345
}
256346
tasks.coveralls {
257347
inputs.files pitestMerge.outputs.files

doc/development.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,11 @@ and the `webauthn-server-core-minimal` module is hosted in `webauthn-server-core
1414
We intend to eliminate the `webauthn-server-core-bundle` subproject in the next major version release,
1515
and return the current `webauthn-server-core-minimal` module to the `webauthn-server-core` module name.
1616
This naming inconsistency should be fixed along with this.
17+
18+
19+
Code formatting
20+
---
21+
22+
Use `./gradlew spotlessApply` to run the automatic code formatter.
23+
You can also run it in continuous mode as `./gradlew --continuous spotlessApply`
24+
to reformat whenever a file changes.

0 commit comments

Comments
 (0)