Skip to content

Commit e4bca2e

Browse files
authored
Merge pull request #98 from travisspencer/issue-97-remove-bouncy-castle
issue #97 - remove dependence on Bouncy Castle
2 parents 5b1b08e + 35ce19c commit e4bca2e

File tree

52 files changed

+3315
-2872
lines changed

Some content is hidden

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

52 files changed

+3315
-2872
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
java: [8, 11, 13]
13+
java: [8, 11, 15]
1414

1515
steps:
1616
- name: Check out code
@@ -22,7 +22,14 @@ jobs:
2222
java-version: ${{ matrix.java }}
2323

2424
- name: Run tests
25-
run: ./gradlew check
25+
run: ./gradlew cleanTest check
26+
27+
- name: Archive test report
28+
if: ${{ always() }}
29+
uses: actions/upload-artifact@v2
30+
with:
31+
name: test-reports
32+
path: "*/build/reports/**"
2633

2734
- name: Build JavaDoc
2835
run: ./gradlew assembleJavadoc

NEWS

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
== Version 1.8.0 (unreleased) ==
2+
3+
Changes:
4+
5+
* BouncyCastle dependency is now optional.
6+
7+
In order to opt out, depend on `webauthn-server-core-minimal` instead of `webauthn-server-core`.
8+
This is not recommended unless you know your JVM includes JCA providers for all signature algorithms.
9+
10+
Note that `webauthn-server-attestation` still depends on BouncyCastle.
11+
12+
113
== Version 1.7.0 ==
214

315
webauthn-server-attestation:

README

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,32 @@ Gradle:
3636
compile 'com.yubico:webauthn-server-core:1.7.0'
3737
----------
3838

39+
=== Semantic versioning
40+
41+
This library uses link:https://semver.org/[semantic versioning].
42+
The public API consists of all public classes, methods and fields in the `com.yubico.webauthn` package and its subpackages,
43+
i.e., everything covered by the
44+
link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/latest/com/yubico/webauthn/package-summary.html[Javadoc].
45+
46+
Package-private classes and methods are NOT part of the public API.
47+
The `com.yubico:yubico-util` module is NOT part of the public API.
48+
Breaking changes to these will NOT be reflected in version numbers.
49+
50+
51+
=== Additional modules
52+
53+
In addition to the main `webauthn-server-core` module, there are also:
54+
55+
- `webauthn-server-attestation`: A simple implementation of the
56+
link:https://developers.yubico.com/java-webauthn-server/JavaDoc/webauthn-server-core/latest/com/yubico/webauthn/attestation/MetadataService.html[`MetadataService`]
57+
interface, which by default comes preloaded with attestation metadata for Yubico devices.
58+
59+
- `webauthn-server-core-minimal`: Alternative distribution of `webauthn-server-core`,
60+
without a dependency on BouncyCastle.
61+
If depending on this module instead of `webauthn-server-core`,
62+
you may have to add your own JCA providers to support some signature algorithms.
63+
In particular, OpenJDK 14 and earlier does not include providers for the EdDSA family of algorithms.
64+
3965

4066
== Features
4167

build.gradle

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ if (publishEnabled) {
3030
}
3131

3232
wrapper {
33-
gradleVersion = '6.1'
33+
gradleVersion = '6.8'
3434
}
3535

