Skip to content

Commit

Permalink
Merging for 03-28 Releases (#133)
Browse files Browse the repository at this point in the history
* Als 5514 (#124)

* ALS-5427: Updating Introspection token (#117)
* token needs to be updated if persistent.
* need to update the DML persisting via snapshot script to include upserting updated tokens.
* should upsert in pic-sure-schema.sql as well to get ready to remove DML from DDL.
* both the resources-registration.sql and pic-sure-schema.sql will be eliminated by using proper migration scripts.

---------

Co-authored-by: Tom <[email protected]>

* Add XSS protection in httpd-vhosts config (#119)
The httpd-vhosts.conf configuration file now includes an option for built-in XSS protection supported by modern web browsers. It is set to block the entire page if a Cross-Site Scripting (XSS) attack is detected. This header already exists in our frontend harness and previously existed in the UI vhost files.

* Update gss_prefix in infrastructure instances (#120)
This commit modifies the gss_prefix in multiple Terraform instances to include a new variable, environment_prefix. It also adds this new variable in the variables.tf file for infrastructure app. This change provides more flexibility and control over the configuration of infrastructure instances.

* [ALS-5567] Modify infrastructure to make  a configurable value (#121)
* [ALS-5567] Parameterize help link in app configuration
* [ALS-5567] Add login link variable to app configuration

* [ALS-5514] Add Okta configuration to infrastructure
The Okta client API and domain configurations have been added. These are used for session management, improving secure access control to the application. The respective fields have been included in wildfly-instance.tf, standalone.xml, and variables.tf files.

* [ALS-5514] Correct Okta variable in wildfly-instance.tf
An incorrect Okta variable name was identified and replaced as necessary. The okta_domain has been properly replaced with okta_client_origin for proper Okta configuration management.

* [ALS-5558] Add privacyPolicyLink (#122)
* [ALS-5514] Adjust indentations in standalone.xml
* [ALS-5514] Migrating changes from GitLab

Co-authored-by: TDeSain <[email protected]>
Co-authored-by: Tom <[email protected]>
Co-authored-by: James <[email protected]>

* [ALS-5082] Persist database: Flyway (#126)

* [ALS-5082] Remove unused code

This code is tracked by version control and I would prefer not to have dead code within the codebase.

* [ALS-5082] Update MySQL connector version in Wildfly module config

The MySQL connector version in the Wildfly configuration file has been updated from 5.1.38 to 8.0.33. This is necessary for keeping with the latest stable version for improved performance and security.

* [ALS-5082] Add initial roles, privileges, resources, and create initial tables for database

The commit includes SQL scripts to insert initial roles and privileges in the 'auth' database and to create the initial tables required for 'picsure' and 'auth' databases. Additionally, the commit inserts resources into the 'picsure' database. These updates initialize the foundational data structures needed for the application's function.

* Refactor DNS records management in terraform

Removed deprecated comments, unused code and the reliance on Jenkins and AWS CLI for managing route53 DNS records in the route53-template.tf file. The refactoring now utilizes Terraform natively, directly handling AWS Route53 changes and improving code clarity.

* [ALS-5082] Update Terraform configuration and application to use persisted database, remove unnecessary vars, use DB username/host/password vars, add resource IDs and optimize AWS instance size and volume. This change allows us to have a persistent database for our application, which retains data across sessions and improves the overall performance and cost-effectiveness of the AWS instance. Various unnecessary variables have been obliterated, further streamlining the configuration process.

* [ALS-5082] Remove resource-registration.sql

* Add health check rule to httpd-vhosts.conf

A new RewriteRule has been added to the httpd-vhosts.conf configurations. The rule matches any request to /picsureui/health and returns a 200 OK status. This update will help monitor the health status of the PicsureUI application.

* [ALS-5387] Replace variables with hardcoded IDs in configs (#130)

* Replace variables with hardcoded IDs in configs

The `auth_hpds_resource_id` and `dictionary_resource_id` variables in application configurations have been removed and replaced with hardcoded values. This change affected several files including `wildfly-instance.tf` and `picsureui_settings.json`. This modification simplifies configuration and minimizes the risk of misconfiguration errors.

* Update resource insertions in V2__Insert_Resources.sql

The diff reflects changes made to the resource insertion queries in `V2__Insert_Resources.sql` file. Some names have been replaced with hardcoded values, and a few parameters, such as 'include_open_hpds' and 'include_auth_hpds', have been added to aid better flexibility and consistency in resource management.

* Add private DNS name variable to wildfly-instance.tf

A new variable 'env_private_dns_name' from environment variables has been included in the wildfly-instance.tf file. Furthermore, this variable has been incorporated in the JAVA_OPTS of the wildfly-user_data.sh script to use the target stack and private DNS dynamically. This inclusion enhances the adaptability of the script in various execution environments.

* Update IDP provider URI value in standalone.xml (#131)

Remove additional "/" all strings that are appended to the idp_provider_uri
start with a "/".

* Update configuration in picsureui_settings.json (#132)

Added "include_bdc_specific_filters" field to configuration. This field enables filters specific to the Big Data Commons(BDC) infrastructure to be included when set to true.

---------

Co-authored-by: TDeSain <[email protected]>
Co-authored-by: Tom <[email protected]>
Co-authored-by: James <[email protected]>
Co-authored-by: Ryan Amari <[email protected]>
  • Loading branch information
5 people authored Mar 26, 2024
1 parent 04889ed commit ea733ca
Show file tree
Hide file tree
Showing 25 changed files with 889 additions and 401 deletions.
41 changes: 0 additions & 41 deletions app-infrastructure/aurora-rds.tf

This file was deleted.

File renamed without changes.
6 changes: 6 additions & 0 deletions app-infrastructure/configs/httpd-vhosts.conf
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ ServerTokens Prod
RewriteCond %%{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]

# Match the request to /health and return a 200 OK status
RewriteRule ^/picsureui/health$ - [R=200,L]

RewriteRule ^/picsure/(.*)$ "http://wildfly.${target_stack}.${env_private_dns_name}:8080/pic-sure-api-2/PICSURE/$1" [P]
RewriteRule ^/psama/(.*)$ "http://wildfly.${target_stack}.${env_private_dns_name}:8080/pic-sure-auth-services/auth/$1" [P]

Expand Down Expand Up @@ -160,6 +163,9 @@ ServerTokens Prod
RewriteCond %%{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]

# Match the request to /health and return a 200 OK status
RewriteRule ^/picsureui/health$ - [R=200,L]

RewriteRule ^/picsure/(.*)$ "http://wildfly.${target_stack}.${env_private_dns_name}:8080/pic-sure-api-2/PICSURE/$1" [P]
RewriteRule ^/psama/(.*)$ "http://wildfly.${target_stack}.${env_private_dns_name}:8080/pic-sure-auth-services/auth/$1" [P]

Expand Down
212 changes: 107 additions & 105 deletions app-infrastructure/configs/picsureui_settings.json
Original file line number Diff line number Diff line change
@@ -1,107 +1,109 @@
{
"resources": [
{
"id": "datastage",
"name": "datastage",
"basePath": "/picsure",
"findPath": "/PIC-SURE/search"
}
],
"queryExportType": "EXPORT_ASYNC",
"picSureResourceId": "02e23f52-f354-4e8b-992c-d37c8b9ba140",
"openAccessResourceId": "70c837be-5ffc-11eb-ae93-0242ac130002",
"visualizationResourceId": "ca0ad4a9-130a-3a8a-ae00-e35b07f1108b",
"applicationIdForBaseQuery": "${application_id_for_base_query}",
"helpLink": "${help_link}",
"loginLink": "${login_link}",
"pdfLink": "${pdf_link}",
"videoLink": "https://www.youtube.com/playlist?list=PLJ6YccH8TEufZ5L-ctxzFF7vuZRLVacKw\" aria-label='Video Demonstration, this link will open a new browser tab' target='_blank'",
"jupyterExampleLink": "https://github.com/hms-dbmi/Access-to-Data-using-PIC-SURE-API/tree/master/NHLBI_BioData_Catalyst\" aria-label='Jupyter Example Notebooks, this link will open a new browser tab' target='_blank'",
"documentationLink": "https://bdcatalyst.gitbook.io/biodata-catalyst-documentation/written-documentation/getting-started/explore-available-data/pic-sure-for-biodata-catalyst-user-guide\" aria-label='BioData Catalyst Documentation, this link will open a new browser tab' target='_blank'",
"privacyPolicyLink": "https://biodatacatalyst.nhlbi.nih.gov/privacy/",
"advancedSearchLink": "/transmart/login/callback_processor",
"logoPath": "/static/images/logo.png",
"harmonizedPath": "\\DCC Harmonized data set",
"harmonizedConsentPath": "\\_harmonized_consent\\",
"topmedConsentPath": "\\_topmed_consents\\",
"consentsPath": "\\_consents",
"categoryAliases": {
"dcc harmonized data set": "DCC Harmonized data set",
"phs000956": "AMISH",
"phs000280": "ARIC",
"phs001211": "ARIC",
"phs001143": "BAGS",
"phs000820": "CCAF",
"phs001189": "CCAF",
"phs000284": "CFS",
"phs000954": "CFS",
"phs000287": "CHS",
"phs001368": "CHS",
"phs000179": "COPDGENE",
"phs000951": "COPDGENE",
"phs000988": "CRA",
"phs001412": "DHS",
"phs000946": "EOCOPD",
"phs000007": "FHS",
"phs000974": "FHS",
"phs001180": "GALAII",
"phs000920": "GALAII",
"phs001074": "GENESTAR",
"phs001218": "GENESTAR",
"phs001238": "GENOA",
"phs001345": "GENOA",
"phs000784": "GENSALT",
"phs001217": "GENSALT",
"phs001359": "GOLDN",
"phs001013": "HVH",
"phs000993": "HVH",
"phs001293": "HYPERGEN",
"phs000286": "JHS",
"phs000964": "JHS",
"phs001402": "MAYOVTE",
"phs000209": "MESA",
"phs001416": "MESA",
"phs001001": "MGHAF",
"phs001062": "MGHAF",
"phs002299": "ORCHID",
"phs001024": "PARTNERS",
"phs001215": "SAFHS",
"phs000921": "SAGE",
"phs001207": "SARCOIDOSIS",
"phs000422": "SARP",
"phs000972": "SAS",
"phs000914": "SAS",
"phs001387": "THRV",
"phs000997": "VAFAR",
"phs001032": "VUAF",
"phs001040": "WGHS",
"phs000200": "WHI",
"phs001237": "WHI",
"phs002385": "HCT_for_SCD",
"phs000810": "HCHS_SOL",
"phs001252": "ECLIPSE",
"phs001194": "PCGC",
"phs000703": "CATHGEN",
"phs000285": "CARDIA",
"phs002363": "RED_CORAL",
"phs002362": "CSSCD",
"phs002386": "STOP-II",
"phs002383": "Walk-PHaSST",
"phs002348": "MSH"
},
"categorySearchResultList": [
"DCC_Harmonized_data_set",
"Coronary_Artery_Risk_Development_in_Young_Adults_CARDIA",
"Framingham_Cohort",
"Genetic_Epidemiology_of_COPD_COPDGene_",
"Multi_Ethnic_Study_of_Atherosclerosis_MESA_Cohort",
"The_Jackson_Heart_Study_JHS_",
"_Consents"
],
"idp_provider": "${idp_provider}",
"idp_provider_uri": "${idp_provider_uri}",
"fence_client_id": "${fence_client_id}",
"analyticsId": "${analytics_id}",
"tagManagerId": "${tag_manager_id}",
"client_id": "${client_id}"
}
{
"id": "datastage",
"name": "datastage",
"basePath": "/picsure",
"findPath": "/PIC-SURE/search"
}
],
"queryExportType": "EXPORT_ASYNC",
"picSureResourceId": "02e23f52-f354-4e8b-992c-d37c8b9ba140",
"openAccessResourceId": "70c837be-5ffc-11eb-ae93-0242ac130002",
"visualizationResourceId": "ca0ad4a9-130a-3a8a-ae00-e35b07f1108b",
"dictionaryResourceId": "36363664-6231-6134-2d38-6538652d3131",
"applicationIdForBaseQuery": "${application_id_for_base_query}",
"helpLink": "${help_link}",
"loginLink": "${login_link}",
"pdfLink": "${pdf_link}",
"videoLink": "https://www.youtube.com/playlist?list=PLJ6YccH8TEufZ5L-ctxzFF7vuZRLVacKw\" aria-label='Video Demonstration, this link will open a new browser tab' target='_blank'",
"jupyterExampleLink": "https://github.com/hms-dbmi/Access-to-Data-using-PIC-SURE-API/tree/master/NHLBI_BioData_Catalyst\" aria-label='Jupyter Example Notebooks, this link will open a new browser tab' target='_blank'",
"documentationLink": "https://bdcatalyst.gitbook.io/biodata-catalyst-documentation/written-documentation/getting-started/explore-available-data/pic-sure-for-biodata-catalyst-user-guide\" aria-label='BioData Catalyst Documentation, this link will open a new browser tab' target='_blank'",
"privacyPolicyLink": "https://biodatacatalyst.nhlbi.nih.gov/privacy/",
"advancedSearchLink": "/transmart/login/callback_processor",
"logoPath": "/static/images/logo.png",
"harmonizedPath": "\\DCC Harmonized data set",
"harmonizedConsentPath": "\\_harmonized_consent\\",
"topmedConsentPath": "\\_topmed_consents\\",
"consentsPath": "\\_consents",
"categoryAliases": {
"dcc harmonized data set": "DCC Harmonized data set",
"phs000956": "AMISH",
"phs000280": "ARIC",
"phs001211": "ARIC",
"phs001143": "BAGS",
"phs000820": "CCAF",
"phs001189": "CCAF",
"phs000284": "CFS",
"phs000954": "CFS",
"phs000287": "CHS",
"phs001368": "CHS",
"phs000179": "COPDGENE",
"phs000951": "COPDGENE",
"phs000988": "CRA",
"phs001412": "DHS",
"phs000946": "EOCOPD",
"phs000007": "FHS",
"phs000974": "FHS",
"phs001180": "GALAII",
"phs000920": "GALAII",
"phs001074": "GENESTAR",
"phs001218": "GENESTAR",
"phs001238": "GENOA",
"phs001345": "GENOA",
"phs000784": "GENSALT",
"phs001217": "GENSALT",
"phs001359": "GOLDN",
"phs001013": "HVH",
"phs000993": "HVH",
"phs001293": "HYPERGEN",
"phs000286": "JHS",
"phs000964": "JHS",
"phs001402": "MAYOVTE",
"phs000209": "MESA",
"phs001416": "MESA",
"phs001001": "MGHAF",
"phs001062": "MGHAF",
"phs002299": "ORCHID",
"phs001024": "PARTNERS",
"phs001215": "SAFHS",
"phs000921": "SAGE",
"phs001207": "SARCOIDOSIS",
"phs000422": "SARP",
"phs000972": "SAS",
"phs000914": "SAS",
"phs001387": "THRV",
"phs000997": "VAFAR",
"phs001032": "VUAF",
"phs001040": "WGHS",
"phs000200": "WHI",
"phs001237": "WHI",
"phs002385": "HCT_for_SCD",
"phs000810": "HCHS_SOL",
"phs001252": "ECLIPSE",
"phs001194": "PCGC",
"phs000703": "CATHGEN",
"phs000285": "CARDIA",
"phs002363": "RED_CORAL",
"phs002362": "CSSCD",
"phs002386": "STOP-II",
"phs002383": "Walk-PHaSST",
"phs002348": "MSH"
},
"categorySearchResultList": [
"DCC_Harmonized_data_set",
"Coronary_Artery_Risk_Development_in_Young_Adults_CARDIA",
"Framingham_Cohort",
"Genetic_Epidemiology_of_COPD_COPDGene_",
"Multi_Ethnic_Study_of_Atherosclerosis_MESA_Cohort",
"The_Jackson_Heart_Study_JHS_",
"_Consents"
],
"idp_provider": "${idp_provider}",
"idp_provider_uri": "${idp_provider_uri}",
"fence_client_id": "${fence_client_id}",
"analyticsId": "${analytics_id}",
"tagManagerId": "${tag_manager_id}",
"client_id": "${client_id}",
"include_bdc_specific_filters": true
}
16 changes: 0 additions & 16 deletions app-infrastructure/configs/resources-registration.sql

This file was deleted.

12 changes: 6 additions & 6 deletions app-infrastructure/configs/standalone.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
</datasource>
<datasource jndi-name="java:jboss/datasources/AuthDS" pool-name="AuthDS" use-java-context="true">
<connection-url>
jdbc:mysql://picsure-db.${target_stack}.${env_private_dns_name}:3306/auth?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true&amp;autoReconnectForPools=true
jdbc:mysql://${picsure-db-host}/auth?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true&amp;autoReconnectForPools=true
</connection-url>
<driver>mysql</driver>
<pool>
Expand All @@ -173,7 +173,7 @@
<prefill>true</prefill>
</pool>
<security>
<user-name>root</user-name>
<user-name>${picsure-db-username}</user-name>
<password>${picsure-db-password}</password>
</security>
<validation>
Expand All @@ -188,7 +188,7 @@
</datasource>
<datasource jndi-name="java:jboss/datasources/PicsureDS" pool-name="PicsureDS" use-java-context="true">
<connection-url>
jdbc:mysql://picsure-db.${target_stack}.${env_private_dns_name}:3306/picsure?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true&amp;autoReconnectForPools=true
jdbc:mysql://${picsure-db-host}/picsure?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true&amp;autoReconnectForPools=true
</connection-url>
<driver>mysql</driver>
<pool>
Expand All @@ -197,7 +197,7 @@
<prefill>true</prefill>
</pool>
<security>
<user-name>root</user-name>
<user-name>${picsure-db-username}</user-name>
<password>${picsure-db-password}</password>
</security>
<validation>
Expand All @@ -212,7 +212,7 @@
</datasource>
<drivers>
<driver name="mysql" module="com.sql.mysql">
<driver-class>com.mysql.jdbc.Driver</driver-class>
<driver-class>com.mysql.cj.jdbc.Driver</driver-class>
</driver>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
Expand Down Expand Up @@ -517,7 +517,7 @@

<!-- Configure Identity Provider Parameters, with defaults-->
<simple name="java:global/idp_provider" value="${idp_provider}"/>
<simple name="java:global/idp_provider_uri" value="${idp_provider_uri}/"/>
<simple name="java:global/idp_provider_uri" value="${idp_provider_uri}"/>

<!-- Configure Fence Parameters, with defaults-->
<simple name="java:global/fence_client_id" value="${fence_client_id}"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
target.origin.id=http://localhost:8080/pic-sure-api-2/PICSURE/
visualization.resource.id=ca0ad4a9-130a-3a8a-ae00-e35b07f1108b
auth.hpds.resource.id=02e23f52-f354-4e8b-992c-d37c8b9ba140
open.hpds.resource.id=70c837be-5ffc-11eb-ae93-0242ac130002
auth.hpds.resource.id=02e23f52-f354-4e8b-992c-d37c8b9ba140
2 changes: 1 addition & 1 deletion app-infrastructure/configs/wildfly_mysql_module.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<module xmlns="urn:jboss:module:1.1" name="com.sql.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.38.jar"/>
<resource-root path="mysql-connector-j-8.0.33.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
Expand Down
Loading

0 comments on commit ea733ca

Please sign in to comment.