Skip to content

Commit

Permalink
Merge pull request #485 from OHDSI/merge_qa_1.8.0_to_master
Browse files Browse the repository at this point in the history
Merge qa 1.8.0 to master
  • Loading branch information
dmitrys-odysseus authored Aug 10, 2021
2 parents b7d357b + c5b7497 commit a1bf389
Show file tree
Hide file tree
Showing 28 changed files with 281 additions and 451 deletions.
70 changes: 22 additions & 48 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

<artifactId>datanode</artifactId>
<groupId>com.odysseusinc.arachne</groupId>
<version>1.17.1</version>
<version>1.18.0</version>
<packaging>jar</packaging>


<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.22.RELEASE</version>
<version>2.1.18.RELEASE</version>
<relativePath/>
</parent>

Expand All @@ -27,31 +27,19 @@
<java.version>1.8</java.version>
<jjwt.version>0.10.8</jjwt.version>
<postgresql.version>42.2.15</postgresql.version>
<flywayVersion>4.2.0</flywayVersion>
<javaDockerVersion>3.2.7</javaDockerVersion>
<springRetryVersion>1.2.4.RELEASE</springRetryVersion>
<hikaricp.version>2.6.3</hikaricp.version>
<build.number>${BUILD_NUMBER}</build.number>
<build.id>${BUILD_TIMESTAMP}</build.id>
<dockerImagePrefix>hub.odysseusinc.com</dockerImagePrefix>
<jackson.version>2.10.5.20201202</jackson.version>
<!-- Overrides SpringBoot defaults to conform Hydra -->
<json.version>20170516</json.version>
<feign.version>10.11</feign.version>
<feign.version>10.7.4</feign.version>
<assertj.version>3.18.1</assertj.version>
<bcprov-jdk15on.version>1.67</bcprov-jdk15on.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>${flywayVersion}</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.odysseusinc.arachne</groupId>
Expand Down Expand Up @@ -85,6 +73,11 @@
<groupId>com.odysseusinc.arachne</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>javax.jms-api</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
Expand Down Expand Up @@ -132,7 +125,6 @@
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>${flywayVersion}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
Expand Down Expand Up @@ -220,12 +212,6 @@
<version>3.8.0</version>
</dependency>

<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>${hikaricp.version}</version>
</dependency>

<dependency>
<groupId>org.ohdsi.sql</groupId>
<artifactId>SqlRender</artifactId>
Expand All @@ -241,13 +227,6 @@
<artifactId>hydra</artifactId>
<version>0.0.11</version>
</dependency>
<!--
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20170516</version>
</dependency>
-->
<dependency>
<groupId>org.ohdsi</groupId>
<artifactId>standardized-analysis-specs</artifactId>
Expand Down Expand Up @@ -277,12 +256,6 @@
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>2.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testinfected.hamcrest-matchers</groupId>
<artifactId>validation-matchers</artifactId>
Expand Down Expand Up @@ -411,6 +384,7 @@
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>repackage</id>
<goals>
<goal>repackage</goal>
</goals>
Expand Down Expand Up @@ -447,7 +421,7 @@
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<version>1.2.2</version>
<configuration>
<imageName>${dockerImagePrefix}/${project.artifactId}</imageName>
<imageTags>
Expand Down Expand Up @@ -591,8 +565,8 @@

<repositories>
<repository>
<id>odysseus.community.snapshots</id>
<name>Odysseus community snapshots</name>
<id>community-libs-snapshot-local</id>
<name>community-libs-snapshot-local</name>
<releases>
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
Expand All @@ -601,11 +575,11 @@
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
<url>http://repo.odysseusinc.com/artifactory/community-libs-snapshot-local</url>
<url>https://nexus.odysseusinc.com/repository/community-libs-snapshot-local</url>
</repository>
<repository>
<id>odysseus.community.releases</id>
<name>Odysseus community releases</name>
<id>community-libs-release-local</id>
<name>community-libs-release-local</name>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
Expand All @@ -614,7 +588,7 @@
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
<url>http://repo.odysseusinc.com/artifactory/community-libs-release-local</url>
<url>https://nexus.odysseusinc.com/repository/community-libs-release-local</url>
</repository>
<repository>
<id>ohdsi</id>
Expand Down Expand Up @@ -660,14 +634,14 @@

