Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Tb-reach, hpv, and anc merge #485

Merged
merged 45 commits into from
Sep 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
09e8664
Initial HPV Server side commit
ndegwamartin Mar 13, 2018
b13ef24
update maven properties configuration file
ndegwamartin Mar 13, 2018
507d178
Add childLocationId field
vincent-karuri May 2, 2018
526c7a7
Merge branch 'ughpv-postgres-support' into uganda-hpv
ndegwamartin May 2, 2018
ba3eaf0
Add support for SNI (Server Name Indication)
ndegwamartin May 3, 2018
c7a9ec7
change snapshot version
vincent-karuri May 9, 2018
6e5d3ec
Merge branch 'uganda-hpv' into 446-add-child-location-id
vincent-karuri May 9, 2018
561f33b
Revert server version to what is was before
vincent-karuri May 16, 2018
ccd82e0
Remove unnecessary changes
vincent-karuri May 18, 2018
d395ba3
Fix issue skip null identifiers when creating openmrs patient create
ndegwamartin May 18, 2018
f7ed431
Merge pull request #447 from OpenSRP/446-add-child-location-id
vincent-karuri May 18, 2018
01c3c3b
Merge branch 'uganda-hpv' into issue425
ndegwamartin May 18, 2018
69fe230
Merge pull request #445 from OpenSRP/issue425
ndegwamartin May 21, 2018
025ac6f
qa fix server updates, Add GZIP compression support
ndegwamartin May 21, 2018
fb0eefd
location fix
manutarus May 22, 2018
77bb44c
location fix
manutarus May 22, 2018
d006fa2
Add CouchDB dependencies for beans not implemented on Postgres
githengi May 21, 2018
69b40e7
Redis cache configuration
githengi May 21, 2018
fa2a61e
Redis cache OpenMRS authentication
githengi May 21, 2018
5490c7f
Move cache TTL to properties file, compare if credentials are similar…
githengi May 21, 2018
7f32be7
If credentials are not equals to cached eject cached and autheticate …
githengi May 21, 2018
f7f0548
Move redis connection properties to properties file
githengi May 21, 2018
47cdeac
Multimedia controller authentication set http request
githengi May 22, 2018
20b0bfc
Jedis connection pool configure using properties file. Code cleanup
githengi May 22, 2018
6231739
Add Lettuce Redis client configuration
githengi May 23, 2018
a3974e4
Use SPEL to determine redis client in use
githengi May 23, 2018
b2cdc1a
Use Profiles to build OpenSRP instead of manual edits of XML
githengi May 23, 2018
0d7bb48
Use maven to manage active redis client
githengi May 23, 2018
9b6d85b
use camelcase convention
githengi May 25, 2018
11c99db
Fix issue NPE on encounter creation
ndegwamartin May 25, 2018
7550c0f
Merge branch 'issue448-hpv-cache-authentication' into ug-hpv-QA-fixes
ndegwamartin May 25, 2018
e84c36c
Merge pull request #454 from OpenSRP/issue448-hpv-cache-authentication
githengi May 30, 2018
a07b16c
Merge pull request #450 from OpenSRP/ug-hpv-QA-fixes
ndegwamartin Jun 6, 2018
b43b9ae
View configuration setup script add postgres support
githengi Jun 13, 2018
5180158
Code cleanup
githengi Jun 14, 2018
f99546d
fix codacy issue UUOC
githengi Jun 14, 2018
1f3810b
Merge pull request #460 from OpenSRP/issue459-hpv
githengi Jun 14, 2018
2a788b8
Server side repo set up for OpenSRP ANC Project backend
ndegwamartin Jun 18, 2018
e876982
Add client application and database version identifiers to the EC mod…
ndegwamartin Jun 19, 2018
898a2dd
Merge pull request #464 from OpenSRP/issue455-hpv-ec-app-db-version
ndegwamartin Jun 21, 2018
5a49d4a
Merge branch 'uganda-hpv' into anc
ndegwamartin Aug 2, 2018
e4344bc
update project env to ANC (Ante Natal Care)
ndegwamartin Aug 6, 2018
d65204c
Merging hpv_anc brach
manutarus Sep 12, 2018
580d2ec
Review change database names
manutarus Sep 13, 2018
2fde37a
Fixed errorenous change to the config xml
Sep 13, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/config/couchdb.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#this file is used by motech
host=localhost
port=5984
maxConnections=20
Expand Down
6 changes: 3 additions & 3 deletions assets/config/opensrp.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mcts-report-delay-in-days=10
mcts.poll.time.interval.in.minutes=10

