Skip to content

Commit

Permalink
Als 5514 (#124) (#125)
Browse files Browse the repository at this point in the history
* 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.

---------



* 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]>
  • Loading branch information
4 people authored Feb 13, 2024
1 parent 8f49e9e commit 8d473cf
Show file tree
Hide file tree
Showing 10 changed files with 333 additions and 207 deletions.
17 changes: 1 addition & 16 deletions app-infrastructure/configs/banner_config.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
{
"bannerConfiguration": [
{
"text": "Because of a lapse in government funding, the information on this website may not be up to date, transactions submitted via the website may not be processed, and the agency may not be able to respond to inquiries until appropriations are enacted. <br />The NIH Clinical Center (the research hospital of NIH) is open. For more details about its operating status, please visit <a href='https://urldefense.proofpoint.com/v2/url?u=http-3A__cc.nih.gov_&d=DwMF-g&c=WO-RGvefibhHBZq3fL85hQ&r=JrvHRNUaLM4JEXPBO7asJ6K88twMitD1WUK5OovbsHHtoJgrwK3owhHE-Qe_RQjE&m=i1X4Vqc_51lPo_Vgc-Tr6mtbqokt7q4j6wEtg9e4sWaoYz7riX2NwLQBhJKhpbr5&s=VlQRwDFt1QfEHKjjrud8hpr3fUx5SGtHk3ImbwgjGak&e=' target='_blank'>cc.nih.gov</a>. <br />Updates regarding government operating status and resumption of normal operations can be found at <a href='https://urldefense.proofpoint.com/v2/url?u=https-3A__www.opm.gov_&d=DwMF-g&c=WO-RGvefibhHBZq3fL85hQ&r=JrvHRNUaLM4JEXPBO7asJ6K88twMitD1WUK5OovbsHHtoJgrwK3owhHE-Qe_RQjE&m=i1X4Vqc_51lPo_Vgc-Tr6mtbqokt7q4j6wEtg9e4sWaoYz7riX2NwLQBhJKhpbr5&s=tpDX_bYTpgVCobViig4inj3nuyix1vi_6Qs5XGcUzCM&e=' target='_blank'>OPM.gov</a>.",
"startDate": "2023-09-29T00:00:00Z",
"endDate": "2024-09-29T00:00:00Z",
"styles": "background-color: #C0143C; color: #fff; font-size: 1.1em; padding: 10px;",
"isDismissible": false,
"disabled": true
},
{
"text": "Open PIC-SURE without login is now live! Users can search, query, and build cohorts using data in BDC, with no login required. Check out this new feature <a href='https://openpicsure.biodatacatalyst.nhlbi.nih.gov/picsureui/' target='_blank' style='color: #fff; text-decoration: underline;'>here</a>.<br />The “Open Access” tab will no longer be accessible from this site starting December 2023. Please use the <a href='http://openpicsure.biodatacatalyst.nhlbi.nih.gov/' target='_blank' style='color: #fff; text-decoration: underline;'>Open PIC-SURE site</a> to continue using the Open Access functionality.",
"startDate": "2023-11-01T00:00:00Z",
"endDate": "2024-12-23T00:00:00Z",
"styles": "background-color: #1a568c; color: #fff; font-size: 1.1em; padding: 10px;",
"isDismissible": true,
"disabled": false
}

]
}
42 changes: 41 additions & 1 deletion app-infrastructure/configs/pic-sure-schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ CREATE TABLE `connection` (

LOCK TABLES `connection` WRITE;
/*!40000 ALTER TABLE `connection` DISABLE KEYS */;
INSERT INTO `connection` VALUES (0xD8C456813239437C951D706D5E56CAB8,'FENCE','fence','fence|','[{\"label\":\"email\",\"id\":\"email\"}]');
INSERT INTO connection VALUES (0xD8C456813239437C951D706D5E56CAB8, '${connection_label}', '${connection_id}','${connection_sub_prefix}|','[{"label":"Email", "id":"email"}]');
/*!40000 ALTER TABLE `connection` ENABLE KEYS */;
UNLOCK TABLES;

Expand Down Expand Up @@ -673,3 +673,43 @@ SELECT privilege.uuid, unhex(@uuidGate) from privilege, role_privilege, role
where privilege.uuid = role_privilege.privilege_id
AND role_privilege.role_id = role.uuid
AND role.name = 'FENCE_ROLE_OPEN_ACCESS';

--
-- Create Super Admin and admin roles and privileges
--
SET @superAdminPrivilegeUUID = UNHEX('7044061AF65B425F86CE73A1BF7F4402');
SET @adminPrivilegeUUID = UNHEX('AD08212E096F414CBA8D1BAE09415DAB');

INSERT INTO privilege (uuid, description, name, application_id, queryTemplate, queryScope) VALUES
(@superAdminPrivilegeUUID,'PIC-SURE Auth super admin for managing roles/privileges/application/connections','SUPER_ADMIN',NULL,'[]',NULL),
(@adminPrivilegeUUID,'PIC-SURE Auth admin for managing users.','ADMIN',NULL,'[]',NULL);

SET @superAdminRoleUUID = UNHEX('002DC366B0D8420F998F885D0ED797FD');
SET @adminRoleUUID = UNHEX('8F885D0ED797FD002DC366B0D8420F99');

INSERT INTO role (uuid, name, description) VALUES
(@superAdminRoleUUID,'PIC-SURE Top Admin','PIC-SURE Auth Micro App Top admin including Admin and super Admin, can manage roles and privileges directly'),
(@adminRoleUUID,'Admin','Normal admin users, can manage other users including assignment of roles and privileges');

INSERT INTO role_privilege (role_id, privilege_id) VALUES
(@superAdminRoleUUID,@superAdminPrivilegeUUID),
(@superAdminRoleUUID,@adminPrivilegeUUID),
(@adminRoleUUID,@adminPrivilegeUUID);

DROP PROCEDURE IF EXISTS CreateSuperUser;
delimiter //
CREATE PROCEDURE CreateSuperUser (IN user_email varchar(255), IN connection_id varchar(255))
BEGIN
SELECT @userUUID := uuid FROM auth.user WHERE email = user_email AND connectionId = connection_id;
SELECT @saUUID := uuid FROM auth.role WHERE name = 'PIC-SURE Top Admin';
SELECT @adminUUID := uuid FROM auth.role WHERE name = 'Admin';
IF @userUUID IS NULL THEN
SET @userUUID = UNHEX(REPLACE(UUID(), '-', ''));
SELECT @connectionUUID := uuid FROM auth.connection WHERE id = connection_id;
INSERT INTO auth.user (uuid, general_metadata, acceptedTOS, connectionId, email, matched, subject, is_active, long_term_token, isGateAnyRelation)
VALUES (@userUUID, null, (SELECT CURRENT_TIMESTAMP), @connectionUUID, user_email, 0, null, 1, null, 1);
END IF;
INSERT INTO auth.user_role (user_id, role_id) VALUES (@userUUID,@saUUID);
INSERT INTO auth.user_role (user_id, role_id) VALUES (@userUUID,@adminUUID);
END//
delimiter ;
203 changes: 102 additions & 101 deletions app-infrastructure/configs/picsureui_settings.json
Original file line number Diff line number Diff line change
@@ -1,106 +1,107 @@
{
"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": "https://tinyurl.com/BDC-PIC-SURE-User-Guide\" aria-label='User Guide, this link will open a new browser tab' target='_blank'",
"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",
{
"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",
"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"
"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}"
}
"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}"
}
Loading

0 comments on commit 8d473cf

Please sign in to comment.