3636
allprojects {
@@ -80,8 +80,8 @@ subprojects {
8080
apply plugin: LombokPlugin
8181

8282
lombok {
83-
version '1.18.10'
84-
sha256 = '2836e954823bfcbad45e78c18896e3d01058e6f643749810c608b7005ee7b2fa'
83+
version '1.18.18'
84+
sha256 = '601ec46206e0f9cac2c0583b3350e79f095419c395e991c761640f929038e9cc'
8585
}
8686
tasks.withType(AbstractCompile) {
8787
if (tasks.findByName('verifyLombok')) {
@@ -175,11 +175,14 @@ subprojects { project ->
175175
from javadoc
176176
}
177177

178-
rootProject.tasks.assembleJavadoc {
179-
dependsOn javadoc
180-
inputs.dir javadoc.destinationDir
181-
from(javadoc.destinationDir) {
182-
into project.name
178+
// TODO: Revert this if statement in the next major release
179+
if (project.projectDir.name != "webauthn-server-core-bundle") {
180+
rootProject.tasks.assembleJavadoc {
181+
dependsOn javadoc
182+
inputs.dir javadoc.destinationDir
183+
from(javadoc.destinationDir) {
184+
into project.projectDir.name
185+
}
183186
}
184187
}
185188
}

doc/development.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Developer docs
2+
===
3+
4+
Inconsistent directory naming
5+
---
6+
7+
In resolving [issue #97](https://github.com/Yubico/java-webauthn-server/issues/97),
8+
we opted to split the `webauthn-server-core` module into one `webauthn-server-core` meta-module
9+
and one `webauthn-server-core-minimal` module with the code and all dependencies except BouncyCastle.
10+
However, to avoid file renames and since this is intended as a temporary change,
11+
the source code for the `webauthn-server-core` module is hosted in the `webauthn-server-core-bundle/` subproject
12+
and the `webauthn-server-core-minimal` module is hosted in `webauthn-server-core/`.
13+
14+
We intend to eliminate the `webauthn-server-core-bundle` subproject in the next major version release,
15+
and return the current `webauthn-server-core-minimal` module to the `webauthn-server-core` module name.
16+
This naming inconsistency should be fixed along with this.

gradle/wrapper/gradle-wrapper.jar

508 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ esac
8282

8383
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
8484

85+
8586
# Determine the Java command to use to start the JVM.
8687
if [ -n "$JAVA_HOME" ] ; then
8788
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -129,6 +130,7 @@ fi
129130
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
130131
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131132
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133+
132134
JAVACMD=`cygpath --unix "$JAVACMD"`
133135

134136
# We build the pattern for arguments to be converted via cygpath

gradlew.bat

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
2929
set APP_BASE_NAME=%~n0
3030
set APP_HOME=%DIRNAME%
3131

32+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34+
3235
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
3336
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
3437

@@ -37,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
3740

3841
set JAVA_EXE=java.exe
3942
%JAVA_EXE% -version >NUL 2>&1
40-
if "%ERRORLEVEL%" == "0" goto init
43+
if "%ERRORLEVEL%" == "0" goto execute
4144

4245
echo.
4346
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -51,7 +54,7 @@ goto fail
5154
set JAVA_HOME=%JAVA_HOME:"=%
5255
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5356

54-
if exist "%JAVA_EXE%" goto init
57+
if exist "%JAVA_EXE%" goto execute
5558

5659
echo.
5760
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -61,28 +64,14 @@ echo location of your Java installation.
6164

6265
goto fail
6366

64-
:init
65-
@rem Get command-line arguments, handling Windows variants
66-
67-
if not "%OS%" == "Windows_NT" goto win9xME_args
68-
69-
:win9xME_args
70-
@rem Slurp the command line arguments.
71-
set CMD_LINE_ARGS=
72-
set _SKIP=2
73-
74-
:win9xME_args_slurp
75-
if "x%~1" == "x" goto execute
76-
77-
set CMD_LINE_ARGS=%*
78-
7967
:execute
8068
@rem Setup the command line
8169

8270
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
8371

72+
8473
@rem Execute Gradle
85-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
74+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
8675

8776
:end
8877
@rem End local scope for the variables with windows NT shell

settings.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
rootProject.name = 'webauthn-server-parent'
22
include ':webauthn-server-attestation'
33
include ':webauthn-server-core'
4+
include ':webauthn-server-core-bundle'
45
include ':webauthn-server-demo'
56
include ':yubico-util'
67
include ':yubico-util-scala'
78

89
include ':test-dependent-projects:java-dep-webauthn-server-attestation'
910
include ':test-dependent-projects:java-dep-webauthn-server-core'
11+
include ':test-dependent-projects:java-dep-webauthn-server-core-minimal'
1012
include ':test-dependent-projects:java-dep-yubico-util'
13+
14+
project(':webauthn-server-core').name = 'webauthn-server-core-minimal'
15+
project(':webauthn-server-core-bundle').name = 'webauthn-server-core'

0 commit comments

Comments
 (0)