<distributionManagement>
<snapshotRepository>
<id>artifactory</id>
<name>Odysseus community snapshots</name>
<url>http://repo.odysseusinc.com/artifactory/community-libs-snapshot-local</url>
<id>community-libs-snapshot-local</id>
<name>community-libs-snapshot-local</name>
<url>https://nexus.odysseusinc.com/repository/community-libs-snapshot-local</url>
</snapshotRepository>
<repository>
<id>artifactory</id>
<name>Odysseus community releases</name>
<url>http://repo.odysseusinc.com/artifactory/community-libs-release-local</url>
<id>community-libs-release-local</id>
<name>community-libs-release-local</name>
<url>https://nexus.odysseusinc.com/repository/community-libs-release-local</url>
</repository>
</distributionManagement>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
package com.odysseusinc.arachne.datanode;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.domain.EntityScan;
Expand All @@ -37,13 +38,14 @@
import org.springframework.security.core.context.SecurityContextHolder;

@Configuration
@ComponentScan(basePackages = {"com.odysseusinc.arachne.*", "org.ohdsi.authenticator.*"})
@EnableAutoConfiguration
@EnableAsync
@EnableScheduling
@EnableJpaRepositories(basePackages = {"com.odysseusinc.arachne.*"})
@EntityScan(basePackages = {"com.odysseusinc.arachne.*"})
@EnableAspectJAutoProxy
@EnableEncryptableProperties
@EnableAutoConfiguration
@ComponentScan(basePackages = {"com.odysseusinc.arachne.*", "org.ohdsi.authenticator.*"})
public class WebApplicationStarter {

public static void main(String... argc) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright 2018 Odysseus Data Services, inc.
* Copyright 2021 Odysseus Data Services, inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -15,16 +15,14 @@
*
* Company: Odysseus Data Services, Inc.
* Product Owner/Architecture: Gregory Klebanov
* Authors: Pavel Grafkin, Alexandr Ryabokon, Vitaly Koulakov, Anton Gackovka, Maria Pozhidaeva, Mikhail Mironov
* Created: June 26, 2017
* Authors: Alexandr Cumarav
* Created: April 10, 2021
*
*/

package com.odysseusinc.arachne.datanode.config;

import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import javax.sql.DataSource;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;
import org.jasypt.hibernate5.encryptor.HibernatePBEEncryptorRegistry;
Expand All @@ -36,6 +34,8 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

import javax.annotation.PostConstruct;
import javax.sql.DataSource;

@Configuration
@ConfigurationProperties(prefix = "spring.datasource")
Expand All @@ -47,8 +47,8 @@ public class DataSourceConfig extends HikariConfig {
private String driverClassName;
@Value("${jasypt.encryptor.password}")
private String password;
@Value("${jasypt.encryptor.database.algorithm}")
private String algorythm;
@Value("${jasypt.encryptor.algorithm}")
private String algorithm;

@Primary
@Bean
Expand All @@ -60,12 +60,13 @@ public DataSource primaryDataSource() {
return new HikariDataSource(this);
}

public PasswordEncryptor defaultStringEncryptor(){
@PostConstruct
public PasswordEncryptor defaultStringEncryptor() {

StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
encryptor.setProvider(new BouncyCastleProvider());
encryptor.setProviderName("BC");
encryptor.setAlgorithm(algorythm);
encryptor.setAlgorithm(algorithm);
encryptor.setKeyObtentionIterations(1000);
encryptor.setPassword(password);
HibernatePBEEncryptorRegistry.getInstance()
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit a1bf389

Please sign in to comment.