From e1fc799e30d65c7066dadf219c9b61b9253fb593 Mon Sep 17 00:00:00 2001 From: ebremer Date: Thu, 22 Aug 2019 14:16:15 -0400 Subject: [PATCH 1/7] adjust defaults --- config/pathdbmysql.cnf | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 config/pathdbmysql.cnf diff --git a/config/pathdbmysql.cnf b/config/pathdbmysql.cnf new file mode 100644 index 00000000..f86607c5 --- /dev/null +++ b/config/pathdbmysql.cnf @@ -0,0 +1,33 @@ +[mysqld] +datadir=/data/pathdb/mysql +user=mysql +skip-name-resolve +symbolic-links=0 +max_connections = 150 +max_user_connections = 150 +key_buffer = 36M +myisam_sort_buffer_size = 64M +join_buffer_size = 2M +read_buffer_size = 2M +sort_buffer_size = 3M +table_cache = 1024 +thread_cache_size = 286 +interactive_timeout = 25 +wait_timeout = 1800 +connect_timeout = 10 +max_allowed_packet = 16M +max_connect_errors = 1000 +query_cache_limit = 1M +query_cache_size = 0 +query_cache_type = 0 +tmp_table_size = 16M + +innodb-flush-log-at-trx-commit=2 +innodb_file_per_table=ON +innodb_buffer_pool_size = 4G +innodb_log_file_size=512M +innodb_stats_on_metadata=0 +innodb_buffer_pool_instances=4 + +[mysqld_safe] + From 43a5ff077f04051a003d75a19f1d2ff91b9915ec Mon Sep 17 00:00:00 2001 From: ebremer Date: Thu, 22 Aug 2019 14:21:40 -0400 Subject: [PATCH 2/7] moved default file to PathDB repo --- config/pathdbmysql.cnf | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 config/pathdbmysql.cnf diff --git a/config/pathdbmysql.cnf b/config/pathdbmysql.cnf deleted file mode 100644 index f86607c5..00000000 --- a/config/pathdbmysql.cnf +++ /dev/null @@ -1,33 +0,0 @@ -[mysqld] -datadir=/data/pathdb/mysql -user=mysql -skip-name-resolve -symbolic-links=0 -max_connections = 150 -max_user_connections = 150 -key_buffer = 36M -myisam_sort_buffer_size = 64M -join_buffer_size = 2M -read_buffer_size = 2M -sort_buffer_size = 3M -table_cache = 1024 -thread_cache_size = 286 -interactive_timeout = 25 -wait_timeout = 1800 -connect_timeout = 10 -max_allowed_packet = 16M -max_connect_errors = 1000 -query_cache_limit = 1M -query_cache_size = 0 -query_cache_type = 0 -tmp_table_size = 16M - -innodb-flush-log-at-trx-commit=2 -innodb_file_per_table=ON -innodb_buffer_pool_size = 4G -innodb_log_file_size=512M -innodb_stats_on_metadata=0 -innodb_buffer_pool_instances=4 - -[mysqld_safe] - From 30c02d9ea5ce71cdeff56a96610bc04ae7f1e4d0 Mon Sep 17 00:00:00 2001 From: Ryan Birmingham Date: Fri, 23 Aug 2019 11:11:20 -0400 Subject: [PATCH 3/7] keys passed through auth service --- Deps/auth_service/.gitignore | 1 + Deps/auth_service/app.js | 4 +++- config/routes.json | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 Deps/auth_service/.gitignore diff --git a/Deps/auth_service/.gitignore b/Deps/auth_service/.gitignore new file mode 100644 index 00000000..c2658d7d --- /dev/null +++ b/Deps/auth_service/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/Deps/auth_service/app.js b/Deps/auth_service/app.js index 6df279ac..ea28b12b 100644 --- a/Deps/auth_service/app.js +++ b/Deps/auth_service/app.js @@ -12,6 +12,7 @@ var BASE_USER_URL = "http://ca-data:9099/services/caMicroscope/Authorization/que var SECRET = process.env.SECRET var EXPIRY = process.env.EXPIRY || "1d" var JWK_URL = process.env.JWKS +var KEY_FIELD = process.env.KEY_FIELD || "accessCollection" var jwks_client = false console.log(JWK_URL) @@ -127,8 +128,9 @@ function token_trade(check_key, sign_key){ data = { 'sub':name, 'name':x[0].name, - 'attrs':attrs + 'attrs':attrs, } + data[KEY_FIELD] = x[0][KEY_FIELD] || [] // sign using the mounted key var token = jwt.sign(data, sign_key, {algorithm:"RS256", expiresIn: EXPIRY}) res.send({'token':token}) diff --git a/config/routes.json b/config/routes.json index becf5acf..6c3cd4d8 100644 --- a/config/routes.json +++ b/config/routes.json @@ -2,7 +2,8 @@ "root":"http://ca-front:80/", "_root_public": "true", "auth":{ - "permissions_field":"attrs" + "permissions_field":"attrs", + "key_field": "accessCollection" }, "services":{ "data":{ @@ -33,7 +34,7 @@ }, "Slide": { "get":"/Slide/query/get", - "find":"/Slide/query/find", + "find":{"path":"/Slide/query/find", "key_method": "filter"}, "post":{"path": "/Slide/submit/json", "attr": "write"}, "delete":{"path": "/Slide/delete/deleteSlide", "attr": "write"}, "update":{"path": "/Slide/delete/updateSlide", "attr": "write"} From 49d9c5b06a541575171dd3e19b8e3c1caaab9c3a Mon Sep 17 00:00:00 2001 From: Joseph Balsamo Date: Tue, 27 Aug 2019 12:45:01 -0400 Subject: [PATCH 4/7] Added newest tagged version of Heatmap uploader --- quip-pathdb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quip-pathdb.yml b/quip-pathdb.yml index 19e551e3..1f19ad7d 100644 --- a/quip-pathdb.yml +++ b/quip-pathdb.yml @@ -80,7 +80,7 @@ services: volumes: - ./data/segmentation_results:/data/segmentation_results heatmaploader: - build: "https://github.com/SBU-BMI/uploadHeatmaps.git#v1.0.0" + build: "https://github.com/SBU-BMI/uploadHeatmaps.git#v1.5.0" container_name: quip-hmloader ports: ["27017:27017"] volumes: From f334d7a9c6b9c74add9ba538f115e95a87d0c54b Mon Sep 17 00:00:00 2001 From: Ryan Birmingham Date: Tue, 27 Aug 2019 12:56:00 -0400 Subject: [PATCH 5/7] update sec module --- quip-pathdb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quip-pathdb.yml b/quip-pathdb.yml index 1f19ad7d..4efb4a4e 100644 --- a/quip-pathdb.yml +++ b/quip-pathdb.yml @@ -39,7 +39,7 @@ services: volumes: - ./images/:/data/images/ security: - build: "https://github.com/camicroscope/Security.git#v3.2.2" + build: "https://github.com/camicroscope/Security.git#v3.4.6" container_name: ca-security restart: unless-stopped ports: ["4010:4010"] From c27414ba8130e86bd7f1a29658e19fddbd0a0179 Mon Sep 17 00:00:00 2001 From: Ryan Birmingham Date: Tue, 27 Aug 2019 12:56:17 -0400 Subject: [PATCH 6/7] update sec module --- caMicroscope.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caMicroscope.yml b/caMicroscope.yml index 538b5413..f3a84062 100644 --- a/caMicroscope.yml +++ b/caMicroscope.yml @@ -56,7 +56,7 @@ services: volumes: - ./images/:/images/ security: - build: "https://github.com/camicroscope/Security.git#v3.2.2" + build: "https://github.com/camicroscope/Security.git#v3.4.6" container_name: ca-security restart: unless-stopped ports: From 6a258f313d36da1754a7113081ad8660a4b17fb6 Mon Sep 17 00:00:00 2001 From: Ryan Birmingham Date: Tue, 27 Aug 2019 13:07:57 -0400 Subject: [PATCH 7/7] add login warning and redir --- config/login.html | 2 ++ login.html | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/login.html b/config/login.html index 2a326822..c5e20100 100644 --- a/config/login.html +++ b/config/login.html @@ -62,6 +62,8 @@

Redirecting...

window.location = state } else { console.error("please give me a better failure message/response") + window.alert("User not added") + window.location = "./apps/signup/signup" } }) diff --git a/login.html b/login.html index ffd51600..46c764bf 100644 --- a/login.html +++ b/login.html @@ -64,7 +64,8 @@ document.cookie = cookie_name + "=" + x.token; window.location = state } else { - window.alert("no!") + window.alert("User not added") + window.location = "./apps/signup/signup" } })