# OpenMRS configuration
openmrs.url=http://localhost:8181/openmrs/
openmrs.url=http://localhost:8080/openmrs/
openmrs.username=admin
openmrs.password=Admin123
openmrs.idgen.url=/module/idgen/exportIdentifiers.form
Expand Down Expand Up @@ -51,7 +51,7 @@ jdbc.backend=MYSQL
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.username=root
jdbc.password=VA1913wm
jdbc.url=jdbc:mysql://localhost:3306/opensrp_tbreach?createDatabaseIfNotExist=true
jdbc.url=jdbc:mysql://localhost:3306/opensrp?createDatabaseIfNotExist=true

##jdbc url with server and port but without database
jdbc.url-wo-db=jdbc:mysql://localhost:3306
Expand Down Expand Up @@ -98,4 +98,4 @@ opensrp.authencation.cache.ttl=600
redis.host=localhost
redis.port=6379
redis.password=RedI$P@S5
redis.pool.max.connections=25
redis.pool.max.connections=25
1 change: 1 addition & 0 deletions assets/config/schedule_tracking.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#this file is used by motech
schedule.definitions.directory=/schedules
2 changes: 1 addition & 1 deletion assets/migrations/environments/development.properties
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ core_tablespace_location='/opt/postgres/core'
error_tablespace_location ='/opt/postgres/error'
schedule_tablespace_location='/opt/postgres/schedule'
feed_tablespace_location='/opt/postgres/feed'
form_tablespace_location='/opt/postgres/form'
form_tablespace_location='/opt/postgres/form'
20 changes: 10 additions & 10 deletions build/maven.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#database configuration that is not likely to change unless massive refactoring
couchdb.db.opensrp=opensrp_tbreach
couchdb.db.form=opensrp-form_tbreach
couchdb.db.atomfeed=atomfeed_tbreach
couchdb.db.mcts=opensrp-mcts_tbreach
couchdb.db.motech-scheduletracking=motech-scheduletracking-api_tbreach
couchdb.db.error=opensrp-errortrace_tbreach
couchdb.db.opensrp=opensrp
couchdb.db.form=opensrp-form
couchdb.db.atomfeed=atomfeed
couchdb.db.mcts=opensrp-mcts
couchdb.db.motech-scheduletracking=motech-scheduletracking-api
couchdb.db.error=opensrp-errortrace


db.quartz=motechquartz_tbreach
db.reporting=opensrp_tbreach
db.reporting.report=report_tbreach
db.reporting.anm=anm_report_tbreach
db.quartz=motechquartz
db.reporting=opensrp
db.reporting.report=report
db.reporting.anm=anm_report


#selenium
Expand Down
6 changes: 5 additions & 1 deletion opensrp-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@
<version>2.3</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public CustomCertificateSSLSocketFactory(KeyStore truststore) throws NoSuchAlgor
super(truststore);

System.setProperty("disable_bad_sslciphers", "yes");
System.setProperty("jsse.enableSNIExtension", "false");
System.setProperty("jsse.enableSNIExtension", "true");

TrustManager tm = new X509TrustManager() {
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
package org.opensrp.common.util;

import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.concurrent.atomic.AtomicReference;

import javax.net.ssl.SSLSocket;

public class HostNameSetter {

private static final AtomicReference<HostNameSetter> CURRENT = new AtomicReference<>();

private final WeakReference<?> cls;
private final WeakReference<Method> setter;

private HostNameSetter(Class<?> clazz, Method setter) {
this.cls = new WeakReference<>(clazz);
this.setter = setter == null ? null : new WeakReference<>(setter);
}

private static Method init(Class<?> cls) {
Method s = null;
try {
s = cls.getMethod("setHost", String.class);
} catch (Exception e) {
initFail(e);
}
CURRENT.set(new HostNameSetter(cls, s));
return s;
}

private static void initFail(Exception e) {
// ignore
}

private Method reuse(Class<?> cls) {
final boolean wrongClass = this.cls.get() != cls;
if (wrongClass) {
return init(cls);
}

final boolean setterNotSupported = this.setter == null;
if (setterNotSupported) {
return null;
}

final Method s = setter.get();
final boolean setterLost = s == null;
return setterLost ? init(cls) : s;
}

/**
* Invokes the {@code #setName(String)} method if one is present.
*
* @param hostname
* the name to set
* @param sslsock
* the socket
*/
public static void setServerNameIndication(String hostname, SSLSocket sslsock) {
final Class<?> cls = sslsock.getClass();
final HostNameSetter current = CURRENT.get();
final Method setter = (current == null) ? init(cls) : current.reuse(cls);
if (setter != null) {
try {
setter.invoke(sslsock, hostname);
} catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException e) {
setServerNameIndicationFail(e);
}
}
}

private static void setServerNameIndicationFail(Exception e) {
// ignore
}
}