Skip to content

Commit

Permalink
[AD-1017] Implement single-instance SSH tunnel. (aws#453)
Browse files Browse the repository at this point in the history
* [AD-1017] Implement single-instance SSH tunnel.
* Handle late-bound invocation (DbVisualizer)
* Ensure support for multiple hash algorithms.
* Properly embed new SSH tunnel component.

* [AD-1017] Attempt to debug multi-process test.

* [AD-1017] Attempt to debug multi-process test.

* [AD-1017] Attempt to debug multi-process test - aws#3.

* Commit Code Coverage Badge

* [AD-1017] Attempt to find correct location for test source file.

* [AD-1017] Attempt to find correct location for test source file - aws#2.

* [AD-1017] Fix spotBugs error; code review improvements.

* [AD-1017] Ignore IO exceptions when reading spawned processes.

* Commit Code Coverage Badge

* [AD-1017] Update dependency for mongo to 4.8.1

* Commit Code Coverage Badge

* [AD-1017] Attempt improve stability of SSH Tunnel client tests.

* [AD-1017] Attempt improve stability of multiprocess connection test.

* Commit Code Coverage Badge

* Update src/main/java/software/amazon/documentdb/jdbc/DocumentDbConnectionProperties.java

Co-authored-by: Alexey Temnikov <alexeyt@bitquilltech.com>

* [AD-1017] Properly rename parameter.

* Commit Code Coverage Badge

* [AD-1017] Fix issue with output not being sent to the console (i.e., change level from INFO to ERROR).

* Commit Code Coverage Badge

* [AD-1017] Attempt to increase code coverage.

* [AD-1017] Fix style issue.

* Commit Code Coverage Badge

Co-authored-by: birschick-bq <birschick-bq@users.noreply.github.com>
Co-authored-by: Alexey Temnikov <alexeyt@bitquilltech.com>
  • Loading branch information
3 people authored and Norman Jordan committed Dec 27, 2022
1 parent 94c65d9 commit ad1d4e5
Show file tree
Hide file tree
Showing 32 changed files with 3,204 additions and 469 deletions.
2 changes: 1 addition & 1 deletion .github/badges/branches.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .github/badges/jacoco.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,12 @@ Package Artifact: https://repo.maven.apache.org/maven2/com/google/protobuf/proto
Package Artifact: https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.6.1/protobuf-java-3.6.1-sources.jar
Package Artifact: https://github.com/google/protobuf.git
-----------------------
Package ID: com.jcraft:jsch:0.1.55
Package Homepage: http://www.jcraft.com/jsch/
Package ID: com.github.mwiede:jsch:0.2.4
Package Homepage: https://github.com/mwiede/jsch
Package SPDX-License-Identifier: BSD-3-Clause
Package Artifact: https://repo.maven.apache.org/maven2/com/jcraft/jsch/0.1.55/jsch-0.1.55.jar
Package Artifact: https://repo.maven.apache.org/maven2/com/jcraft/jsch/0.1.55/jsch-0.1.55-sources.jar
Package Artifact: http://git.jcraft.com/jsch.git
Package Artifact: https://repo.maven.org/maven2/com/github/mwiede/jsch/0.2.4/jsch-0.2.4.jar
Package Artifact: https://repo.maven.org/maven2/com/github/mwiede/jsch/0.2.4/jsch-0.2.4-sources.jar
Package Artifact: https://github.com/mwiede/jsch.git
-----------------------
Package ID: org.codehaus.janino:commons-compiler:3.1.6
Package Homepage: http://janino-compiler.github.io/commons-compiler/
Expand Down Expand Up @@ -16570,7 +16570,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-----------------------

com.jcraft/jsch/0.1.55 LICENSE
github.com/mwiede/jsch/0.2.4 LICENSE

JSch 0.0.* was released under the GNU LGPL license. Later, we have switched
over to a BSD-style license.
Expand Down
31 changes: 20 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'com.github.spotbugs' version '5.0.10'
id 'com.github.spotbugs' version '5.0.13'
id 'checkstyle'
id 'jacoco'
id 'com.github.hierynomus.license' version '0.16.1'
Expand Down Expand Up @@ -92,7 +92,7 @@ shadowJar {
minimize {
exclude(dependency('org.apache.calcite::'))
exclude(dependency('org.slf4j.*::'))
exclude(dependency('com.jcraft::'))
exclude(dependency('com.github.mwiede::'))
}
}

Expand Down Expand Up @@ -145,24 +145,32 @@ spotbugsMain {
// Configure HTML report
reports {
xml {
enabled = true
required.set(true)
destination = file("$buildDir/reports/spotbugs/main.xml")
}
html {
required.set(true)
destination = file("$buildDir/reports/spotbugs/main.html")
}
}
}
spotbugsTest {
// Configure HTML report
reports {
xml {
enabled = true
required.set(true)
destination = file("$buildDir/reports/spotbugs/test.xml")
}
html {
required.set(true)
destination = file("$buildDir/reports/spotbugs/test.html")
}
}
}

task checkSpotBugsMainReport {
doLast {
def xmlReport = spotbugsMain.reports.getByName("XML")
def xmlReport = spotbugsMain.reports.getByName("xml")
def slurped = new groovy.xml.XmlSlurper().parse(xmlReport.destination)
def bugsFound = slurped.BugInstance.size()
slurped.BugInstance.each {
Expand All @@ -179,7 +187,7 @@ task checkSpotBugsMainReport {

task checkSpotBugsTestReport {
doLast {
def xmlReport = spotbugsTest.reports.getByName("XML")
def xmlReport = spotbugsTest.reports.getByName("xml")
def slurped = new XmlSlurper().parse(xmlReport.destination)
def bugsFound = slurped.BugInstance.size()
slurped.BugInstance.each {
Expand Down Expand Up @@ -312,13 +320,14 @@ dependencies {
implementation group: 'com.google.guava', name: 'guava', version: '31.1-jre'
implementation group: 'org.slf4j', name: 'slf4j-log4j12', version: '2.0.5'
implementation group: 'org.apache.commons', name: 'commons-text', version: '1.10.0'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.19.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.19.0'
implementation group: 'org.mongodb', name: 'mongodb-driver-sync', version: '4.7.2'
implementation group: 'com.jcraft', name: 'jsch', version: '0.1.55'
implementation group: 'org.mongodb', name: 'mongodb-driver-sync', version: '4.8.1'
implementation group: 'com.github.mwiede', name: 'jsch', version: '0.2.4'
implementation group: 'org.apache.calcite', name: 'calcite-core', version: '1.32.0'
implementation group: 'commons-beanutils', name: 'commons-beanutils', version: '1.9.4'
implementation 'io.github.hakky54:sslcontext-kickstart:7.4.7'
implementation 'io.github.hakky54:sslcontext-kickstart:7.4.8'

compileOnly group: 'org.immutables', name: 'value', version: '2.9.2'
compileOnly group: 'com.puppycrawl.tools', name: 'checkstyle', version: '10.5.0'
Expand All @@ -331,7 +340,7 @@ dependencies {
testAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.24'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.9.1'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.9.1'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '4.8.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '4.9.0'
testRuntimeOnly group: 'de.flapdoodle.embed', name: 'de.flapdoodle.embed.mongo', version: '3.5.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-api:5.9.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
Expand All @@ -342,7 +351,7 @@ dependencies {
testFixturesCompileOnly group: 'de.flapdoodle.embed', name: 'de.flapdoodle.embed.mongo', version: '3.5.3'
testFixturesCompileOnly 'org.junit.jupiter:junit-jupiter-api:5.9.1'
testFixturesImplementation group: 'com.google.guava', name: 'guava', version: '29.0-jre'
testFixturesImplementation group: 'org.mongodb', name: 'mongodb-driver-sync', version: '4.7.2'
testFixturesImplementation group: 'org.mongodb', name: 'mongodb-driver-sync', version: '4.8.1'
testFixturesImplementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.2'
testFixturesImplementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.17.2'
}
Expand Down
8 changes: 7 additions & 1 deletion config/spotbugs/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,20 @@
<Bug pattern="ODR_OPEN_DATABASE_RESOURCE"/>
</Match>
<Match>
<Source name="Driver.java"/>
<Or>
<Source name="Driver.java"/>
<Source name="DocumentDbSshTunnelServer.java"/>
</Or>
<Bug pattern="COMMAND_INJECTION"/>
</Match>
<Match>
<Or>
<Source name="DocumentDbConnectionProperties.java"/>
<Source name="DocumentDbConnectionPropertiesTest.java"/>
<Source name="DocumentDbMain.java"/>
<Source name="DocumentDbSshTunnelLock.java"/>
<Source name="DocumentDbSshTunnelServer.java"/>
<Source name="DocumentDbSshTunnelService.java"/>
</Or>
<Bug pattern="PATH_TRAVERSAL_IN"/>
</Match>
Expand Down
Loading

0 comments on commit ad1d4e5

Please sign in to comment.