diff --git a/adapter/adapter-api/pom.xml b/adapter/adapter-api/pom.xml
index 0fc654736..96d7365f2 100644
--- a/adapter/adapter-api/pom.xml
+++ b/adapter/adapter-api/pom.xml
@@ -1,74 +1,74 @@
4.0.0SHRINE Adapter Client APIshrine-adapter-client-apinet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlsrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-pluginnet.shrineshrine-crypto${project.version}net.shrineshrine-client${project.version}net.shrineshrine-protocol${project.version}com.sun.jersey.jersey-test-frameworkjersey-test-framework-http${jersey-version}testcom.sun.jersey.contribsjersey-simple-server${jersey-version}testnet.shrineshrine-test-commons${project.version}test-jartestnet.shrineshrine-client${project.version}test-jartestnet.shrineshrine-config${project.version}test-jartest
diff --git a/adapter/adapter-service/pom.xml b/adapter/adapter-service/pom.xml
index 4a07f7296..732ca354d 100644
--- a/adapter/adapter-service/pom.xml
+++ b/adapter/adapter-service/pom.xml
@@ -1,180 +1,180 @@
4.0.0SHRINE Adaptershrine-adapter-servicejarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlsrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-pluginorg.apache.maven.pluginsmaven-jar-plugintest-jarorg.squerylsqueryl_${scala-major-version}org.scala-langscalaporg.scala-langscalap${scala-version}net.shrineshrine-auth${project.version}net.shrineshrine-adapter-client-api${project.version}net.shrineshrine-data-commons${project.version}net.shrineshrine-crypto${project.version}net.shrineshrine-crypto${project.version}test-jartestnet.shrineshrine-client${project.version}net.shrineshrine-protocol${project.version}net.shrineshrine-config${project.version}com.typesafe.slickslick_2.11${slick-version}org.suecarterfreeslick_2.11${freeslick-version}org.slf4jslf4j-log4j12${slf4j-version}mysqlmysql-connector-javacom.sun.jersey.jersey-test-frameworkjersey-test-framework-http${jersey-version}testcom.sun.jersey.contribsjersey-simple-server${jersey-version}testcom.h2databaseh2testorg.easymockeasymocktestorg.springframeworkspring-jdbctestnet.shrineshrine-util${project.version}test-jartestnet.shrineshrine-test-commons${project.version}test-jartestnet.shrineshrine-data-commons${project.version}test-jartest
diff --git a/adapter/adapter-service/src/main/sql/mssql.ddl b/adapter/adapter-service/src/main/sql/mssql.ddl
index bfa05c8a4..1af337b5f 100644
--- a/adapter/adapter-service/src/main/sql/mssql.ddl
+++ b/adapter/adapter-service/src/main/sql/mssql.ddl
@@ -1,6 +1,85 @@
+/* Audit db tables in adapterAuditDB */
create table "queriesReceived" ("shrineNodeId" VARCHAR(MAX) NOT NULL,"userName" VARCHAR(MAX) NOT NULL,"networkQueryId" BIGINT NOT NULL,"queryName" VARCHAR(MAX) NOT NULL,"topicId" VARCHAR(MAX),"topicName" VARCHAR(MAX),"timeQuerySent" BIGINT NOT NULL,"timeReceived" BIGINT NOT NULL);
create table "executionsStarted" ("networkQueryId" BIGINT NOT NULL,"queryName" VARCHAR(MAX) NOT NULL,"timeExecutionStarted" BIGINT NOT NULL);
create table "executionsCompleted" ("networkQueryId" BIGINT NOT NULL,"replyId" BIGINT NOT NULL,"queryName" VARCHAR(MAX) NOT NULL,"timeExecutionCompleted" BIGINT NOT NULL);
create table "resultsSent" ("networkQueryId" BIGINT NOT NULL,"replyId" BIGINT NOT NULL,"queryName" VARCHAR(MAX) NOT NULL,"timeResultsSent" BIGINT NOT NULL);
-create table "problems" ("id" INTEGER NOT NULL PRIMARY KEY IDENTITY, "codec" VARCHAR(254) NOT NULL,"stampText" VARCHAR(500) NOT NULL,"summary" VARCHAR(254) NOT NULL,"description" VARCHAR(500) NOT NULL,"detailsXml" VARCHAR(MAX) NOT NULL,"epoch" BIGINT NOT NULL);
-create index "idx_epoch" on "problems" ("epoch");
\ No newline at end of file
+
+/* Working tables in shrine_query_history */
+create table SHRINE_QUERY(
+ [id] [int] not null IDENTITY(1,1),
+ local_id [varchar](255) not null,
+ network_id bigint not null,
+ username [varchar](255) not null,
+ domain [varchar](255) not null,
+ query_name [varchar](255) not null,
+ query_expression text,
+ date_created datetime default current_timestamp,
+ has_been_run bit not null default 0,
+ flagged bit not null default 0,
+ flag_message [varchar](255) null,
+ constraint query_id_pk primary key clustered (id asc),
+ query_xml text
+)
+CREATE NONCLUSTERED INDEX [ix_SHRINE_QUERY_network_id] ON [dbo].[SHRINE_QUERY] ([network_id] ASC)
+CREATE NONCLUSTERED INDEX [ix_SHRINE_QUERY_local_id] ON [dbo].[SHRINE_QUERY] ([local_id] ASC)
+CREATE NONCLUSTERED INDEX [ix_SHRINE_QUERY_username_domain] ON [dbo].[SHRINE_QUERY] (username, domain ASC)
+
+alter table SHRINE_QUERY alter column flag_message [varchar](MAX)
+
+create table QUERY_RESULT(
+ id int not null identity(1,1),
+ local_id varchar(255) not null,
+ query_id int not null,
+ [type] varchar(255) not null check ([type] in ('PATIENTSET','PATIENT_COUNT_XML','PATIENT_AGE_COUNT_XML','PATIENT_RACE_COUNT_XML','PATIENT_VITALSTATUS_COUNT_XML','PATIENT_GENDER_COUNT_XML','ERROR')),
+ [status] varchar(50) not null check ([status] in ('FINISHED', 'ERROR', 'PROCESSING', 'QUEUED')),
+ time_elapsed int null,
+ last_updated datetime default current_timestamp,
+ constraint QUERY_RESULT_id_pk primary key(id),
+ constraint fk_QUERY_RESULT_query_id foreign key (query_id) references SHRINE_QUERY (id) on delete cascade
+)
+
+create table ERROR_RESULT(
+ id int not null identity(1,1),
+ result_id int not null,
+ message varchar(255) not null,
+ constraint ERROR_RESULT_id_pk primary key(id),
+ constraint fk_ERROR_RESULT_QUERY_RESULT_id foreign key (result_id) references QUERY_RESULT (id) on delete cascade
+)
+alter table ERROR_RESULT add column 'CODEC' varchar not null default "Pre-1.20 Error"
+alter table ERROR_RESULT add column 'SUMMARY' text not null default "Pre-1.20 Error"
+alter table ERROR_RESULT add column 'DESCRIPTION' text not null default "Pre-1.20 Error"
+alter table ERROR_RESULT add column 'DETAILS' text not null default "Pre-1.20 Error"
+
+create table COUNT_RESULT(
+ id int not null identity(1,1),
+ result_id int not null,
+ original_count int not null,
+ obfuscated_count int not null,
+ date_created datetime default current_timestamp,
+ constraint COUNT_RESULT_id_pk primary key(id),
+ constraint fk_COUNT_RESULT_QUERY_RESULT_id foreign key (result_id) references QUERY_RESULT (id) on delete cascade
+)
+
+create table BREAKDOWN_RESULT(
+ id int not null identity(1,1),
+ result_id int not null,
+ data_key varchar(255) not null,
+ original_value int not null,
+ obfuscated_value int not null,
+ constraint BREAKDOWN_RESULT_id_pk primary key(id),
+ constraint fk_BREAKDOWN_RESULT_QUERY_RESULT_id foreign key (result_id) references QUERY_RESULT (id) on delete cascade
+)
+
+create table PRIVILEGED_USER(
+ id int not null identity(1,1),
+ username varchar(255) not null,
+ domain varchar(255) not null,
+ threshold int not null,
+ override_date timestamp null,
+ constraint priviliged_user_pk primary key(id),
+ constraint ix_PRIVILEGED_USER_username_domain unique (username, domain)
+)
+
+create table "problems" ("id" INTEGER NOT NULL PRIMARY KEY IDENTITY, "codec" VARCHAR(254) NOT NULL,"stampText" VARCHAR(500) NOT NULL,"summary" VARCHAR(254) NOT NULL,"description" VARCHAR(MAX) NOT NULL,"detailsXml" VARCHAR(MAX) NOT NULL,"epoch" BIGINT NOT NULL);
+create index "idx_epoch" on "problems" ("epoch");
+
diff --git a/adapter/adapter-service/src/main/sql/mysql.ddl b/adapter/adapter-service/src/main/sql/mysql.ddl
index 4e64fe18d..9794be982 100644
--- a/adapter/adapter-service/src/main/sql/mysql.ddl
+++ b/adapter/adapter-service/src/main/sql/mysql.ddl
@@ -1,6 +1,85 @@
+/* Audit db tables in adapterAuditDB */
create table `queriesReceived` (`shrineNodeId` TEXT NOT NULL,`userName` TEXT NOT NULL,`networkQueryId` BIGINT NOT NULL,`queryName` TEXT NOT NULL,`topicId` TEXT,`topicName` TEXT,`timeQuerySent` BIGINT NOT NULL,`timeReceived` BIGINT NOT NULL);
create table `executionsStarted` (`networkQueryId` BIGINT NOT NULL,`queryName` TEXT NOT NULL,`timeExecutionStarted` BIGINT NOT NULL);
create table `executionsCompleted` (`networkQueryId` BIGINT NOT NULL,`replyId` BIGINT NOT NULL,`queryName` TEXT NOT NULL,`timeExecutionCompleted` BIGINT NOT NULL);
create table `resultsSent` (`networkQueryId` BIGINT NOT NULL,`replyId` BIGINT NOT NULL,`queryName` TEXT NOT NULL,`timeResultsSent` BIGINT NOT NULL);
+
+/* Working tables in shrine_query_history */
create table `problems` (`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,`codec` TEXT NOT NULL,`stampText` TEXT NOT NULL,`summary` TEXT NOT NULL,`description` TEXT NOT NULL,`detailsXml` TEXT NOT NULL,`epoch` BIGINT NOT NULL);
-create index `idx_epoch` on `problems` (`epoch`)
\ No newline at end of file
+create index `idx_epoch` on `problems` (`epoch`)
+
+create table SHRINE_QUERY(
+ id int not null auto_increment,
+ local_id varchar(255) not null,
+ network_id bigint not null,
+ username varchar(255) not null,
+ domain varchar(255) not null,
+ query_name varchar(255) not null,
+ query_expression text,
+ date_created timestamp default current_timestamp,
+ has_been_run boolean not null default 0,
+ flagged boolean not null default 0,
+ flag_message varchar(255) null,
+ constraint query_id_pk primary key(id),
+ index ix_SHRINE_QUERY_network_id (network_id),
+ index ix_SHRINE_QUERY_local_id (local_id),
+ index ix_SHRINE_QUERY_username_domain (username, domain),
+ query_xml text
+) engine=innodb default charset=latin1;
+alter table SHRINE_QUERY change flag_message flag_message text;
+
+create table QUERY_RESULT(
+ id int not null auto_increment,
+ local_id varchar(255) not null,
+ query_id int not null,
+ type enum('PATIENTSET','PATIENT_COUNT_XML','PATIENT_AGE_COUNT_XML','PATIENT_RACE_COUNT_XML','PATIENT_VITALSTATUS_COUNT_XML','PATIENT_GENDER_COUNT_XML','ERROR') not null,
+ status enum('FINISHED', 'ERROR', 'PROCESSING', 'QUEUED') not null,
+ time_elapsed int null,
+ last_updated timestamp default current_timestamp,
+ constraint QUERY_RESULT_id_pk primary key(id),
+ constraint fk_QUERY_RESULT_query_id foreign key (query_id) references SHRINE_QUERY (id) on delete cascade
+) engine=innodb default charset=latin1;
+
+create table ERROR_RESULT(
+ id int not null auto_increment,
+ result_id int not null,
+ message varchar(255) not null,
+ CODEC varchar(256) not null default "Pre-1.20 Error",
+ STAMP varchar(256) not null default "Unknown time and machine",
+ SUMMARY text not null,
+ PROBLEM_DESCRIPTION text not null,
+ DETAILS text not null,
+ constraint ERROR_RESULT_id_pk primary key(id),
+ constraint fk_ERROR_RESULT_QUERY_RESULT_id foreign key (result_id) references QUERY_RESULT (id) on delete cascade
+) engine=innodb default charset=latin1;
+
+
+create table COUNT_RESULT(
+ id int not null auto_increment,
+ result_id int not null,
+ original_count int not null,
+ obfuscated_count int not null,
+ date_created timestamp default current_timestamp,
+ constraint COUNT_RESULT_id_pk primary key(id),
+ constraint fk_COUNT_RESULT_QUERY_RESULT_id foreign key (result_id) references QUERY_RESULT (id) on delete cascade
+) engine=innodb default charset=latin1;
+
+create table BREAKDOWN_RESULT(
+ id int not null auto_increment,
+ result_id int not null,
+ data_key varchar(255) not null,
+ original_value int not null,
+ obfuscated_value int not null,
+ constraint BREAKDOWN_RESULT_id_pk primary key(id),
+ constraint fk_BREAKDOWN_RESULT_QUERY_RESULT_id foreign key (result_id) references QUERY_RESULT (id) on delete cascade
+) engine=innodb default charset=latin1;
+
+create table PRIVILEGED_USER(
+ id int not null auto_increment,
+ username varchar(255) not null,
+ domain varchar(255) not null,
+ threshold int null, #Used to be not null. See SHRINE-1262
+ override_date timestamp null,
+ constraint priviliged_user_pk primary key(id),
+ constraint ix_PRIVILEGED_USER_username_domain unique (username, domain)
+) engine=innodb default charset=latin1;
diff --git a/adapter/adapter-service/src/main/sql/oracle.ddl b/adapter/adapter-service/src/main/sql/oracle.ddl
index 3563a4789..df72805f6 100644
--- a/adapter/adapter-service/src/main/sql/oracle.ddl
+++ b/adapter/adapter-service/src/main/sql/oracle.ddl
@@ -1,14 +1,241 @@
+/* Audit db tables in adapterAuditDB */
create table "queriesReceived" ("shrineNodeId" VARCHAR2(256) NOT NULL,"userName" VARCHAR2(256) NOT NULL,"networkQueryId" NUMBER NOT NULL,"queryName" VARCHAR2(256) NOT NULL,"topicId" VARCHAR2(256),"topicName" VARCHAR2(256),"timeQuerySent" NUMBER NOT NULL,"timeReceived" NUMBER NOT NULL);
create table "executionsStarted" ("networkQueryId" NUMBER NOT NULL,"queryName" VARCHAR2(256) NOT NULL,"timeExecutionStarted" NUMBER NOT NULL);
create table "executionsCompleted" ("networkQueryId" NUMBER NOT NULL,"replyId" NUMBER NOT NULL,"queryName" VARCHAR2(256) NOT NULL,"timeExecutionCompleted" NUMBER NOT NULL);
create table "resultsSent" ("networkQueryId" NUMBER NOT NULL,"replyId" NUMBER NOT NULL,"queryName" VARCHAR2(256) NOT NULL,"timeResultsSent" NUMBER NOT NULL);
+
+
+-- Working tables in shrine_query_history
+create table "SHRINE_QUERY"(
+ id NUMBER NOT NULL,
+ local_id VARCHAR2(256) not null,
+ network_id NUMBER not null,
+ username VARCHAR2(256) not null,
+ domain VARCHAR2(256) not null,
+ query_name VARCHAR2(256) not null,
+ query_expression CLOB,
+ date_created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+ has_been_run NUMBER(1) DEFAULT 0,
+ flagged NUMBER(1) DEFAULT 0,
+ flag_message CLOB null,
+ query_xml CLOB,
+ CONSTRAINT SHRINE_QUERY_id_pk PRIMARY KEY(id) using index
+);
+-- handcrafted autoincrement from http://earlruby.org/2009/01/creating-auto-increment-columns-in-oracle/
+create sequence SHRINE_QUERY_id_Seq start with 1 increment by 1;
+create or replace trigger SHRINE_QUERY_id_Insert
+before insert on "SHRINE_QUERY"
+for each row
+declare
+ max_id number;
+ cur_seq number;
+begin
+ if :new.id is null then
+ -- No ID passed, get one from the sequence
+ select SHRINE_QUERY_id_Seq.nextval into :new.id from dual;
+ else
+ -- ID was set via insert, so update the sequence
+ select greatest(nvl(max(id),0), :new.id) into max_id from "SHRINE_QUERY";
+ select SHRINE_QUERY_id_Seq.nextval into cur_seq from dual;
+ while cur_seq < max_id
+ loop
+ select SHRINE_QUERY_id_Seq.nextval into cur_seq from dual;
+ end loop;
+ end if;
+end;
+/
+-- end autoincrement
+
+create table QUERY_RESULT (
+ id NUMBER not null,
+ local_id VARCHAR2(256) not null,
+ query_id NUMBER not null,
+ type VARCHAR2(30) CHECK (type IN ('PATIENTSET','PATIENT_COUNT_XML','PATIENT_AGE_COUNT_XML','PATIENT_RACE_COUNT_XML','PATIENT_VITALSTATUS_COUNT_XML','PATIENT_GENDER_COUNT_XML','ERROR')) not null,
+ status VARCHAR2(30) CHECK (status IN ('FINISHED', 'ERROR', 'PROCESSING', 'QUEUED')) not null,
+ time_elapsed NUMBER null,
+ last_updated timestamp default current_timestamp,
+ constraint QUERY_RESULT_id_pk primary key(id),
+ constraint fk_QUERY_RESULT_query_id foreign key (query_id) references SHRINE_QUERY (id) on delete cascade
+);
+
+-- handcrafted autoincrement from http://earlruby.org/2009/01/creating-auto-increment-columns-in-oracle/
+create sequence QUERY_RESULT_id_Seq start with 1 increment by 1;
+create or replace trigger QUERY_RESULT_id_Insert
+before insert on "QUERY_RESULT"
+for each row
+declare
+ max_id number;
+ cur_seq number;
+begin
+ if :new.id is null then
+ -- No ID passed, get one from the sequence
+ select QUERY_RESULT_id_Seq.nextval into :new.id from dual;
+ else
+ -- ID was set via insert, so update the sequence
+ select greatest(nvl(max(id),0), :new.id) into max_id from "QUERY_RESULT";
+ select QUERY_RESULT_id_Seq.nextval into cur_seq from dual;
+ while cur_seq < max_id
+ loop
+ select QUERY_RESULT_id_Seq.nextval into cur_seq from dual;
+ end loop;
+ end if;
+end;
+/
+-- end autoincrement
+
+
+create table ERROR_RESULT(
+ id NUMBER not null,
+ result_id NUMBER not null,
+ message VARCHAR2(256) not null,
+ CODEC VARCHAR2(256) default 'Pre-1.20 Error',
+ STAMP VARCHAR2(256) default 'Unknown time and machine',
+ SUMMARY CLOB not null,
+ PROBLEM_DESCRIPTION CLOB not null,
+ DETAILS CLOB not null,
+ constraint ERROR_RESULT_id_pk primary key(id),
+ constraint fk_ERROR_RESULT_QR_id foreign key (result_id) references QUERY_RESULT (id) on delete cascade
+);
+
+-- handcrafted autoincrement from http://earlruby.org/2009/01/creating-auto-increment-columns-in-oracle/
+create sequence ERROR_RESULT_id_Seq start with 1 increment by 1;
+create or replace trigger ERROR_RESULT_id_Insert
+before insert on "ERROR_RESULT"
+for each row
+declare
+ max_id number;
+ cur_seq number;
+begin
+ if :new.id is null then
+ -- No ID passed, get one from the sequence
+ select ERROR_RESULT_id_Seq.nextval into :new.id from dual;
+ else
+ -- ID was set via insert, so update the sequence
+ select greatest(nvl(max(id),0), :new.id) into max_id from "ERROR_RESULT";
+ select ERROR_RESULT_id_Seq.nextval into cur_seq from dual;
+ while cur_seq < max_id
+ loop
+ select ERROR_RESULT_id_Seq.nextval into cur_seq from dual;
+ end loop;
+ end if;
+end;
+/
+-- end autoincrement
+
+create table COUNT_RESULT(
+ id NUMBER not null,
+ result_id NUMBER not null,
+ original_count NUMBER not null,
+ obfuscated_count NUMBER not null,
+ date_created timestamp default current_timestamp,
+ constraint COUNT_RESULT_id_pk primary key(id),
+ constraint fk_COUNT_RESULT_QR_id foreign key (result_id) references QUERY_RESULT (id) on delete cascade
+);
+
+-- handcrafted autoincrement from http://earlruby.org/2009/01/creating-auto-increment-columns-in-oracle/
+create sequence COUNT_RESULT_id_Seq start with 1 increment by 1;
+create or replace trigger COUNT_RESULT_id_Insert
+before insert on "COUNT_RESULT"
+for each row
+declare
+ max_id number;
+ cur_seq number;
+begin
+ if :new.id is null then
+ -- No ID passed, get one from the sequence
+ select COUNT_RESULT_id_Seq.nextval into :new.id from dual;
+ else
+ -- ID was set via insert, so update the sequence
+ select greatest(nvl(max(id),0), :new.id) into max_id from "COUNT_RESULT";
+ select COUNT_RESULT_id_Seq.nextval into cur_seq from dual;
+ while cur_seq < max_id
+ loop
+ select COUNT_RESULT_id_Seq.nextval into cur_seq from dual;
+ end loop;
+ end if;
+end;
+/
+-- end autoincrement
+
+create table BREAKDOWN_RESULT(
+ id NUMBER not null,
+ result_id NUMBER not null,
+ data_key VARCHAR2(256) not null,
+ original_value NUMBER not null,
+ obfuscated_value NUMBER not null,
+ constraint BREAKDOWN_RESULT_id_pk primary key(id),
+ constraint fk_BREAKDOWN_RESULT_QR_id foreign key (result_id) references QUERY_RESULT (id) on delete cascade
+);
+
+-- handcrafted autoincrement from http://earlruby.org/2009/01/creating-auto-increment-columns-in-oracle/
+create sequence BREAKDOWN_RESULT_id_Seq start with 1 increment by 1;
+create or replace trigger BREAKDOWN_RESULT_id_Insert
+before insert on "BREAKDOWN_RESULT"
+for each row
+declare
+ max_id number;
+ cur_seq number;
+begin
+ if :new.id is null then
+ -- No ID passed, get one from the sequence
+ select BREAKDOWN_RESULT_id_Seq.nextval into :new.id from dual;
+ else
+ -- ID was set via insert, so update the sequence
+ select greatest(nvl(max(id),0), :new.id) into max_id from "BREAKDOWN_RESULT";
+ select BREAKDOWN_RESULT_id_Seq.nextval into cur_seq from dual;
+ while cur_seq < max_id
+ loop
+ select BREAKDOWN_RESULT_id_Seq.nextval into cur_seq from dual;
+ end loop;
+ end if;
+end;
+/
+-- end autoincrement
+
+create table PRIVILEGED_USER(
+ id NUMBER not null,
+ username VARCHAR2(256) not null,
+ domain VARCHAR2(256) not null,
+ threshold NUMBER null, --Used to be not null. See SHRINE-1262
+ override_date timestamp null,
+ constraint priviliged_user_pk primary key(id),
+ constraint ix_PU_username_domain unique (username, domain)
+);
+
+-- handcrafted autoincrement from http://earlruby.org/2009/01/creating-auto-increment-columns-in-oracle/
+create sequence PRIVILEGED_USER_id_Seq start with 1 increment by 1;
+create or replace trigger PRIVILEGED_USER_id_Insert
+before insert on "PRIVILEGED_USER"
+for each row
+declare
+ max_id number;
+ cur_seq number;
+begin
+ if :new.id is null then
+ -- No ID passed, get one from the sequence
+ select PRIVILEGED_USER_id_Seq.nextval into :new.id from dual;
+ else
+ -- ID was set via insert, so update the sequence
+ select greatest(nvl(max(id),0), :new.id) into max_id from "PRIVILEGED_USER";
+ select PRIVILEGED_USER_id_Seq.nextval into cur_seq from dual;
+ while cur_seq < max_id
+ loop
+ select PRIVILEGED_USER_id_Seq.nextval into cur_seq from dual;
+ end loop;
+ end if;
+end;
+/
+-- end autoincrement
+
+
create table "problems" ("id" INTEGER NOT NULL PRIMARY KEY,"codec" VARCHAR2(254) NOT NULL,"stampText" VARCHAR2(500) NOT NULL,"summary" CLOB NOT NULL,"description" CLOB NOT NULL,"detailsXml" CLOB NOT NULL,"epoch" NUMBER(19) NOT NULL);
create index "idx_epoch" on "problems" ("epoch");
create SEQUENCE problems_idautoinc;
create or REPLACE TRIGGER problems_triggerid_id BEFORE INSERT ON
"problems" FOR EACH ROW
BEGIN
SELECT problems_idautoinc.NEXTVAL
- into :NEW."id"
+ into :new."id"
FROM dual;
- END;
\ No newline at end of file
+ END;
+ /
\ No newline at end of file
diff --git a/adapter/adapter-service/src/main/sql/oracle_flag_message_to_clob.ddl b/adapter/adapter-service/src/main/sql/oracle_flag_message_to_clob.ddl
new file mode 100644
index 000000000..f18c924ca
--- /dev/null
+++ b/adapter/adapter-service/src/main/sql/oracle_flag_message_to_clob.ddl
@@ -0,0 +1,4 @@
+alter table SHRINE_QUERY add (temp CLOB);
+update SHRINE_QUERY set temp=flag_message, flag_message=null;
+alter table SHRINE_QUERY drop column flag_message;
+alter table SHRINE_QUERY rename column temp to flag_message;
diff --git a/apps/dashboard-app/pom.xml b/apps/dashboard-app/pom.xml
index ef03af5ee..eec979f25 100644
--- a/apps/dashboard-app/pom.xml
+++ b/apps/dashboard-app/pom.xml
@@ -1,200 +1,200 @@
shrine-basenet.shrine
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xml4.0.0dashboard-app
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOTDashboard Appjarnet.alchim31.mavenscala-maven-plugincom.github.eirslettfrontend-maven-plugin0.0.23src/main/jsinstall node and npminstall-node-and-npmv0.10.332.7.4npm installnpmgenerate-resourcesinstallbower installbowerinstallgrunt defaultgrunt--no-colorlog4jlog4jio.sprayspray-routing_2.11${spray-version}io.sprayspray-servlet_2.11${spray-version}io.sprayspray-util_2.11${spray-version}io.sprayspray-testkit_2.11${spray-version}testcom.typesafe.akkaakka-actor_2.11${akka-version}com.typesafe.akkaakka-slf4j_2.11${akka-version}com.typesafe.akkaakka-testkit_2.11${akka-testkit-version}testorg.json4sjson4s-native_2.11${json4s-version}com.typesafe.slickslick_2.11${slick-version}org.slf4jslf4j-log4j12${slf4j-version}com.h2databaseh2${h2-version}testnet.shrineshrine-protocol${project.version}net.shrineshrine-utility-commons${project.version}net.shrineshrine-crypto${project.version}test-jartestnet.shrineshrine-auth${project.version}net.shrineshrine-data-commons${project.version}mysqlmysql-connector-java${mysql-version}io.jsonwebtokenjjwt0.6.0net.sourceforge.jtdsjtds1.3.1net.shrineshrine-adapter-client-api${project.version}com.typesafeconfig${typesafe-config-version}
diff --git a/apps/dashboard-war/pom.xml b/apps/dashboard-war/pom.xml
index 73a498c30..3220a5a09 100644
--- a/apps/dashboard-war/pom.xml
+++ b/apps/dashboard-war/pom.xml
@@ -1,37 +1,37 @@
shrine-basenet.shrine
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xml4.0.0dashboard-warDashboard Warwarorg.apache.maven.pluginsmaven-war-pluginshrine-dashboardnet.shrinedashboard-app${project.version}org.slf4jslf4j-log4j12${slf4j-version}runtime
diff --git a/apps/meta-app/pom.xml b/apps/meta-app/pom.xml
index 4ac59f525..2eda815ae 100644
--- a/apps/meta-app/pom.xml
+++ b/apps/meta-app/pom.xml
@@ -1,92 +1,92 @@
shrine-basenet.shrine
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xml4.0.0meta-appMetaData Appjarnet.alchim31.mavenscala-maven-pluginnet.shrineshrine-utility-commons${project.version}net.shrineshrine-config${project.version}log4jlog4jio.sprayspray-routing_2.11${spray-version}io.sprayspray-servlet_2.11${spray-version}io.sprayspray-util_2.11${spray-version}io.sprayspray-testkit_2.11${spray-version}testcom.typesafe.akkaakka-actor_2.11${akka-version}com.typesafe.akkaakka-slf4j_2.11${akka-version}com.typesafe.akkaakka-testkit_2.11${akka-testkit-version}testorg.json4sjson4s-native_2.11${json4s-version}com.typesafeconfig${typesafe-config-version}mysqlmysql-connector-java${mysql-version}
\ No newline at end of file
diff --git a/apps/meta-app/src/main/scala/net/shrine/metadata/MetaDataService.scala b/apps/meta-app/src/main/scala/net/shrine/metadata/MetaDataService.scala
index 9a0b1fe23..1b541d928 100644
--- a/apps/meta-app/src/main/scala/net/shrine/metadata/MetaDataService.scala
+++ b/apps/meta-app/src/main/scala/net/shrine/metadata/MetaDataService.scala
@@ -1,34 +1,45 @@
package net.shrine.metadata
import com.typesafe.config.ConfigRenderOptions
import net.shrine.log.Loggable
import net.shrine.source.ConfigSource
import spray.http.{StatusCode, StatusCodes}
import spray.routing.{HttpService, _}
import scala.util.Try
/**
- * Created by ty on 11/8/16.
+ * A simple API for reporting what's in the metaData section within shrine.conf
*/
trait MetaDataService extends HttpService with Loggable {
lazy val config = ConfigSource.config.getConfig("shrine.metaData")
+ val homeInfo =
+ """
+ |The SHRINE Metadata service. This is a simple API that gives you
+ |read access to the metaData section within SHRINE's configuration.
+ |You can access this data by key, or by accessing the entire metaData
+ |config section at once. To access everything at once, make a GET
+ |to shrine-metadata/data (if on a browser, just add /data to the
+ |end of the current url). To access values by key, make a GET to
+ |shrine-metadata/data?key={{your key here without braces}} (again,
+ |if on a browser just add /data?key={{your key}} to the end of the url).
+ """.stripMargin
lazy val route: Route = get {
pathPrefix("ping") { complete("pong")} ~
pathPrefix("data") {
parameter("key") { (key: String) =>
complete(handleKey(key))
} ~ complete(handleAll)
- }}
+ }} ~ complete(homeInfo)
def handleAll:(StatusCode, String) = {
- StatusCodes.OK -> config.root.render(ConfigRenderOptions.concise())
+ StatusCodes.OK -> config.root.render(ConfigRenderOptions.concise()) // returns it as JSON.
}
def handleKey(key: String): (StatusCode, String) = {
Try(StatusCodes.OK -> config.getValue(key).render(ConfigRenderOptions.concise()))
.getOrElse(StatusCodes.NotFound ->
s"Could not find a value for the specified path `$key`")
}
}
diff --git a/apps/meta-war/pom.xml b/apps/meta-war/pom.xml
index 70f36d829..83a94021e 100644
--- a/apps/meta-war/pom.xml
+++ b/apps/meta-war/pom.xml
@@ -1,37 +1,37 @@
shrine-basenet.shrine
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xml4.0.0meta-warMetaData Warwarorg.apache.maven.pluginsmaven-war-pluginshrine-metadatanet.shrinemeta-app${project.version}org.slf4jslf4j-log4j12${slf4j-version}runtime
\ No newline at end of file
diff --git a/apps/proxy/pom.xml b/apps/proxy/pom.xml
index 79de8813b..bbc268406 100644
--- a/apps/proxy/pom.xml
+++ b/apps/proxy/pom.xml
@@ -1,52 +1,52 @@
4.0.0SHRINE Proxyshrine-proxywarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlnet.shrineshrine-test-commons${project.version}test-jartestnet.shrineshrine-crypto${project.version}net.shrineshrine-client${project.version}net.shrineshrine-protocol${project.version}javax.servletjavax.servlet-apiprovidedsrc/main/scalasrc/test/scalashrine-proxynet.alchim31.mavenscala-maven-plugin
diff --git a/apps/shrine-app/pom.xml b/apps/shrine-app/pom.xml
index 3abf4da7b..9e7d26470 100644
--- a/apps/shrine-app/pom.xml
+++ b/apps/shrine-app/pom.xml
@@ -1,118 +1,118 @@
shrine-basenet.shrine
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xml4.0.0shrine-appSHRINE Appjarsrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-pluginnet.shrineshrine-test-commons${project.version}test-jartestnet.shrineshrine-config${project.version}net.shrineshrine-hms-core${project.version}net.shrineshrine-qep${project.version}net.shrineshrine-broadcaster-aggregator${project.version}net.shrineshrine-broadcaster-service${project.version}net.shrineshrine-adapter-service${project.version}net.shrineshrine-crypto${project.version}net.shrineshrine-ont-support${project.version}net.shrineshrine-crypto${project.version}test-jartestnet.shrineshrine-protocol${project.version}test-jartestnet.shrineshrine-config${project.version}test-jartestnet.shrineshrine-broadcaster-aggregator${project.version}test-jartestnet.shrineshrine-client${project.version}test-jartestcom.h2databaseh2${h2-version}testorg.json4sjson4s-native_2.11${json4s-version}
diff --git a/apps/shrine-app/src/main/scala/net/shrine/status/StatusJaxrs.scala b/apps/shrine-app/src/main/scala/net/shrine/status/StatusJaxrs.scala
index eef39c150..937c7abc4 100644
--- a/apps/shrine-app/src/main/scala/net/shrine/status/StatusJaxrs.scala
+++ b/apps/shrine-app/src/main/scala/net/shrine/status/StatusJaxrs.scala
@@ -1,607 +1,614 @@
package net.shrine.status
import java.security.Security
import java.security.cert.X509Certificate
import java.util.Date
import javax.net.ssl.{KeyManager, SSLContext, X509TrustManager}
import javax.ws.rs.core.{MediaType, Response}
import javax.ws.rs.{GET, Path, Produces, WebApplicationException}
import akka.actor.ActorSystem
import akka.io.IO
import akka.util.Timeout
import com.sun.jersey.spi.container.{ContainerRequest, ContainerRequestFilter}
import com.typesafe.config.{ConfigFactory, Config => TsConfig}
import net.shrine.authorization.{QueryAuthorizationService, StewardQueryAuthorizationService}
import net.shrine.broadcaster._
import net.shrine.client.PosterOntClient
import net.shrine.config.ConfigExtensions
import net.shrine.crypto._
import net.shrine.log.{Log, Loggable}
import net.shrine.ont.data.OntClientOntologyMetadata
import net.shrine.problem.{AbstractProblem, ProblemSources}
import net.shrine.protocol._
import net.shrine.protocol.query.{OccuranceLimited, QueryDefinition, Term}
import net.shrine.serialization.NodeSeqSerializer
import net.shrine.spray._
import net.shrine.util.{PeerToPeerModel, SingleHubModel, Versions}
import net.shrine.wiring.ShrineOrchestrator
import org.json4s.native.Serialization
import org.json4s.{DefaultFormats, Formats}
import spray.can.Http
import spray.can.Http.{HostConnectorInfo, HostConnectorSetup}
import spray.client.pipelining._
import spray.http.{ContentType, ContentTypes, FormData, HttpCharsets, HttpEntity, HttpHeaders, HttpRequest, HttpResponse, MediaTypes}
import spray.io.{ClientSSLEngineProvider, PipelineContext, SSLContextProvider}
import scala.collection.JavaConverters._
import scala.collection.immutable.{Map, Seq, Set}
import scala.concurrent.duration.FiniteDuration
import scala.concurrent.{Await, Future, duration}
import scala.util.control.NonFatal
import scala.util.{Failure, Success, Try}
+import scala.xml.NodeSeq
/**
* A subservice that shares internal state of the shrine servlet.
*
* @author david
* @since 12/2/15
*/
@Path("/internalstatus")
@Produces(Array(MediaType.APPLICATION_JSON))
case class StatusJaxrs(shrineConfig: TsConfig) extends Loggable {
implicit def json4sFormats: Formats = DefaultFormats + new NodeSeqSerializer
@GET
@Path("version")
def version: String = {
val version = Version("changeMe")
val versionString = Serialization.write(version)
versionString
}
@GET
@Path("config")
def config: String = {
//todo probably better to reach out and grab the config from ManuallyWiredShrineJaxrsResources once it is a singleton
Serialization.write(Json4sConfig(shrineConfig))
}
@GET
@Path("summary")
def summary: String = {
val summary = Summary()
Serialization.write(summary)
}
@GET
@Path("i2b2")
def i2b2: String = {
val i2b2 = I2b2()
Serialization.write(i2b2)
}
@GET
@Path("optionalParts")
def optionalParts: String = {
val optionalParts = OptionalParts()
Serialization.write(optionalParts)
}
@GET
@Path("hub")
def hub: String = {
val hub = Hub()
Serialization.write(hub)
}
@GET
@Path("adapter")
def adapter: String = {
val adapter = Adapter()
Serialization.write(adapter)
}
@GET
@Path("qep")
def qep: String = {
val qep = Qep()
Serialization.write(qep)
}
@GET
@Path("keystore")
def keystore: String = {
Serialization.write(KeyStoreReport())
}
}
/* todo fill in later when you take the time to get the right parts in place SHRINE-1529
case class KeyStoreEntryReport(
alias:String,
commonName:String,
md5Signature:String
)
*/
case class SiteStatus(siteAlias: String, theyHaveMine: Boolean, haveTheirs: Boolean, url: String, timeOutError: Boolean = false) extends DefaultJsonSupport
case class AbbreviatedKeyStoreEntry(alias: String, cn: String, md5: String) extends DefaultJsonSupport
case class KeyStoreReport(
fileName: String,
password: String = "REDACTED",
privateKeyAlias: Option[String],
owner: Option[String],
issuer: Option[String],
expires: Long,
md5Signature: String,
sha256Signature: String,
caTrustedAlias: Option[String],
caTrustedSignature: Option[String],
remoteSiteStatuses: Seq[SiteStatus],
isHub: Boolean,
abbreviatedEntries: Seq[AbbreviatedKeyStoreEntry]
// keyStoreContents:List[KeyStoreEntryReport] //todo SHRINE-1529
)
//todo build new API for the dashboard to use to check signatures
object KeyStoreReport {
def apply(): KeyStoreReport = {
val keyStoreDescriptor: KeyStoreDescriptor = ShrineOrchestrator.keyStoreDescriptor
val certCollection: BouncyKeyStoreCollection = ShrineOrchestrator.certCollection
val maybeCaEntry: Option[KeyStoreEntry] = certCollection match {
case DownStreamCertCollection(_, caEntry, _) => Some(caEntry)
case HubCertCollection(_, caEntry, _) => Some(caEntry)
case px: PeerCertCollection => None
}
val siteStatusesPreZip = ShaVerificationService(certCollection.remoteSites.toList)
val siteStatuses = siteStatusesPreZip.zipWithIndex
def sortFormat(input: String): Option[String] = {
if (input.isEmpty) None
else {
def isLong(str: String) = str.split('=').headOption.getOrElse(str).length > 2
// Just an ugly sort for formatting purposes. I want The long key last, and otherwise just
// Sort them lexicographically.
Some(input.split(", ").sortBy(a => (isLong(a), a)).mkString(", "))
}
}
lazy val blockForSiteStatuses = siteStatuses.map(fut => Try(Await.result(fut._1, new FiniteDuration(5, duration.SECONDS))) match {
case Success(Some(status)) => status
case Success(None) => Log.warn("There was an issue with the verifySignature endpoint, check that we have network connectivity")
SiteStatus(certCollection.remoteSites(fut._2).alias, false, false, "", true)
case Failure(exc) => Log.warn("We timed out while trying to connect to the verifySignature endpoint, please check network connectivity")
SiteStatus(certCollection.remoteSites(fut._2).alias, false, false, "", true)
})
new KeyStoreReport(
fileName = keyStoreDescriptor.file,
privateKeyAlias = keyStoreDescriptor.privateKeyAlias,
owner = sortFormat(certCollection.myEntry.cert.getSubjectDN.getName),
issuer = sortFormat(certCollection.myEntry.cert.getIssuerDN.getName),
expires = certCollection.myEntry.cert.getNotAfter.getTime,
md5Signature = UtilHasher.encodeCert(certCollection.myEntry.cert, "MD5"),
sha256Signature = UtilHasher.encodeCert(certCollection.myEntry.cert, "SHA-256"),
//todo sha1 signature if needed
caTrustedAlias = maybeCaEntry.map(_.aliases.first),
caTrustedSignature = maybeCaEntry.map(entry => UtilHasher.encodeCert(entry.cert, "MD5")),
remoteSiteStatuses = blockForSiteStatuses,
isHub = keyStoreDescriptor.trustModel == SingleHubModel(true),
abbreviatedEntries = certCollection.allEntries.map(entry => AbbreviatedKeyStoreEntry(
entry.aliases.first,
entry.commonName.getOrElse("No common name"),
UtilHasher.encodeCert(entry.cert, "MD5"))).toList
// keyStoreContents = certCollection.caCerts.zipWithIndex.map((cert: ((Principal, X509Certificate), Int)) => KeyStoreEntryReport(keyStoreDescriptor.caCertAliases(cert._2),cert._1._1.getName,toMd5(cert._1._2))).to[List]
)
}
}
case class I2b2(pmUrl: String,
crcUrl: Option[String],
ontUrl: String,
i2b2Domain: String,
username: String,
crcProject: String,
ontProject: String)
object I2b2 {
def apply(): I2b2 = new I2b2(
pmUrl = ShrineOrchestrator.pmPoster.url,
crcUrl = ShrineOrchestrator.adapterComponents.map(_.i2b2AdminService.crcUrl),
ontUrl = ShrineOrchestrator.ontEndpoint.url.toString,
i2b2Domain = ShrineOrchestrator.crcHiveCredentials.domain,
username = ShrineOrchestrator.crcHiveCredentials.username,
crcProject = ShrineOrchestrator.crcHiveCredentials.projectId,
ontProject = ShrineOrchestrator.ontologyMetadata.client match {
case client: PosterOntClient => client.hiveCredentials.projectId
case _ => ""
}
)
}
case class DownstreamNode(name: String, url: String)
// Replaces StewardQueryAuthorizationService so that we never transmit a password
case class Steward(stewardBaseUrl: String, qepUsername: String, password: String = "REDACTED")
case class Qep(
maxQueryWaitTimeMillis: Long,
create: Boolean,
attachSigningCert: Boolean,
authorizationType: String,
includeAggregateResults: Boolean,
authenticationType: String,
steward: Option[Steward],
broadcasterUrl: Option[String],
trustModel: String,
trustModelIsHub: Boolean
)
object Qep {
val key = "shrine.queryEntryPoint."
import ShrineOrchestrator.queryEntryPointComponents
def apply(): Qep = new Qep(
maxQueryWaitTimeMillis = queryEntryPointComponents.fold(0L)(_.i2b2Service.queryTimeout.toMicros),
create = queryEntryPointComponents.isDefined,
attachSigningCert = queryEntryPointComponents.fold(false)(_.i2b2Service.broadcastAndAggregationService.attachSigningCert),
authorizationType = queryEntryPointComponents.fold("")(_.i2b2Service.authorizationService.getClass.getSimpleName),
includeAggregateResults = queryEntryPointComponents.fold(false)(_.i2b2Service.includeAggregateResult),
authenticationType = queryEntryPointComponents.fold("")(_.i2b2Service.authenticator.getClass.getSimpleName),
steward = queryEntryPointComponents.flatMap(qec => checkStewardAuthorization(qec.shrineService.authorizationService)),
broadcasterUrl = queryEntryPointComponents.flatMap(qec => checkBroadcasterUrl(qec.i2b2Service.broadcastAndAggregationService)),
trustModel = ShrineOrchestrator.keyStoreDescriptor.trustModel.description,
trustModelIsHub = ShrineOrchestrator.keyStoreDescriptor.trustModel match {
case sh: SingleHubModel => true
case PeerToPeerModel => false
}
)
def checkStewardAuthorization(auth: QueryAuthorizationService): Option[Steward] = auth match {
case sa: StewardQueryAuthorizationService => Some(Steward(sa.stewardBaseUrl.toString, sa.qepUserName))
case _ => None
}
//TODO: Double check with Dave that this is the right url
def checkBroadcasterUrl(broadcaster: BroadcastAndAggregationService): Option[String] = broadcaster match {
case a: HubBroadcastAndAggregationService => a.broadcasterClient match {
case PosterBroadcasterClient(poster, _) => Some(poster.url)
case _ => None
}
case _ => None
}
}
object DownstreamNodes {
def get(): Seq[DownstreamNode] = {
ShrineOrchestrator.hubComponents.fold(Seq.empty[DownstreamNode])(_.broadcastDestinations.map(DownstreamNode(_)).to[Seq])
}
}
object DownstreamNode {
def apply(nodeHandle: NodeHandle): DownstreamNode = new DownstreamNode(
nodeHandle.nodeId.name,
nodeHandle.client.url.map(_.toString).getOrElse("not applicable"))
}
case class Adapter(crcEndpointUrl: String,
setSizeObfuscation: Boolean,
adapterLockoutAttemptsThreshold: Int,
adapterMappingsFilename: Option[String],
adapterMappingsDate: Option[Long]
)
object
Adapter {
def apply(): Adapter = {
val crcEndpointUrl = ShrineOrchestrator.adapterComponents.fold("")(_.i2b2AdminService.crcUrl)
val setSizeObfuscation = ShrineOrchestrator.adapterComponents.fold(false)(_.i2b2AdminService.obfuscate)
val adapterLockoutAttemptsThreshold = ShrineOrchestrator.adapterComponents.fold(0)(_.i2b2AdminService.adapterLockoutAttemptsThreshold)
val adapterMappingsFileName = mappingFileInfo.map(_._1)
val adapterMappingsFileDate = mappingFileInfo.map(_._2)
Adapter(crcEndpointUrl, setSizeObfuscation, adapterLockoutAttemptsThreshold, adapterMappingsFileName, adapterMappingsFileDate)
}
def mappingFileInfo: Option[(String, Long, String)] =
ShrineOrchestrator.adapterComponents.map(ac => (ac.adapterMappings.source, ac.lastModified, ac.adapterMappings.version))
}
case class Hub(shouldQuerySelf: Boolean, //todo don't use this field any more. Drop it when possible
create: Boolean,
downstreamNodes: Seq[DownstreamNode])
object Hub {
def apply(): Hub = {
val shouldQuerySelf = false
val create = ShrineOrchestrator.hubComponents.isDefined
val downstreamNodes = DownstreamNodes.get()
Hub(shouldQuerySelf, create, downstreamNodes)
}
}
case class OptionalParts(isHub: Boolean,
stewardEnabled: Boolean,
shouldQuerySelf: Boolean, //todo don't use this field any more. Drop it when possible
downstreamNodes: Seq[DownstreamNode])
object OptionalParts {
def apply(): OptionalParts = {
OptionalParts(
ShrineOrchestrator.hubComponents.isDefined,
ShrineOrchestrator.queryEntryPointComponents.fold(false)(_.shrineService.authorizationService.isInstanceOf[StewardQueryAuthorizationService]),
shouldQuerySelf = false,
DownstreamNodes.get()
)
}
}
case class Summary(
isHub: Boolean,
shrineVersion: String,
shrineBuildDate: String,
ontologyVersion: String,
ontologyVersionTerm: String,
ontologyTerm: String,
queryResult: Option[SingleNodeResult],
adapterMappingsFileName: Option[String],
adapterMappingsDate: Option[Long],
adapterOk: Boolean,
keystoreOk: Boolean,
hubOk: Boolean,
qepOk: Boolean
)
object Summary {
val term = Term(ShrineOrchestrator.shrineConfig.getString("networkStatusQuery"))
def runQueryRequest: BroadcastMessage = {
val domain = "happy"
val username = "happy"
val networkAuthn = AuthenticationInfo(domain, username, Credential("", isToken = false))
val queryDefinition = QueryDefinition("TestQuery", OccuranceLimited(1, term))
import scala.concurrent.duration._
val req = RunQueryRequest(
"happyProject",
3.minutes,
networkAuthn,
None,
None,
Set(ResultOutputType.PATIENT_COUNT_XML),
queryDefinition)
ShrineOrchestrator.signerVerifier.sign(BroadcastMessage(req.networkQueryId, networkAuthn, req), SigningCertStrategy.Attach)
}
def apply(): Summary = {
val message = runQueryRequest
val queryResult: Option[SingleNodeResult] = ShrineOrchestrator.adapterService.map { adapterService =>
import scala.concurrent.duration._
val start = System.currentTimeMillis
val resultAttempt: Try[Result] = Try(adapterService.handleRequest(message))
val end = System.currentTimeMillis
val elapsed = (end - start).milliseconds
resultAttempt match {
case scala.util.Success(result) => result
case scala.util.Failure(throwable) => FailureResult(NodeId("Local"), throwable)
}
}
val adapterOk = queryResult.fold(true) {
case r: Result => true
case f: FailureResult => false
}
val hubOk = ShrineOrchestrator.hubComponents.fold(true) { hubComponents =>
val maxQueryWaitTime = hubComponents.broadcasterMultiplexerService.maxQueryWaitTime
val broadcaster: Broadcaster = hubComponents.broadcasterMultiplexerService.broadcaster
val message = runQueryRequest
val triedMultiplexer = Try(broadcaster.broadcast(message))
//todo just use fold()() in scala 2.12
triedMultiplexer.toOption.fold(false) { multiplexer =>
val responses = Await.result(multiplexer.responses, maxQueryWaitTime).toSeq
val failures = responses.collect { case f: FailureResult => f }
val timeouts = responses.collect { case t: Timeout => t }
val validResults = responses.collect { case r: Result => r }
failures.isEmpty && timeouts.isEmpty && (validResults.size == broadcaster.destinations.size)
}
}
val adapterMappingInfo = Adapter.mappingFileInfo
val ontologyVersion = try {
ShrineOrchestrator.ontologyMetadata.ontologyVersion
}
catch {
case NonFatal(x) =>
Log.info("Problem while getting ontology version", x)
s"Unavailable due to: ${x.getMessage}"
}
Summary(
isHub = ShrineOrchestrator.hubComponents.isDefined,
shrineVersion = Versions.version,
shrineBuildDate = Versions.buildDate,
//todo in scala 2.12, do better
ontologyVersion = ontologyVersion,
ontologyVersionTerm = OntClientOntologyMetadata.versionContainerTerm,
ontologyTerm = term.value,
queryResult = queryResult,
adapterMappingsFileName = adapterMappingInfo.map(_._1),
adapterMappingsDate = adapterMappingInfo.map(_._2),
adapterOk = adapterOk,
keystoreOk = true, //todo something for this
hubOk = hubOk,
qepOk = true //todo something for this
)
}
}
case class Version(version: String)
//todo SortedMap when possible
case class Json4sConfig(keyValues: Map[String, String])
object Json4sConfig {
def isPassword(key: String): Boolean = {
if (key.toLowerCase.contains("password")) true
else false
}
def apply(config: TsConfig): Json4sConfig = {
val entries: Set[(String, String)] = config.entrySet.asScala.to[Set].map(x => (x.getKey, x.getValue.render())).filterNot(x => isPassword(x._1))
val sortedMap: Map[String, String] = entries.toMap
Json4sConfig(sortedMap)
}
}
class PermittedHostOnly extends ContainerRequestFilter {
//todo generalize for happy, too
//todo for tomcat 8 see https://jersey.java.net/documentation/latest/filters-and-interceptors.html for a cleaner version
//shell code from http://stackoverflow.com/questions/17143514/how-to-add-custom-response-and-abort-request-in-jersey-1-11-filters
//how to apply in http://stackoverflow.com/questions/4358213/how-does-one-intercept-a-request-during-the-jersey-lifecycle
override def filter(requestContext: ContainerRequest): ContainerRequest = {
val hostOfOrigin = requestContext.getBaseUri.getHost
val shrineConfig: TsConfig = ShrineOrchestrator.config
val permittedHostOfOrigin: String = shrineConfig.getOption("shrine.status.permittedHostOfOrigin", _.getString).getOrElse("localhost")
val path = requestContext.getPath
//happy and internalstatus API calls must come from the same host as tomcat is running on (hopefully the dashboard servlet).
// todo access to the happy service permitted for SHRINE 1.21 per SHRINE-1366
// restrict access to happy service when database work resumes as part of SHRINE-
// if ((path.contains("happy") || path.contains("internalstatus")) && (hostOfOrigin != permittedHostOfOrigin)) {
if (path.contains("internalstatus") && (hostOfOrigin != permittedHostOfOrigin)) {
val response = Response.status(Response.Status.UNAUTHORIZED).entity(s"Only available from $permittedHostOfOrigin, not $hostOfOrigin, controlled by shrine.status.permittedHostOfOrigin in shrine.conf").build()
throw new WebApplicationException(response)
}
else requestContext
}
}
object ShaVerificationService extends Loggable with DefaultJsonSupport {
//todo: remove duplication with StewardQueryAuthorizationService
import akka.pattern.ask
import org.json4s.native.JsonMethods.parseOpt
import system.dispatcher
// execution context for futures
implicit val system = ActorSystem("AuthorizationServiceActors", ConfigFactory.load("shrine")) //todo use shrine's config
val certCollection = ShrineOrchestrator.certCollection
def sendHttpRequest(httpRequest: HttpRequest): Future[HttpResponse] = {
implicit val timeout: Timeout = Timeout.durationToTimeout(new FiniteDuration(5, duration.SECONDS)) //5 seconds
implicit def json4sFormats: Formats = DefaultFormats
implicit def trustfulSslContext: SSLContext = {
object BlindFaithX509TrustManager extends X509TrustManager {
def checkClientTrusted(chain: Array[X509Certificate], authType: String) = info(s"Client asked BlindFaithX509TrustManager to check $chain for $authType")
def checkServerTrusted(chain: Array[X509Certificate], authType: String) = info(s"Server asked BlindFaithX509TrustManager to check $chain for $authType")
def getAcceptedIssuers = Array[X509Certificate]()
}
val context = SSLContext.getInstance("TLS")
context.init(Array[KeyManager](), Array(BlindFaithX509TrustManager), null)
context
}
implicit def trustfulSslContextProvider: SSLContextProvider = {
SSLContextProvider.forContext(trustfulSslContext)
}
class CustomClientSSLEngineProvider extends ClientSSLEngineProvider {
def apply(pc: PipelineContext) = ClientSSLEngineProvider.default(trustfulSslContextProvider).apply(pc)
}
implicit def sslEngineProvider: ClientSSLEngineProvider = new CustomClientSSLEngineProvider
val responseFuture: Future[HttpResponse] = for {
HostConnectorInfo(hostConnector, _) <- {
val hostConnectorSetup = new HostConnectorSetup(httpRequest.uri.authority.host.address,
httpRequest.uri.authority.port,
sslEncryption = httpRequest.uri.scheme == "https")(
sslEngineProvider = sslEngineProvider)
IO(Http) ask hostConnectorSetup
}
response <- sendReceive(hostConnector).apply(httpRequest)
_ <- hostConnector ask Http.CloseAll
} yield response
responseFuture
}
type MaybeSiteStatus = Future[Option[SiteStatus]]
def apply(sites: Seq[RemoteSite]): Seq[MaybeSiteStatus] = sites.map(curl)
def curl(site: RemoteSite): MaybeSiteStatus = {
val shaEntry = certCollection match {
case HubCertCollection(_, caEntry, _) => caEntry
case PeerCertCollection(my, _, _) => my
case DownStreamCertCollection(_, caEntry, _) => caEntry
}
val sha256 = UtilHasher.encodeCert(shaEntry.cert, "SHA-256")
implicit val formats = org.json4s.DefaultFormats
val request = Post(s"https://${site.url}:${site.port}/shrine-dashboard/status/verifySignature")
.withEntity( // For some reason, FormData isn't producing the correct HTTP call, so we do it manually
HttpEntity.apply(
ContentType(
MediaTypes.`application/x-www-form-urlencoded`,
HttpCharsets.`UTF-8`),
s"sha256=$sha256"))
for {response <- sendHttpRequest(request)
rawResponse = new String(response.entity.data.toByteArray)
status = parseOpt(rawResponse).fold(handleError(rawResponse))(_.extractOpt[ShaResponse] match {
case Some(ShaResponse(ShaResponse.badFormat, false)) =>
error(s"Somehow, this client is sending an incorrectly formatted SHA256 signature to the dashboard. Offending sig: $sha256")
None
case Some(ShaResponse(sha, true)) => Some(SiteStatus(site.alias, theyHaveMine = true, haveTheirs = doWeHaveCert(sha), site.url))
case Some(ShaResponse(sha, false)) => Some(SiteStatus(site.alias, theyHaveMine = false, haveTheirs = doWeHaveCert(sha), site.url))
case None =>
InvalidVerifySignatureResponse(rawResponse)
None
})} yield status
}
def doWeHaveCert(sha256: String): Boolean = UtilHasher(certCollection).handleSig(sha256).found
def handleError(response: String): Option[SiteStatus] = {
InvalidVerifySignatureResponse(response)
None
}
+}
- case class InvalidVerifySignatureResponse(response: String) extends AbstractProblem(ProblemSources.ShrineApp) {
- override def summary: String = "The client for handling certificate diagnostic across Dashboards in the Status Service received an invalid response from verifySignature"
- override def description: String = s"verifySig produced the invalid response `$response`"
- }
+case class InvalidVerifySignatureResponse(response: String) extends AbstractProblem(ProblemSources.ShrineApp) {
+ override def summary: String = "The client for handling certificate diagnostic across Dashboards in the Status Service received an invalid response from shrine-dashboard/admin/status/verifySignature"
+
+ override def description: String = s"See details for incorrect response:"
+
+ override def throwable: Option[Throwable] = Some(InvalidResponseException(response))
+}
+case class InvalidResponseException(response: String) extends IllegalStateException {
+ override def getMessage: String = s"Invalid response `$response`"
}
diff --git a/apps/shrine-app/src/test/scala/net/shrine/status/StatusJaxrsTest.scala b/apps/shrine-app/src/test/scala/net/shrine/status/StatusJaxrsTest.scala
index 2c061f555..361314307 100644
--- a/apps/shrine-app/src/test/scala/net/shrine/status/StatusJaxrsTest.scala
+++ b/apps/shrine-app/src/test/scala/net/shrine/status/StatusJaxrsTest.scala
@@ -1,128 +1,127 @@
package net.shrine.status
import com.typesafe.config.ConfigFactory
import net.shrine.util.{ShouldMatchersForJUnit, SingleHubModel}
import org.json4s.native.Serialization
import org.json4s.{DefaultFormats, Formats}
import org.junit.Test
import scala.collection.immutable.Map
/**
* Tests for StatusJaxrs
*
* @author david
* @since 12/2/15
*/
class StatusJaxrsTest extends ShouldMatchersForJUnit {
implicit def json4sFormats: Formats = DefaultFormats
val expectedConfig = ConfigFactory.load("shrine") //new File("/Users/ty/shrine/apps/shrine-app/src/test/resources/shrine.conf"))
val statusJaxrs = StatusJaxrs(expectedConfig)
@Test
def testVersion() = {
val versionString = statusJaxrs.version
val version = Serialization.read[Version](versionString)
version should equal(Version("changeMe"))
}
@Test
def testConfig() = {
val expectedJson4sConfig = Json4sConfig(expectedConfig)
val configString = statusJaxrs.config
val config = Serialization.read[Json4sConfig](configString)
config should equal(expectedJson4sConfig)
val passwordKeys = config.keyValues.filter(x => Json4sConfig.isPassword(x._1))
passwordKeys should equal(Map.empty[String,String])
}
@Test
def testSummary() = {
val summaryString = statusJaxrs.summary
val summary = Serialization.read[Summary](summaryString)
summary.isHub should be (true)
summary.adapterMappingsFileName.isDefined should be (true)
summary.adapterMappingsDate.isEmpty should be (false)
summary.adapterOk should be (true)
summary.keystoreOk should be (true)
summary.hubOk should be (false)
summary.qepOk should be (true)
}
@Test
def testI2b2() = {
val i2b2String = statusJaxrs.i2b2
val i2b2 = Serialization.read[I2b2](i2b2String)
i2b2.crcUrl.isDefined should be (true)
}
@Test
def testOptionalParts() = {
val string = statusJaxrs.optionalParts
val actual = Serialization.read[OptionalParts](string)
actual.isHub should be (true)
actual.stewardEnabled should be (true)
actual.shouldQuerySelf should be (false)
actual.downstreamNodes.size should be (4)
}
@Test
def testHub() = {
val string = statusJaxrs.hub
val actual = Serialization.read[Hub](string)
actual.create should be (true)
actual.shouldQuerySelf should be (false)
actual.downstreamNodes.size should be (4)
}
@Test
def testQep() = {
val string = statusJaxrs.qep
val actual = Serialization.read[Qep](string)
actual.create should be (true)
actual.attachSigningCert should be (true)
actual.authenticationType should be ("PmAuthenticator")
actual.authorizationType should be ("StewardQueryAuthorizationService")
actual.includeAggregateResults should be (false)
actual.maxQueryWaitTimeMillis should be (300000000L)
actual.trustModel should be (SingleHubModel(true).description)
actual.trustModelIsHub should be (true)
}
@Test
def testAdapter() = {
val string = statusJaxrs.adapter
val actual = Serialization.read[Adapter](string)
actual.adapterLockoutAttemptsThreshold should be (10)
}
@Test
def testKeyStore() = {
val string = statusJaxrs.keystore
- println(string)
val actual = Serialization.read[KeyStoreReport](string)
}
}
diff --git a/apps/steward-app/pom.xml b/apps/steward-app/pom.xml
index 657860d62..2f140a323 100644
--- a/apps/steward-app/pom.xml
+++ b/apps/steward-app/pom.xml
@@ -1,177 +1,177 @@
shrine-basenet.shrine
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xml4.0.0steward-appSteward Appjarsrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-plugincom.github.eirslettfrontend-maven-plugin1.0src/main/jsinstall node and npminstall-node-and-npmv6.2.23.10.3npm installnpmgenerate-resourcesbower installbowergulp test and buildgulp--no-colorio.sprayspray-routing_2.11${spray-version}io.sprayspray-servlet_2.11${spray-version}io.sprayspray-util_2.11${spray-version}io.sprayspray-testkit_2.11${spray-version}testcom.typesafe.akkaakka-actor_2.11${akka-version}com.typesafe.akkaakka-slf4j_2.11${akka-version}com.typesafe.akkaakka-testkit_2.11${akka-testkit-version}testorg.json4sjson4s-native_2.11${json4s-version}com.typesafe.slickslick_2.11${slick-version}org.suecarterfreeslick_2.11${freeslick-version}org.slf4jslf4j-log4j12${slf4j-version}com.h2databaseh2${h2-version}testnet.shrineshrine-protocol${project.version}net.shrineshrine-email${project.version}net.shrineshrine-data-commons${project.version}net.shrineshrine-client${project.version}net.shrineshrine-crypto${project.version}test-jartestnet.shrineshrine-auth${project.version}mysqlmysql-connector-java${mysql-version}
diff --git a/apps/steward-war/pom.xml b/apps/steward-war/pom.xml
index a9e2b7270..c52b3fcf0 100644
--- a/apps/steward-war/pom.xml
+++ b/apps/steward-war/pom.xml
@@ -1,43 +1,43 @@
shrine-basenet.shrine
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xml4.0.0stewardSteward Warwarorg.apache.maven.pluginsmaven-war-pluginstewardnet.shrinesteward-app${project.version}com.h2databaseh2${h2-version}testorg.slf4jslf4j-log4j12${slf4j-version}runtime
diff --git a/apps/war/pom.xml b/apps/war/pom.xml
index 21671bd7d..45f357973 100644
--- a/apps/war/pom.xml
+++ b/apps/war/pom.xml
@@ -1,58 +1,58 @@
4.0.0SHRINE Warshrine-warwarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlnet.shrineshrine-test-commons${project.version}test-jartestnet.shrineshrine-app${project.version}net.shrineshrine-adapter-service${project.version}javax.servletjavax.servlet-apiprovidedcom.sun.jerseyjersey-servletnet.shrineshrine-adapter-service${project.version}test-jartestshrine-cellsrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-plugin
diff --git a/commons/auth/pom.xml b/commons/auth/pom.xml
index a4d6be948..860eb20a4 100644
--- a/commons/auth/pom.xml
+++ b/commons/auth/pom.xml
@@ -1,97 +1,97 @@
4.0.0SHRINE Auth*shrine-authjarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlnet.shrineshrine-protocol${project.version}com.typesafe.akkaakka-actor_2.11${akka-version}org.json4sjson4s-native_2.11${json4s-version}io.sprayspray-client_2.11${spray-version}io.sprayspray-routing_2.11${spray-version}io.sprayspray-servlet_2.11${spray-version}io.sprayspray-util_2.11${spray-version}io.sprayspray-testkit_2.11${spray-version}testcom.typesafe.akkaakka-slf4j_2.11${akka-version}com.typesafe.akkaakka-testkit_2.11${akka-version}testnet.shrineshrine-client${project.version}net.shrineshrine-test-commons${project.version}test-jartestsrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-plugin
diff --git a/commons/client/pom.xml b/commons/client/pom.xml
index 73d8db3cf..9ce531699 100644
--- a/commons/client/pom.xml
+++ b/commons/client/pom.xml
@@ -1,68 +1,68 @@
4.0.0SHRINE Clientshrine-clientjarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlnet.shrineshrine-test-commons${project.version}test-jartestnet.shrineshrine-protocol${project.version}net.shrineshrine-crypto${project.version}net.shrineshrine-crypto${project.version}test-jartestnet.shrineshrine-config${project.version}com.sun.jerseyjersey-clientsrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-pluginorg.apache.maven.pluginsmaven-jar-plugintest-jar
diff --git a/commons/config/pom.xml b/commons/config/pom.xml
index 6a3cbb90c..3e91951bf 100644
--- a/commons/config/pom.xml
+++ b/commons/config/pom.xml
@@ -1,56 +1,56 @@
4.0.0SHRINE Configshrine-configjarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlnet.shrineshrine-test-commons${project.version}test-jartestnet.sf.opencsvopencsvcom.typesafeconfignet.shrineshrine-util${project.version}src/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-pluginorg.apache.maven.pluginsmaven-jar-plugintest-jar
diff --git a/commons/crypto/pom.xml b/commons/crypto/pom.xml
index 405db3141..d642b4634 100644
--- a/commons/crypto/pom.xml
+++ b/commons/crypto/pom.xml
@@ -1,58 +1,58 @@
4.0.0SHRINE Cryptoshrine-cryptojarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlnet.shrineshrine-test-commons${project.version}test-jartestnet.shrineshrine-protocol${project.version}net.shrineshrine-config${project.version}org.bouncycastlebcpkix-jdk15on${bouncy-castle-version}src/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-pluginorg.apache.maven.pluginsmaven-jar-plugintest-jar
diff --git a/commons/crypto/src/main/scala/net/shrine/crypto/SigningCertStrategy.scala b/commons/crypto/src/main/scala/net/shrine/crypto/SigningCertStrategy.scala
index dde01e21e..f23c99100 100644
--- a/commons/crypto/src/main/scala/net/shrine/crypto/SigningCertStrategy.scala
+++ b/commons/crypto/src/main/scala/net/shrine/crypto/SigningCertStrategy.scala
@@ -1,12 +1,12 @@
package net.shrine.crypto
/**
* @author clint
* @since Dec 4, 2014
*/
final case class SigningCertStrategy private (name: String, description: String, attachSigningCert: Boolean)
-
+// TODO: DELETE THIS ONCE WE CAN REMOVE CERTID FROM THE XML BROADCAST
object SigningCertStrategy {
val DontAttach = SigningCertStrategy("DontAttach", "Don't Attach Signing Cert", attachSigningCert = false)
val Attach = SigningCertStrategy("Attach", "Attach Signing Cert", attachSigningCert = true)
}
\ No newline at end of file
diff --git a/commons/data-commons/pom.xml b/commons/data-commons/pom.xml
index 7adee9786..36177e82c 100644
--- a/commons/data-commons/pom.xml
+++ b/commons/data-commons/pom.xml
@@ -1,87 +1,87 @@
4.0.0SHRINE Data Access Classesshrine-data-commonsjarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlsrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-pluginorg.apache.maven.pluginsmaven-jar-plugintest-jarnet.shrineshrine-test-commons${project.version}test-jartestnet.shrineshrine-config${project.version}net.shrineshrine-util${project.version}org.suecarterfreeslick_2.11${freeslick-version}org.squerylsqueryl_${scala-major-version}org.scala-langscalaporg.scala-langscalap${scala-version}org.springframeworkspring-jdbctestcom.h2databaseh2test
diff --git a/commons/email/pom.xml b/commons/email/pom.xml
index dc51b9c40..51ae05e1e 100644
--- a/commons/email/pom.xml
+++ b/commons/email/pom.xml
@@ -1,71 +1,71 @@
4.0.0SHRINE Emailshrine-emailjarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlorg.slf4jslf4j-simple1.6.4org.json4sjson4s-native_2.11${json4s-version}me.lessiscourier_2.110.1.3net.shrineshrine-config${project.version}net.shrineshrine-test-commons${project.version}test-jartestorg.jvnet.mock-javamailmock-javamail1.9testsrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-pluginorg.apache.maven.pluginsmaven-jar-plugin2.6test-jar
diff --git a/commons/ont-support/pom.xml b/commons/ont-support/pom.xml
index c10b6b7e4..32b092c4c 100644
--- a/commons/ont-support/pom.xml
+++ b/commons/ont-support/pom.xml
@@ -1,63 +1,63 @@
4.0.0SHRINE Ontology Supportshrine-ont-supportjarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlnet.shrineshrine-test-commons${project.version}test-jartestnet.shrineshrine-protocol${project.version}net.shrineshrine-util${project.version}net.shrineshrine-crypto${project.version}net.shrineshrine-crypto${project.version}test-jartestnet.shrineshrine-config${project.version}net.shrineshrine-client${project.version}src/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-plugin
diff --git a/commons/protocol-query/pom.xml b/commons/protocol-query/pom.xml
index ac8d9f8d0..09d1b5ad5 100644
--- a/commons/protocol-query/pom.xml
+++ b/commons/protocol-query/pom.xml
@@ -1,57 +1,57 @@
4.0.0SHRINE Query Protocolshrine-protocol-queryjarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlnet.shrineshrine-test-commons${project.version}test-jartestnet.liftweblift-json_${scala-major-version}org.scala-langscalaporg.scala-langscalap${scala-version}net.shrineshrine-util${project.version}src/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-plugin
diff --git a/commons/protocol/pom.xml b/commons/protocol/pom.xml
index 66c78a43c..ba36005b2 100644
--- a/commons/protocol/pom.xml
+++ b/commons/protocol/pom.xml
@@ -1,91 +1,91 @@
4.0.0SHRINE Protocolshrine-protocoljarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlnet.shrineshrine-protocol-query${project.version}net.shrineshrine-util${project.version}net.shrineshrine-util${project.version}test-jartestnet.shrineshrine-config${project.version}net.shrineshrine-data-commons${project.version}net.liftweblift-json_${scala-major-version}org.easymockeasymocktestnet.shrineshrine-test-commons${project.version}test-jartestsrc/main/scalasrc/test/scalasrc/main/resourcestrueshrine-versions.propertiesnet.alchim31.mavenscala-maven-pluginnet.alchim31.mavenscala-maven-pluginorg.apache.maven.pluginsmaven-jar-plugintest-jar
diff --git a/commons/test-commons/pom.xml b/commons/test-commons/pom.xml
index aa9be98df..cb81d2116 100644
--- a/commons/test-commons/pom.xml
+++ b/commons/test-commons/pom.xml
@@ -1,48 +1,48 @@
4.0.0SHRINE Test Commonsshrine-test-commonsjarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlcom.sun.jerseyjersey-clienttestcom.sun.jersey.jersey-test-frameworkjersey-test-framework-http${jersey-version}testsrc/test/scalaorg.apache.maven.pluginsmaven-jar-plugintest-jarnet.alchim31.mavenscala-maven-plugin
diff --git a/commons/util/pom.xml b/commons/util/pom.xml
index f41a5ad7f..2e59268a6 100644
--- a/commons/util/pom.xml
+++ b/commons/util/pom.xml
@@ -1,102 +1,102 @@
4.0.0SHRINE Utility Codeshrine-utiljarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlcom.typesafe.slickslick_2.11${slick-version}io.sprayspray-httpx_2.11${spray-version}org.slf4jslf4j-simple1.6.4net.liftweblift-json_${scala-major-version}org.scala-langscalaporg.scala-langscalap${scala-version}log4jlog4jnet.shrineshrine-test-commons${project.version}test-jartestorg.json4sjson4s-native_2.11${json4s-version}com.h2databaseh2testsrc/main/scalasrc/test/scalasrc/main/resourcestrueshrine-versions.propertiesnet.alchim31.mavenscala-maven-pluginorg.apache.maven.pluginsmaven-jar-plugin2.6test-jar
diff --git a/hms-support/hms-core/pom.xml b/hms-support/hms-core/pom.xml
index 48eea3be0..2ced6b8d3 100644
--- a/hms-support/hms-core/pom.xml
+++ b/hms-support/hms-core/pom.xml
@@ -1,62 +1,62 @@
net.shrineshrine-hms-support
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT4.0.0shrine-hms-coreSHRINE HMS Support (Core Classes)net.shrineshrine-test-commons${project.version}test-jartestnet.shrineshrine-auth${project.version}net.shrineshrine-protocol${project.version}net.shrineshrine-client${project.version}net.shrineshrine-crypto${project.version}net.shrineshrine-crypto${project.version}test-jartestorg.easymockeasymocktestsrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-plugin
diff --git a/hms-support/pom.xml b/hms-support/pom.xml
index c004b79c8..f3f3cbe09 100644
--- a/hms-support/pom.xml
+++ b/hms-support/pom.xml
@@ -1,15 +1,15 @@
4.0.0SHRINE HMS Supportshrine-hms-supportpomnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOThms-core
diff --git a/hub/broadcaster-aggregator/pom.xml b/hub/broadcaster-aggregator/pom.xml
index d39c591e3..42f57fbba 100644
--- a/hub/broadcaster-aggregator/pom.xml
+++ b/hub/broadcaster-aggregator/pom.xml
@@ -1,161 +1,161 @@
4.0.0SHRINE Broadcaster Aggregatorshrine-broadcaster-aggregatorjarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlsrc/main/scalasrc/test/scalaorg.codehaus.mojotomcat-maven-plugin1.0-beta-1net.alchim31.mavenscala-maven-pluginorg.apache.maven.pluginsmaven-jar-plugintest-jarnet.shrineshrine-adapter-client-api${project.version}net.shrineshrine-client${project.version}net.shrineshrine-protocol${project.version}net.shrineshrine-data-commons${project.version}mysqlmysql-connector-javanet.shrineshrine-util${project.version}test-jartestnet.shrineshrine-crypto${project.version}test-jartestnet.shrineshrine-test-commons${project.version}test-jartestnet.shrineshrine-data-commons${project.version}test-jartestnet.shrineshrine-config${project.version}test-jartestcom.sun.jersey.jersey-test-frameworkjersey-test-framework-http${jersey-version}testcom.sun.jersey.contribsjersey-simple-server${jersey-version}testcom.h2databaseh2testorg.easymockeasymocktestorg.springframeworkspring-jdbctestorg.codehaus.mojofindbugs-maven-plugin2.3.1Maxorg.codehaus.mojocobertura-maven-plugin2.3org.apache.maven.pluginsmaven-checkstyle-plugin2.5org.apache.maven.pluginsmaven-pmd-plugin2.41.6
diff --git a/hub/broadcaster-aggregator/src/main/sql/mssql.ddl b/hub/broadcaster-aggregator/src/main/sql/mssql.ddl
new file mode 100644
index 000000000..102a8343a
--- /dev/null
+++ b/hub/broadcaster-aggregator/src/main/sql/mssql.ddl
@@ -0,0 +1,27 @@
+--#https://open.med.harvard.edu/svn/shrine/releases/1.18.2/code/broadcaster-aggregator/src/main/resources/hub.sql
+--removed engine=innodb default charset=latin1; from each create table
+--changed auto_increment to identity(1,1)
+--changed timestamp types to datetime
+--broke out index creatation into seperate commands
+
+create table HUB_QUERY (
+ NETWORK_QUERY_ID bigint not null,
+ DOMAIN varchar(256) not null,
+ USERNAME varchar(256) not null,
+ CREATE_DATE datetime not null default current_timestamp,
+ QUERY_DEFINITION text not null,
+ constraint hub_query_id_pk primary key(NETWORK_QUERY_ID)
+)
+CREATE NONCLUSTERED INDEX ix_HUB_QUERY_username_domain ON [dbo].[HUB_QUERY] (username, domain ASC)
+
+
+create table HUB_QUERY_RESULT (
+ ID int not null identity(1,1),
+ NETWORK_QUERY_ID bigint not null,
+ NODE_NAME varchar(255) not null,
+ CREATE_DATE datetime not null default current_timestamp,
+ STATUS varchar(255) not null,
+ constraint hub_query_result_id_pk primary key(ID)
+)
+CREATE NONCLUSTERED INDEX ix_HUB_QUERY_RESULT_network_query_id ON HUB_QUERY_RESULT (NETWORK_QUERY_ID)
+CREATE NONCLUSTERED INDEX ix_HUB_QUERY_RESULT_network_query_id_node_name ON HUB_QUERY_RESULT (NETWORK_QUERY_ID, NODE_NAME)
diff --git a/hub/broadcaster-aggregator/src/main/sql/hub.sql b/hub/broadcaster-aggregator/src/main/sql/mysql.ddl
similarity index 100%
rename from hub/broadcaster-aggregator/src/main/sql/hub.sql
rename to hub/broadcaster-aggregator/src/main/sql/mysql.ddl
diff --git a/hub/broadcaster-aggregator/src/main/sql/oracle.ddl b/hub/broadcaster-aggregator/src/main/sql/oracle.ddl
new file mode 100644
index 000000000..06b6d10e9
--- /dev/null
+++ b/hub/broadcaster-aggregator/src/main/sql/oracle.ddl
@@ -0,0 +1,42 @@
+create table HUB_QUERY (
+ NETWORK_QUERY_ID NUMBER(11) not null,
+ DOMAIN VARCHAR2(256) not null,
+ USERNAME VARCHAR2(256) not null,
+ CREATE_DATE timestamp default current_timestamp,
+ QUERY_DEFINITION CLOB not null,
+ constraint hub_query_id_pk primary key(NETWORK_QUERY_ID)
+);
+
+create table HUB_QUERY_RESULT (
+ ID NUMBER(11) not null,
+ NETWORK_QUERY_ID NUMBER(11) not null,
+ NODE_NAME VARCHAR2(255) not null,
+ CREATE_DATE timestamp default current_timestamp,
+ STATUS VARCHAR2(255) not null,
+ constraint hub_query_result_id_pk primary key(ID)
+);
+
+-- handcrafted autoincrement from http://earlruby.org/2009/01/creating-auto-increment-columns-in-oracle/
+create sequence HUB_QUERY_RESULT_id_Seq start with 1 increment by 1;
+create or replace trigger HUB_QUERY_RESULT_id_Insert
+before insert on "HUB_QUERY_RESULT"
+for each row
+declare
+ max_id number;
+ cur_seq number;
+begin
+ if :new.id is null then
+ -- No ID passed, get one from the sequence
+ select HUB_QUERY_RESULT_id_Seq.nextval into :new.id from dual;
+ else
+ -- ID was set via insert, so update the sequence
+ select greatest(nvl(max(id),0), :new.id) into max_id from "HUB_QUERY_RESULT";
+ select HUB_QUERY_RESULT_id_Seq.nextval into cur_seq from dual;
+ while cur_seq < max_id
+ loop
+ select HUB_QUERY_RESULT_id_Seq.nextval into cur_seq from dual;
+ end loop;
+ end if;
+end;
+/
+-- end autoincrement
\ No newline at end of file
diff --git a/hub/broadcaster-service/pom.xml b/hub/broadcaster-service/pom.xml
index 40949caf7..c2d793a26 100644
--- a/hub/broadcaster-service/pom.xml
+++ b/hub/broadcaster-service/pom.xml
@@ -1,148 +1,148 @@
4.0.0SHRINE Broadcast Serviceshrine-broadcaster-servicejarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlsrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-plugincom.sun.jerseyjersey-servernet.shrineshrine-broadcaster-aggregator${project.version}net.shrineshrine-crypto${project.version}net.shrineshrine-client${project.version}net.shrineshrine-adapter-client-api${project.version}net.shrineshrine-protocol${project.version}net.shrineshrine-data-commons${project.version}log4jlog4jcom.sun.jersey.jersey-test-frameworkjersey-test-framework-http${jersey-version}testcom.sun.jersey.contribsjersey-simple-server${jersey-version}testcom.h2databaseh2testorg.easymockeasymocktestorg.springframeworkspring-jdbctestnet.shrineshrine-test-commons${project.version}test-jartestnet.shrineshrine-data-commons${project.version}test-jartestorg.codehaus.mojofindbugs-maven-plugin2.3.1Maxorg.codehaus.mojocobertura-maven-plugin2.3org.apache.maven.pluginsmaven-checkstyle-plugin2.5org.apache.maven.pluginsmaven-pmd-plugin2.41.6
diff --git a/install/pom.xml b/install/pom.xml
index e1c9ea74b..e317303b1 100644
--- a/install/pom.xml
+++ b/install/pom.xml
@@ -1,34 +1,34 @@
4.0.0SHRINE Install Scriptsshrine-install-scriptspomnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOTshrine-install-scriptsorg.apache.maven.pluginsmaven-assembly-pluginsrc/main/assembly/assembly.xmlmake-assemblypackagesingle
diff --git a/install/src/main/resources/shrine.conf b/install/src/main/resources/shrine.conf
index 2b53de8e1..e8ec0f026 100644
--- a/install/src/main/resources/shrine.conf
+++ b/install/src/main/resources/shrine.conf
@@ -1,342 +1,345 @@
shrine {
+ metaData {
+ ping = "pong"
+ }
pmEndpoint {
// url = "http://shrine-dev1.catalyst/i2b2/services/PMService/getServices" //use your i2b2 pm url
}
ontEndpoint {
// url = "http://shrine-dev1.catalyst/i2b2/rest/OntologyService/" //use your i2b2 ontology url
}
hiveCredentials {
//use your i2b2 hive credentials
// domain = "i2b2demo"
// username = "demo"
// password = "demouser"
// crcProjectId = "Demo"
// ontProjectId = "SHRINE"
}
breakdownResultOutputTypes {
//use breakdown values appropriate for your shrine network
// PATIENT_AGE_COUNT_XML {
// description = "Age patient breakdown"
// }
// PATIENT_RACE_COUNT_XML {
// description = "Race patient breakdown"
// }
// PATIENT_VITALSTATUS_COUNT_XML {
// description = "Vital Status patient breakdown"
// }
// PATIENT_GENDER_COUNT_XML {
// description = "Gender patient breakdown"
// }
}
queryEntryPoint {
// create = true //false for no qep
// audit {
// collectQepAudit = true //false to not use the 1.20 audit db tables
// database {
// dataSourceFrom = "JNDI" //Can be JNDI or testDataSource . Use testDataSource for tests, JNDI everywhere else
// jndiDataSourceName = "java:comp/env/jdbc/qepAuditDB" //or leave out for tests
// slickProfileClassName = "slick.driver.MySQLDriver$" // Can be
// slick.driver.H2Driver$
// slick.driver.MySQLDriver$
// slick.driver.PostgresDriver$
// slick.driver.SQLServerDriver$
// slick.driver.JdbcDriver$
// freeslick.OracleProfile$
// freeslick.MSSQLServerProfile$
//
// (Yes, with the $ on the end)
// For testing without JNDI
// testDataSource {
//typical test settings for unit tests
//driverClassName = "org.h2.Driver"
//url = "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1" //H2 embedded in-memory for unit tests
//url = "jdbc:h2:~/stewardTest.h2" //H2 embedded on disk at ~/test
// }
// timeout = 30 //time to wait before db gives up, in seconds.
// createTablesOnStart = false //for testing with H2 in memory, when not running unit tests. Set to false normally
// }
// }
// trustModelIsHub = true // False for P2P networks.
// authenticationType = "pm" //can be none, pm, or ecommons
// authorizationType = "shrine-steward" //can be none, shrine-steward, or hms-steward
//hms-steward config
// sheriffEndpoint {
// url = "http://localhost:8080/shrine-hms-authorization/queryAuthorization"
// acceptAllCerts = true
// timeout {
// seconds = 1
// }
// }
// sheriffCredentials {
// username = "sheriffUsername"
// password = "sheriffPassword"
// }
//shrine-steward config
// shrineSteward {
// qepUserName = "qep"
// qepPassword = "trustme"
// stewardBaseUrl = "https://localhost:6443"
// }
// includeAggregateResults = false
//
// maxQueryWaitTime {
// minutes = 5 //must be longer than the hub's maxQueryWaitTime
// }
// broadcasterServiceEndpoint {
// url = "http://example.com/shrine/rest/broadcaster/broadcast" //url for the hub
// acceptAllCerts = true
// timeout {
// seconds = 1
// }
// }
}
hub {
// create = false //change to true to start a hub
maxQueryWaitTime {
// minutes = 4.5 //Needs to be longer than the adapter's maxQueryWaitTime, but shorter than the qep's
}
downstreamNodes { //Add your downstream nodes here
// shrine-dev2 = "https://shrine-dev2.catalyst:6443/shrine/rest/adapter/requests"
}
shouldQuerySelf = false //true if there is an adapter at the hub , or just add a loopback address to downstreamNodes
}
adapter {
// create = true by default. False to not create an adapter.
// audit {
// collectAdapterAudit = true by default. False to not fill in the audit database
// database {
// dataSourceFrom = "JNDI" //Can be JNDI or testDataSource . Use testDataSource for tests, JNDI everywhere else
// jndiDataSourceName = "java:comp/env/jdbc/adapterAuditDB" //or leave out for tests
// slickProfileClassName = "slick.driver.MySQLDriver$" // Can be
// slick.driver.H2Driver$
// slick.driver.MySQLDriver$
// slick.driver.PostgresDriver$
// slick.driver.SQLServerDriver$
// slick.driver.JdbcDriver$
// freeslick.OracleProfile$
// freeslick.MSSQLServerProfile$
//
// (Yes, with the $ on the end)
// For testing without JNDI
// testDataSource {
//typical test settings for unit tests
//driverClassName = "org.h2.Driver"
//url = "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1" //H2 embedded in-memory for unit tests
//url = "jdbc:h2:~/stewardTest.h2" //H2 embedded on disk at ~/test
// }
// createTablesOnStart = false //for testing with H2 in memory, when not running unit tests. Set to false normally
// }
// obfuscation {
// binSize = 5 by default //Round to the nearest binSize. Use 1 for no effect (to match SHRINE 1.21 and earlier).
// sigma = 6.5 by default //Noise to inject. Use 0 for no effect. (Use 1.33 to match SHRINE 1.21 and earlier).
// clamp = 10 by default //Maximum ammount of noise to inject. (Use 3 to match SHRINE 1.21 and earlier).
// }
// adapterLockoutAttemptsThreshold = 10 by default // Number of allowed queries with the same actual result that can exist before a researcher is locked out of the adapter. Set to '0' to never lock out. In 1.23 the default will change to 0. In 1.24 the lockout code and this config value will be removed
// botDefense {
// countsAndMilliseconds = [ //to turn off, use an empty json list
// {count = 10, milliseconds = 60000}, //allow up to 10 queries in one minute by default
// {count = 200, milliseconds = 36000000} //allow up to 4 queries in 10 hours by default
// ]
// }
crcEndpoint {
//must be filled in url = "http://shrine-dev1.catalyst/i2b2/services/QueryToolService/"
}
setSizeObfuscation = true //must be set. false turns off obfuscation
adapterMappingsFileName = "AdapterMappings.xml"
maxSignatureAge {
minutes = 5 //must be longer than the hub's maxQueryWaitTime
}
immediatelyRunIncomingQueries = true
}
networkStatusQuery = "\\\\SHRINE\\SHRINE\\Demographics\\Gender\\Male\\"
humanReadableNodeName = "shrine-dev1"
shrineDatabaseType = "mysql"
keystore {
file = "/opt/shrine/shrine.keystore"
password = "changeit"
privateKeyAlias = "shrine-dev1.catalyst"
keyStoreType = "JKS"
caCertAliases = [
"shrine-dev-ca"
]
}
problem {
// problemHandler = "net.shrine.problem.LogAndDatabaseProblemHandler$" Can be other specialized problemHandler implementations
}
dashboard {
// gruntWatch = false //false for production, true for mvn tomcat7:run . Allows the client javascript and html files to be loaded via gruntWatch .
// happyBaseUrl = "https://localhost:6443/shrine/rest/happy" If the shine servlet is running on a different machime from the dashboard, change this URL to match
// statusBaseUrl = "https://localhost:6443/shrine/rest/internalstatus" If the shine servlet is running on a different machime from the dashboard, change this URL to match
// database {
// dataSourceFrom = "JNDI" //Can be JNDI or testDataSource . Use testDataSource for tests, JNDI everywhere else
// jndiDataSourceName = "java:comp/env/jdbc/problemDB"
// slickProfileClassName = "slick.driver.MySQLDriver$" // Can be
// slick.driver.H2Driver$
// slick.driver.MySQLDriver$
// slick.driver.PostgresDriver$
// slick.driver.SQLServerDriver$
// slick.driver.JdbcDriver$
// freeslick.OracleProfile$
// freeslick.MSSQLServerProfile$
//
// (Yes, with the $ on the end)
// For testing without JNDI
// testDataSource {
//typical test settings for unit tests
//driverClassName = "org.h2.Driver"
//url = "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1" //H2 embedded in-memory for unit tests
//url = "jdbc:h2:~/stewardTest.h2" //H2 embedded on disk at ~/test
// }
// createTablesOnStart = false //for testing with H2 in memory, when not running unit tests. Set to false normally
// }
// }
// status {
//permittedHostOfOrigin = "localhost" //If absent then get the host name via java.net.InetAddress.getLocalHost.getHostName . Override to control
}
//Get the older squerl-basd databases through JNDI (inside of tomcant, using tomcat's db connection pool) or directly via a db config here (for testing
squerylDataSource {
// database {
// dataSourceFrom = "JNDI" //Can be JNDI or testDataSource . Use testDataSource for tests, JNDI everywhere else
// jndiDataSourceName = "java:comp/env/jdbc/shrineDB" //or leave out for tests
// }
}
authenticate {
usersource {
// domain = "i2b2demo" //you must provide your own domain
}
}
steward {
// createTopicsMode = Pending //Can be Pending, Approved, or TopcisIgnoredJustLog. Pending by default
//Pending - new topics start in the Pending state; researchers must wait for the Steward to approve them
//Approved - new topics start in the Approved state; researchers can use them immediately
//TopicsIgnoredJustLog - all queries are logged and approved; researchers don't need to create topics
emailDataSteward {
// sendAuditEmails = true //false to turn off the whole works of emailing the data steward
// interval = "1 day" //Audit researchers daily
// timeAfterMidnight = "6 hours" //Audit researchers at 6 am. If the interval is less than 1 day then this delay is ignored.
// maxQueryCountBetweenAudits = 30 //If a researcher runs more than this many queries since the last audit audit her
// minTimeBetweenAudits = "30 days" //If a researcher runs at least one query, audit those queries if this much time has passed
//You must provide the email address of the shrine node system admin, to handle bounces and invalid addresses
//from = "shrine-admin@example.com"
//You must provide the email address of the data steward
//to = "shrine-steward@example.com"
// subject = "Audit SHRINE researchers"
//The baseUrl for the data steward to be substituted in to email text. Must be supplied if it is used in the email text.
//stewardBaseUrl = "https://example.com:8443/steward/"
//Text to use for the email audit.
// AUDIT_LINES will be replaced by a researcherLine for each researcher to audit.
// STEWARD_BASE_URL will be replaced by the value in stewardBaseUrl if available.
// emailBody = """Please audit the following users at STEWARD_BASE_URL at your earliest convinience:
//
//AUDIT_LINES""" //note that this can be a multiline message
//Text to use per researcher to audit.
//FULLNAME, USERNAME, COUNT and LAST_AUDIT_DATE will be replaced with appropriate text.
// researcherLine = "FULLNAME (USERNAME) has run COUNT queries since LAST_AUDIT_DATE."
}
// database {
// dataSourceFrom = "JNDI" //Can be JNDI or testDataSource . Use testDataSource for tests, JNDI everywhere else
// jndiDataSourceName = "java:comp/env/jdbc/stewardDB" //or leave out for tests
// slickProfileClassName = "slick.driver.MySQLDriver$" // Can be
// slick.driver.H2Driver$
// slick.driver.MySQLDriver$
// slick.driver.PostgresDriver$
// slick.driver.SQLServerDriver$
// slick.driver.JdbcDriver$
// freeslick.OracleProfile$
// freeslick.MSSQLServerProfile$
//
// (Yes, with the $ on the end)
// For testing without JNDI
// testDataSource {
//typical test settings for unit tests
//driverClassName = "org.h2.Driver"
//url = "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1" //H2 embedded in-memory for unit tests
//url = "jdbc:h2:~/stewardTest.h2" //H2 embedded on disk at ~/test
// }
// createTablesOnStart = false // true for testing with H2 in memory, when not running unit tests. Set to false normally
// }
// gruntWatch = false //false for production, true for mvn tomcat7:run . Allows the client javascript and html files to be loaded via gruntWatch .
}
email {
//add javax mail properties from https://www.tutorialspoint.com/javamail_api/javamail_api_smtp_servers.htm here
// javaxmail {
// mail {
// smtp {
//for postfix on localhost
// host = localhost
// port = 25
//for AWS SES - See http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-using-smtp-java.html
// host = email-smtp.us-east-1.amazonaws.com
// port = 25
// transport.protocol = smtps
// auth = true
// starttls.enable = true
// starttls.required = true
// }
// }
// }
//Must be set for AWS SES. See http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-using-smtp-java.html
// authenticator {
// username = yourUsername
// password = yourPassword
// }
}
}
//Default settings for akka
//akka {
// loglevel = INFO
// log-config-on-start = on
// loggers = ["akka.event.slf4j.Slf4jLogger"]
// Toggles whether the threads created by this ActorSystem should be daemons or not. Use daemonic inside of tomcat to support shutdown
// daemonic = on
//}
//You'll see these settings for spray, baked into the .war files.
//spray.servlet {
// boot-class = "net.shrine.dashboard.net.shrine.metadata.Boot" //Don't change this one. It'll start the wrong (or no) application if you change it.
// request-timeout = 30s
//}
diff --git a/integration/pom.xml b/integration/pom.xml
index 01286cf99..809eb536f 100644
--- a/integration/pom.xml
+++ b/integration/pom.xml
@@ -1,127 +1,127 @@
4.0.0SHRINE Integration Testsshrine-integration-testsnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOTsrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-pluginnet.shrineshrine-crypto${project.version}net.shrineshrine-crypto${project.version}test-jartestnet.shrineshrine-test-commons${project.version}test-jartestnet.shrineshrine-data-commons${project.version}test-jartestnet.shrineshrine-protocol${project.version}testnet.shrineshrine-adapter-service${project.version}testnet.shrineshrine-adapter-service${project.version}test-jartestnet.shrineshrine-adapter-client-api${project.version}testnet.shrineshrine-broadcaster-aggregator${project.version}testnet.shrineshrine-qep${project.version}testnet.shrineshrine-broadcaster-service${project.version}testcom.h2databaseh2testorg.slf4jslf4j-log4j12testorg.springframeworkspring-jdbctestcom.sun.jersey.jersey-test-frameworkjersey-test-framework-http${jersey-version}testcom.sun.jersey.contribsjersey-simple-server${jersey-version}testcom.typesafe.slickslick-hikaricp_2.11${slick-version}test
diff --git a/pom.xml b/pom.xml
index 7118f9b42..51cd70a80 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,387 +1,387 @@
4.0.0SHRINEnet.shrineshrine-basepom
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOTUTF-84.2.5.RELEASE2.6.22.11.82.114.121.7.181.2.171.192.2.63.2.20.9.6-RC41.2.11.4.1913.45.1.382.33.0.10.9.51.3.32.3.142.4.03.3.03.1.13.1.1.11.55apps/meta-appapps/meta-warapps/dashboard-appapps/dashboard-warapps/steward-appapps/steward-warapps/proxyapps/shrine-appapps/warqep/servicehub/broadcaster-aggregatorhub/broadcaster-serviceadapter/adapter-apiadapter/adapter-servicehms-supporttoolscommons/utilcommons/emailcommons/authcommons/protocol-querycommons/data-commonscommons/protocolcommons/cryptocommons/clientcommons/configcommons/ont-supportcommons/test-commonsinstallintegrationshrine-webclientnet.alchim31.mavenscala-maven-plugin${scala-maven-plugin-version}compilecompilecompiletest-compiletestCompiletest-compileprocess-resourcescompileincrementaltrue-XX:+AggressiveOpts-XX:CompileThreshold=500-XX:+UseFastAccessorMethods-XX:+UseStringCache-XX:+OptimizeStringConcat-XX:+TieredCompilation-XX:+UseConcMarkSweepGC-XX:+DoEscapeAnalysis-server-Xms64m-Xmx1024m-XX:MaxPermSize=384m${scala-version}-Xcheckinit-unchecked-deprecation-Xlint:adapted-args,inaccessible,infer-any,missing-interpolator,private-shadow,type-parameter-shadow,unsound-match7maven-compiler-plugin7org.codehaus.mojobuildnumber-maven-plugin1.1org.apache.maven.pluginsmaven-jar-plugin2.4org.apache.maven.pluginsmaven-war-plugin2.1.1org.codehaus.mojobuildnumber-maven-pluginvalidatecreate{0,date,yyyy-MM-dd HH:mm:ss}(not available)org.apache.maven.pluginsmaven-jar-plugintrue${buildNumber}${scmBranch}${timestamp}org.apache.maven.pluginsmaven-war-plugintrue${buildNumber}${scmBranch}${timestamp}org.apache.tomcat.maventomcat7-maven-plugin2.2truetruetruetruehttp://shrine-dev1.catalyst:6060/shrine/rest/happyscm:git:https://open.med.harvard.edu/stash/scm/shrine/shrine.gitCBMI-Nexushttps://repo.open.med.harvard.edu/nexus/content/groups/public/com.typesafeconfig${typesafe-config-version}log4jlog4j${log4j-version}org.springframeworkspring-jdbc${spring.version}testcom.h2databaseh2${h2-version}testorg.easymockeasymock${easymock-version}testorg.slf4jslf4j-log4j12${slf4j-version}testmysqlmysql-connector-java${mysql-version}net.sf.opencsvopencsv${opencsv-version}net.liftweblift-json_${scala-major-version}${lift-version}com.sun.jerseyjersey-server${jersey-version}com.sun.jerseyjersey-servlet${jersey-version}com.sun.jerseyjersey-client${jersey-version}org.squerylsqueryl_${scala-major-version}${squeryl-version}javax.servletjavax.servlet-api${servlet-api-version}providedorg.bouncycastlebcpkix-jdk15on${bouncy-castle-version}org.scala-langscala-library${scala-version}junitjunit${junit-version}testorg.scalatestscalatest_${scala-major-version}${scalatest-version}testorg.scala-langscala-actorsorg.scala-langscala-reflectorg.scala-langscala-actors${scala-version}testorg.scala-langscala-reflect${scala-version}nexusNexus Repohttps://repo.open.med.harvard.edu/nexus/content/repositories/snapshotsfalsenexusNexus Repohttps://repo.open.med.harvard.edu/nexus/content/repositories/releases-internal
diff --git a/qep/service/pom.xml b/qep/service/pom.xml
index e22b7fc22..1470b610c 100644
--- a/qep/service/pom.xml
+++ b/qep/service/pom.xml
@@ -1,218 +1,218 @@
4.0.0SHRINE Serviceshrine-qepjarnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT../../pom.xmlsrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-pluginfalseorg.squerylsqueryl_${scala-major-version}org.scala-langscalaporg.scala-langscalap${scala-version}com.sun.jerseyjersey-servercom.sun.jerseyjersey-clientnet.shrineshrine-auth${project.version}net.shrineshrine-broadcaster-aggregator${project.version}net.shrineshrine-crypto${project.version}net.shrineshrine-client${project.version}net.shrineshrine-adapter-client-api${project.version}net.shrineshrine-protocol${project.version}net.shrineshrine-data-commons${project.version}net.shrineshrine-hms-core${project.version}com.typesafe.slickslick_2.11${slick-version}org.suecarterfreeslick_2.11${freeslick-version}org.slf4jslf4j-log4j12${slf4j-version}mysqlmysql-connector-javalog4jlog4jcom.sun.jersey.jersey-test-frameworkjersey-test-framework-http${jersey-version}testcom.sun.jersey.contribsjersey-simple-server${jersey-version}testcom.h2databaseh2testorg.easymockeasymocktestorg.springframeworkspring-jdbctestnet.shrineshrine-test-commons${project.version}test-jartestnet.shrineshrine-data-commons${project.version}test-jartestnet.shrineshrine-config${project.version}test-jartestnet.shrineshrine-util${project.version}test-jartestorg.codehaus.mojofindbugs-maven-plugin2.3.1Maxorg.codehaus.mojocobertura-maven-plugin2.3org.apache.maven.pluginsmaven-checkstyle-plugin2.5org.apache.maven.pluginsmaven-pmd-plugin2.41.6
diff --git a/shrine-webclient/pom.xml b/shrine-webclient/pom.xml
index a74833b9c..564ff790a 100644
--- a/shrine-webclient/pom.xml
+++ b/shrine-webclient/pom.xml
@@ -1,41 +1,41 @@
4.0.0SHRINE Web Clientshrine-webclientpomnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT1.52.4maven-assembly-plugin${assembly-plugin-version}assemblypackagesinglesrc/main/assembly/assembly.xml
diff --git a/tools/adapter-queries-to-qep/pom.xml b/tools/adapter-queries-to-qep/pom.xml
index c9454baa2..1a1075081 100644
--- a/tools/adapter-queries-to-qep/pom.xml
+++ b/tools/adapter-queries-to-qep/pom.xml
@@ -1,57 +1,57 @@
4.0.0SHRINE Copy Adapter Queries to QEPadapter-queries-to-qepjarnet.shrineshrine-tools
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOTnet.shrineshrine-data-commons${project.version}com.typesafeconfignet.shrineshrine-adapter-service${project.version}net.shrineshrine-qep${project.version}org.slf4jslf4j-log4j12${slf4j-version}runtimesrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-pluginmaven-assembly-pluginadapter-queries-to-qep-${project.version}false
diff --git a/tools/batch-querier/pom.xml b/tools/batch-querier/pom.xml
index ec8baadff..68ac52303 100644
--- a/tools/batch-querier/pom.xml
+++ b/tools/batch-querier/pom.xml
@@ -1,86 +1,86 @@
4.0.0SHRINE Query Automation Utilityshrine-batch-querier-utilityjarnet.shrineshrine-tools
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOTnet.shrineshrine-crypto${project.version}net.shrineshrine-client${project.version}net.shrineshrine-utility-commons${project.version}net.shrineshrine-utility-commons${project.version}test-jartestnet.shrineshrine-test-commons${project.version}test-jartestorg.rogachscallop_${scala-major-version}${scallop-version}net.sf.opencsvopencsvcom.typesafeconfigsrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-pluginmaven-assembly-pluginshrine-batch-querier-${project.version}false
diff --git a/tools/mapping-automation/pom.xml b/tools/mapping-automation/pom.xml
index c34e56976..ca687421b 100644
--- a/tools/mapping-automation/pom.xml
+++ b/tools/mapping-automation/pom.xml
@@ -1,85 +1,85 @@
4.0.0SHRINE Term Mapping Automation Utilitiesshrine-mapping-automationjarnet.shrineshrine-tools
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOTnet.shrineshrine-test-commons${project.version}test-jartestnet.shrineshrine-config${project.version}net.shrineshrine-ont-support${project.version}net.shrineshrine-utility-commons${project.version}net.shrineshrine-utility-commons${project.version}test-jartestorg.rogachscallop_${scala-major-version}${scallop-version}net.sf.opencsvopencsvcom.typesafeconfigsrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-pluginmaven-assembly-pluginshrine-mapping-tools-${project.version}false
diff --git a/tools/monitor/pom.xml b/tools/monitor/pom.xml
index 9ff151334..01a526ffd 100644
--- a/tools/monitor/pom.xml
+++ b/tools/monitor/pom.xml
@@ -1,90 +1,90 @@
4.0.0SHRINE Monitor Utilitiesshrine-monitor-utilitiesjarnet.shrineshrine-tools
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOTantant-javamail1.6.5net.shrineshrine-broadcaster-aggregator${project.version}net.shrineshrine-config${project.version}org.codehaus.groovy.modules.http-builderhttp-builder0.5.1org.codehaus.groovygroovyorg.codehaus.gmaven.runtimegmaven-runtime-1.71.3mysqlmysql-connector-javacom.h2databaseh2testnet.sf.opencsvopencsvorg.apache.commonscommons-email1.2org.codehaus.gmavengmaven-pluginmaven-assembly-pluginshrine-monitor-${project.version}.zipfalse
diff --git a/tools/pom.xml b/tools/pom.xml
index add15ab6c..b0c06b8a9 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -1,80 +1,80 @@
4.0.0SHRINE Toolsshrine-toolspomnet.shrineshrine-base
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOT1.52.4monitorutility-commonsscannerbatch-querieradapter-queries-to-qepmapping-automationnet.shrineshrine-protocol${project.version}org.codehaus.gmavengmaven-plugin${gmaven-plugin-version}compiletestCompiletruetruetruemaven-assembly-plugin${assembly-plugin-version}assemblypackagesinglesrc/main/assembly/assembly.xml
diff --git a/tools/scanner/pom.xml b/tools/scanner/pom.xml
index 514ad549a..dbb8491d3 100644
--- a/tools/scanner/pom.xml
+++ b/tools/scanner/pom.xml
@@ -1,103 +1,103 @@
4.0.0SHRINE Scanner Utilityshrine-scanner-utilityjarnet.shrineshrine-tools
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOTnet.shrineshrine-test-commons${project.version}test-jartestnet.shrineshrine-ont-support${project.version}net.shrineshrine-hms-core${project.version}net.shrineshrine-config${project.version}net.shrineshrine-crypto${project.version}net.shrineshrine-utility-commons${project.version}net.shrineshrine-utility-commons${project.version}test-jartestorg.rogachscallop_${scala-major-version}${scallop-version}net.sf.opencsvopencsvcom.typesafeconfignet.shrineshrine-broadcaster-aggregator${project.version}src/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-pluginmaven-assembly-pluginshrine-scanner-${project.version}false
diff --git a/tools/utility-commons/pom.xml b/tools/utility-commons/pom.xml
index 9ae5193a0..fe8b5ffe1 100644
--- a/tools/utility-commons/pom.xml
+++ b/tools/utility-commons/pom.xml
@@ -1,64 +1,64 @@
4.0.0SHRINE Common Classes for Utilitiesshrine-utility-commonsjarnet.shrineshrine-tools
- 1.22.2.1-SNAPSHOT
+ 1.23.1.0-SNAPSHOTnet.shrineshrine-test-commons${project.version}test-jartestorg.rogachscallop_${scala-major-version}${scallop-version}net.sf.opencsvopencsvcom.typesafeconfigsrc/main/scalasrc/test/scalanet.alchim31.mavenscala-maven-pluginorg.apache.maven.pluginsmaven-jar-plugintest-jar