Skip to content

Commit

Permalink
Merge pull request #14 from Ferlab-Ste-Justine/feat/928-remove-ca-certs
Browse files Browse the repository at this point in the history
feat: CLIN-928 - remove ca certs + contact infos
  • Loading branch information
creativeyann17 authored May 30, 2022
2 parents d02ae4c + 295cba9 commit 1a4b4e8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 26 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ All the params are optional if not provided user will access interactive prompts
```
user@localhost:~$ ./ferload-client configure
Welcome to Ferload Client, this tools will download the files based
on the provided manifest. For any questions or feedbacks please contact:
Phone: +1 (514) 999-999 or email: [email protected]
Welcome to Ferload Client, this tools will download
the files based on the provided manifest.
Press 'enter' to keep the existing configuration [current].
Expand Down Expand Up @@ -108,9 +107,8 @@ Manifest and output folder have default values. User can provide specific ones i
```
user@localhost:~$ ./ferload-client download -m ./data/m1.tsv -o ./data
Welcome to Ferload Client, this tools will download the files based
on the provided manifest. For any questions or feedbacks please contact:
Phone: +1 (514) 999-999 or email: [email protected]
Welcome to Ferload Client, this tools will download
the files based on the provided manifest.
Checking manifest file ✅
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ ferload-client {
padding=50
abbreviate=30
config-name=".ferload-client.properties"
contact="Phone: +1 (514) 999-999 or email: [email protected]"
manifest-header="url"
manifest-separator="\t"
download-files-pool=10
Expand Down
Binary file removed src/main/resources/cacerts.jks
Binary file not shown.
16 changes: 0 additions & 16 deletions src/main/scala/ca/ferlab/ferload/client/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ import ca.ferlab.ferload.client.clients.{ConsoleCommandLine, FerloadClient, Keyc
import ca.ferlab.ferload.client.commands.factory.CommandFactory
import ca.ferlab.ferload.client.commands.{Configure, Download}
import ca.ferlab.ferload.client.configurations.UserConfig
import com.amazonaws.SDKGlobalConfiguration
import com.typesafe.config.{Config, ConfigFactory}
import org.apache.commons.io.FileUtils
import picocli.CommandLine
import picocli.CommandLine.Command

import java.io.File
import scala.util.{Failure, Success, Using}

@Command(name = "ferload-client", mixinStandardHelpOptions = true,
version = Array("0.1"),
Expand All @@ -25,19 +22,6 @@ class Main extends Runnable {

object Main {

Using(this.getClass.getClassLoader.getResourceAsStream("cacerts.jks")) { is =>
val tempFile = File.createTempFile("cacerts", ".jks")
FileUtils.copyInputStreamToFile(is, tempFile)
//System.setProperty(SDKGlobalConfiguration.DISABLE_CERT_CHECKING_SYSTEM_PROPERTY, "true")
System.setProperty("javax.net.ssl.trustStore", tempFile.getPath) // keycloak / ferload / aws
System.setProperty("javax.net.ssl.trustStorePassword", "changeit")
System.setProperty("javax.net.ssl.trustStoreType", "jks")
tempFile.getPath
} match {
case Success(_) =>
case Failure(e) => throw new IllegalStateException(s"Failed to load certificates: " + e.getMessage, e)
}

def main(args: Array[String]): Unit = {
val userHome: String = System.getProperty("user.home")
val baseConfig = ConfigFactory.load
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ class BaseCommand(appConfig: Config, commandLine: ICommandLine) {

def printIntroduction(): Unit = {
println(
s"""Welcome to Ferload Client, this tools will download the files based
on the provided manifest. For any questions or feedbacks please contact:
${appConfig.getString("contact")}""")
s"""Welcome to Ferload Client, this tools will download
the files based on the provided manifest.""")
println()
}

Expand Down

0 comments on commit 1a4b4e8

Please sign in to comment.