Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6051 bulk export security errors #5915

Merged
merged 6 commits into from
May 8, 2024
Merged

Conversation

tadgh
Copy link
Collaborator

@tadgh tadgh commented May 8, 2024

Refactor rules for bulk export to be safer.

@tadgh tadgh changed the base branch from master to rel_7_2 May 8, 2024 18:07
@tadgh tadgh enabled auto-merge (squash) May 8, 2024 18:07
Copy link

codecov bot commented May 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (rel_7_2@45b5766). Click here to learn what that means.

Additional details and impacted files
@@            Coverage Diff             @@
##             rel_7_2    #5915   +/-   ##
==========================================
  Coverage           ?   83.44%           
  Complexity         ?    27038           
==========================================
  Files              ?     1690           
  Lines              ?   104338           
  Branches           ?    13227           
==========================================
  Hits               ?    87060           
  Misses             ?    11625           
  Partials           ?     5653           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented May 8, 2024

Formatting check succeeded!

@tadgh tadgh merged commit 7a461df into rel_7_2 May 8, 2024
66 checks passed
@tadgh tadgh deleted the 6051-bulk-export-security-errors branch May 8, 2024 22:02
tadgh added a commit that referenced this pull request May 10, 2024
* Enhance RuleBuilder code to support multiple instances (#5852)

* Overhaul bulk export permissions.

* Overhaul bulk export permissions.

* Small tweak to rule builder.

* Cleanup validation.

* Cleanup validation.

* Code review feedback.

* Postgres terminology service hard coded column names migration (#5866)

* updating parent pids column name

* updating name of the fullTestField Search

* updating name of the fullTestField Search

* fixing typo.

* failing test.

* - Moving FullTextField annotation from getter method and adding it to the newly added VC property of the entity;

- reverting the name of the FullTextField entity to its previous name of 'myParentPids';

- reverting the name of the lucene index to search on in the terminology service.

- updating the changelog;

* making spotless happy

---------

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

* 5879 back porting fix for issue 5877 (attempting to update a tokenparam with a value greater than 200 characters raises an sqlexception) to release rel_7_2 (#5881)

* initial failing test.

* solution

* adding changelog

* spotless

* moving changelog from 7_4_0 to 7_2_0 and deleting 7_4_0 folder.

---------

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

* Expose BaseRequestPartitionHelperSvc validateAndNormalize methods (#5811)

* Expose BaseRequestPartitionHelperSvc validate and normalize methods

* Compilation errors

* change mock test to jpa test

* change mock test to jpa test

* validateAndNormalizePartitionIds

* validateAndNormalizePartitionNames

* validateAndNormalizePartitionIds validation + bug fix

* validateAndNormalizePartitionNames validation

* fix test

* version bump

* Ensure a non-numeric FHIR ID doesn't result in a NumberFormatException when processing survivorship rules (#5883)

* Add failing test as well as commented out potential solution.

* Fix for NumberFormatException.

* Add conditional test for survivorship rules.

* Spotless.

* Add changelog.

* Code review feedback.

* updating documentation (#5889)

* Ensure temp file ends with "." and then suffix. (#5894)

* bugfix to hapifhir/hapi-fhir-jpaserver-starter#675 (#5892)

Co-authored-by: Jens Kristian Villadsen <[email protected]>

* Enhance mdm interceptor (#5899)

* Add MDM Transaction Context for further downstream processing giving interceptors a better chance of figuring out what happened.

* Added javadoc

* Cahngelog

* spotless

---------

Co-authored-by: Jens Kristian Villadsen <[email protected]>

* Fix BaseHapiFhirResourceDao $meta method to use HapiTransactionService instead of @transaction (#5896)

* Try making ResourceTable.myTags EAGER instead of LAZY and see if it breaks anything.

* Try making ResourceTable.myTags EAGER instead of LAZY and see if it breaks anything.

* Ensure BaseHapiFhirResourceDao#metaGetOperation uses HapiTransactionService instead of @transactional in order to resolve megascale $meta bug.

* Add changelog.

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_2_0/5898-ld-megascale-meta-operation-fails-hapi-0389.yaml

Commit code reviewer suggestion.

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

---------

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

* Fix query chained on sort bug where we over-filter results (#5903)

* Failing test.

* Ensure test cleanup doesn't fail by deleting Patients before Practitioners.

* Implement fix.

* Spotless.

* Clean up unit test and add changelog.  Fix unit test.

* Fix changelog file.

* Apply suggestions from code review

Apply code review suggestions.

Co-authored-by: Michael Buckley <[email protected]>

* Spotless

---------

Co-authored-by: Michael Buckley <[email protected]>

* cve fix (#5906)

Co-authored-by: Long Ma <[email protected]>

* Fixing issues with postgres LOB migration. (#5895)

* Fixing issues with postgres LOB migration.

* addressing code review comments for audit/transaction logs.

* test and implementation for BinaryStorageEntity migration post code review.

* test and implementation for BinaryStorageEntity migration post code review.

* test and implementation for TermConcept
 migration post code review.

* applying spotless

* test and implementation for TermConceptProperty
 migration post code review.

* test and implementation for TermValueSetConcept
 migration post code review.

* fixing migration version

* fixing migration task

* changelog

* fixing changelog

* Minor renames

* addressing comments and suggestions from second code review.

* passing tests

* fixing more tests

---------

Co-authored-by: peartree <[email protected]>
Co-authored-by: Tadgh <[email protected]>

* 6051 bulk export security errors (#5915)

* Enhance RuleBuilder code to support multiple instances (#5852)

* Overhaul bulk export permissions.

* Overhaul bulk export permissions.

* Small tweak to rule builder.

* Cleanup validation.

* Cleanup validation.

* Code review feedback.

* Postgres terminology service hard coded column names migration (#5866)

* updating parent pids column name

* updating name of the fullTestField Search

* updating name of the fullTestField Search

* fixing typo.

* failing test.

* - Moving FullTextField annotation from getter method and adding it to the newly added VC property of the entity;

- reverting the name of the FullTextField entity to its previous name of 'myParentPids';

- reverting the name of the lucene index to search on in the terminology service.

- updating the changelog;

* making spotless happy

---------

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

* 5879 back porting fix for issue 5877 (attempting to update a tokenparam with a value greater than 200 characters raises an sqlexception) to release rel_7_2 (#5881)

* initial failing test.

* solution

* adding changelog

* spotless

* moving changelog from 7_4_0 to 7_2_0 and deleting 7_4_0 folder.

---------

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

* Expose BaseRequestPartitionHelperSvc validateAndNormalize methods (#5811)

* Expose BaseRequestPartitionHelperSvc validate and normalize methods

* Compilation errors

* change mock test to jpa test

* change mock test to jpa test

* validateAndNormalizePartitionIds

* validateAndNormalizePartitionNames

* validateAndNormalizePartitionIds validation + bug fix

* validateAndNormalizePartitionNames validation

* fix test

* version bump

* Ensure a non-numeric FHIR ID doesn't result in a NumberFormatException when processing survivorship rules (#5883)

* Add failing test as well as commented out potential solution.

* Fix for NumberFormatException.

* Add conditional test for survivorship rules.

* Spotless.

* Add changelog.

* Code review feedback.

* updating documentation (#5889)

* Ensure temp file ends with "." and then suffix. (#5894)

* bugfix to hapifhir/hapi-fhir-jpaserver-starter#675 (#5892)

Co-authored-by: Jens Kristian Villadsen <[email protected]>

* Enhance mdm interceptor (#5899)

* Add MDM Transaction Context for further downstream processing giving interceptors a better chance of figuring out what happened.

* Added javadoc

* Cahngelog

* spotless

---------

Co-authored-by: Jens Kristian Villadsen <[email protected]>

* Fix BaseHapiFhirResourceDao $meta method to use HapiTransactionService instead of @transaction (#5896)

* Try making ResourceTable.myTags EAGER instead of LAZY and see if it breaks anything.

* Try making ResourceTable.myTags EAGER instead of LAZY and see if it breaks anything.

* Ensure BaseHapiFhirResourceDao#metaGetOperation uses HapiTransactionService instead of @transactional in order to resolve megascale $meta bug.

* Add changelog.

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_2_0/5898-ld-megascale-meta-operation-fails-hapi-0389.yaml

Commit code reviewer suggestion.

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

---------

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

* Fix query chained on sort bug where we over-filter results (#5903)

* Failing test.

* Ensure test cleanup doesn't fail by deleting Patients before Practitioners.

* Implement fix.

* Spotless.

* Clean up unit test and add changelog.  Fix unit test.

* Fix changelog file.

* Apply suggestions from code review

Apply code review suggestions.

Co-authored-by: Michael Buckley <[email protected]>

* Spotless

---------

Co-authored-by: Michael Buckley <[email protected]>

* cve fix (#5906)

Co-authored-by: Long Ma <[email protected]>

* Fixing issues with postgres LOB migration. (#5895)

* Fixing issues with postgres LOB migration.

* addressing code review comments for audit/transaction logs.

* test and implementation for BinaryStorageEntity migration post code review.

* test and implementation for BinaryStorageEntity migration post code review.

* test and implementation for TermConcept
 migration post code review.

* applying spotless

* test and implementation for TermConceptProperty
 migration post code review.

* test and implementation for TermValueSetConcept
 migration post code review.

* fixing migration version

* fixing migration task

* changelog

* fixing changelog

* Minor renames

* addressing comments and suggestions from second code review.

* passing tests

* fixing more tests

---------

Co-authored-by: peartree <[email protected]>
Co-authored-by: Tadgh <[email protected]>

* refactor bulk export rule, add concept of appliestoallpatients, fix tests

* spotless

* Cahgnelog, tests

* more tests

* refactor style checks

---------

Co-authored-by: Luke deGruchy <[email protected]>
Co-authored-by: Etienne Poirier <[email protected]>
Co-authored-by: peartree <[email protected]>
Co-authored-by: Nathan Doef <[email protected]>
Co-authored-by: TipzCM <[email protected]>
Co-authored-by: dotasek <[email protected]>
Co-authored-by: Jens Kristian Villadsen <[email protected]>
Co-authored-by: Michael Buckley <[email protected]>
Co-authored-by: longma1 <[email protected]>
Co-authored-by: Long Ma <[email protected]>

* Convert a few nulls to aggressive denies

* Change chain sort syntax for MS SQL (#5917)

* Change sort type on chains

* Change sort type on chains

* Test for MS SQL

* Comments

---------

Co-authored-by: Luke deGruchy <[email protected]>
Co-authored-by: Etienne Poirier <[email protected]>
Co-authored-by: peartree <[email protected]>
Co-authored-by: Nathan Doef <[email protected]>
Co-authored-by: TipzCM <[email protected]>
Co-authored-by: dotasek <[email protected]>
Co-authored-by: Jens Kristian Villadsen <[email protected]>
Co-authored-by: Tadgh <[email protected]>
Co-authored-by: Michael Buckley <[email protected]>
Co-authored-by: Long Ma <[email protected]>
tadgh added a commit that referenced this pull request May 13, 2024
* Enhance RuleBuilder code to support multiple instances (#5852)

* Overhaul bulk export permissions.

* Overhaul bulk export permissions.

* Small tweak to rule builder.

* Cleanup validation.

* Cleanup validation.

* Code review feedback.

* Postgres terminology service hard coded column names migration (#5866)

* updating parent pids column name

* updating name of the fullTestField Search

* updating name of the fullTestField Search

* fixing typo.

* failing test.

* - Moving FullTextField annotation from getter method and adding it to the newly added VC property of the entity;

- reverting the name of the FullTextField entity to its previous name of 'myParentPids';

- reverting the name of the lucene index to search on in the terminology service.

- updating the changelog;

* making spotless happy

---------

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

* 5879 back porting fix for issue 5877 (attempting to update a tokenparam with a value greater than 200 characters raises an sqlexception) to release rel_7_2 (#5881)

* initial failing test.

* solution

* adding changelog

* spotless

* moving changelog from 7_4_0 to 7_2_0 and deleting 7_4_0 folder.

---------

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

* Expose BaseRequestPartitionHelperSvc validateAndNormalize methods (#5811)

* Expose BaseRequestPartitionHelperSvc validate and normalize methods

* Compilation errors

* change mock test to jpa test

* change mock test to jpa test

* validateAndNormalizePartitionIds

* validateAndNormalizePartitionNames

* validateAndNormalizePartitionIds validation + bug fix

* validateAndNormalizePartitionNames validation

* fix test

* version bump

* Ensure a non-numeric FHIR ID doesn't result in a NumberFormatException when processing survivorship rules (#5883)

* Add failing test as well as commented out potential solution.

* Fix for NumberFormatException.

* Add conditional test for survivorship rules.

* Spotless.

* Add changelog.

* Code review feedback.

* updating documentation (#5889)

* Ensure temp file ends with "." and then suffix. (#5894)

* bugfix to hapifhir/hapi-fhir-jpaserver-starter#675 (#5892)

Co-authored-by: Jens Kristian Villadsen <[email protected]>

* Enhance mdm interceptor (#5899)

* Add MDM Transaction Context for further downstream processing giving interceptors a better chance of figuring out what happened.

* Added javadoc

* Cahngelog

* spotless

---------

Co-authored-by: Jens Kristian Villadsen <[email protected]>

* Fix BaseHapiFhirResourceDao $meta method to use HapiTransactionService instead of @transaction (#5896)

* Try making ResourceTable.myTags EAGER instead of LAZY and see if it breaks anything.

* Try making ResourceTable.myTags EAGER instead of LAZY and see if it breaks anything.

* Ensure BaseHapiFhirResourceDao#metaGetOperation uses HapiTransactionService instead of @transactional in order to resolve megascale $meta bug.

* Add changelog.

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_2_0/5898-ld-megascale-meta-operation-fails-hapi-0389.yaml

Commit code reviewer suggestion.

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

---------

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

* Fix query chained on sort bug where we over-filter results (#5903)

* Failing test.

* Ensure test cleanup doesn't fail by deleting Patients before Practitioners.

* Implement fix.

* Spotless.

* Clean up unit test and add changelog.  Fix unit test.

* Fix changelog file.

* Apply suggestions from code review

Apply code review suggestions.

Co-authored-by: Michael Buckley <[email protected]>

* Spotless

---------

Co-authored-by: Michael Buckley <[email protected]>

* cve fix (#5906)

Co-authored-by: Long Ma <[email protected]>

* Fixing issues with postgres LOB migration. (#5895)

* Fixing issues with postgres LOB migration.

* addressing code review comments for audit/transaction logs.

* test and implementation for BinaryStorageEntity migration post code review.

* test and implementation for BinaryStorageEntity migration post code review.

* test and implementation for TermConcept
 migration post code review.

* applying spotless

* test and implementation for TermConceptProperty
 migration post code review.

* test and implementation for TermValueSetConcept
 migration post code review.

* fixing migration version

* fixing migration task

* changelog

* fixing changelog

* Minor renames

* addressing comments and suggestions from second code review.

* passing tests

* fixing more tests

---------

Co-authored-by: peartree <[email protected]>
Co-authored-by: Tadgh <[email protected]>

* 6051 bulk export security errors (#5915)

* Enhance RuleBuilder code to support multiple instances (#5852)

* Overhaul bulk export permissions.

* Overhaul bulk export permissions.

* Small tweak to rule builder.

* Cleanup validation.

* Cleanup validation.

* Code review feedback.

* Postgres terminology service hard coded column names migration (#5866)

* updating parent pids column name

* updating name of the fullTestField Search

* updating name of the fullTestField Search

* fixing typo.

* failing test.

* - Moving FullTextField annotation from getter method and adding it to the newly added VC property of the entity;

- reverting the name of the FullTextField entity to its previous name of 'myParentPids';

- reverting the name of the lucene index to search on in the terminology service.

- updating the changelog;

* making spotless happy

---------

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

* 5879 back porting fix for issue 5877 (attempting to update a tokenparam with a value greater than 200 characters raises an sqlexception) to release rel_7_2 (#5881)

* initial failing test.

* solution

* adding changelog

* spotless

* moving changelog from 7_4_0 to 7_2_0 and deleting 7_4_0 folder.

---------

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

* Expose BaseRequestPartitionHelperSvc validateAndNormalize methods (#5811)

* Expose BaseRequestPartitionHelperSvc validate and normalize methods

* Compilation errors

* change mock test to jpa test

* change mock test to jpa test

* validateAndNormalizePartitionIds

* validateAndNormalizePartitionNames

* validateAndNormalizePartitionIds validation + bug fix

* validateAndNormalizePartitionNames validation

* fix test

* version bump

* Ensure a non-numeric FHIR ID doesn't result in a NumberFormatException when processing survivorship rules (#5883)

* Add failing test as well as commented out potential solution.

* Fix for NumberFormatException.

* Add conditional test for survivorship rules.

* Spotless.

* Add changelog.

* Code review feedback.

* updating documentation (#5889)

* Ensure temp file ends with "." and then suffix. (#5894)

* bugfix to hapifhir/hapi-fhir-jpaserver-starter#675 (#5892)

Co-authored-by: Jens Kristian Villadsen <[email protected]>

* Enhance mdm interceptor (#5899)

* Add MDM Transaction Context for further downstream processing giving interceptors a better chance of figuring out what happened.

* Added javadoc

* Cahngelog

* spotless

---------

Co-authored-by: Jens Kristian Villadsen <[email protected]>

* Fix BaseHapiFhirResourceDao $meta method to use HapiTransactionService instead of @transaction (#5896)

* Try making ResourceTable.myTags EAGER instead of LAZY and see if it breaks anything.

* Try making ResourceTable.myTags EAGER instead of LAZY and see if it breaks anything.

* Ensure BaseHapiFhirResourceDao#metaGetOperation uses HapiTransactionService instead of @transactional in order to resolve megascale $meta bug.

* Add changelog.

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_2_0/5898-ld-megascale-meta-operation-fails-hapi-0389.yaml

Commit code reviewer suggestion.

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

---------

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

* Fix query chained on sort bug where we over-filter results (#5903)

* Failing test.

* Ensure test cleanup doesn't fail by deleting Patients before Practitioners.

* Implement fix.

* Spotless.

* Clean up unit test and add changelog.  Fix unit test.

* Fix changelog file.

* Apply suggestions from code review

Apply code review suggestions.

Co-authored-by: Michael Buckley <[email protected]>

* Spotless

---------

Co-authored-by: Michael Buckley <[email protected]>

* cve fix (#5906)

Co-authored-by: Long Ma <[email protected]>

* Fixing issues with postgres LOB migration. (#5895)

* Fixing issues with postgres LOB migration.

* addressing code review comments for audit/transaction logs.

* test and implementation for BinaryStorageEntity migration post code review.

* test and implementation for BinaryStorageEntity migration post code review.

* test and implementation for TermConcept
 migration post code review.

* applying spotless

* test and implementation for TermConceptProperty
 migration post code review.

* test and implementation for TermValueSetConcept
 migration post code review.

* fixing migration version

* fixing migration task

* changelog

* fixing changelog

* Minor renames

* addressing comments and suggestions from second code review.

* passing tests

* fixing more tests

---------

Co-authored-by: peartree <[email protected]>
Co-authored-by: Tadgh <[email protected]>

* refactor bulk export rule, add concept of appliestoallpatients, fix tests

* spotless

* Cahgnelog, tests

* more tests

* refactor style checks

---------

Co-authored-by: Luke deGruchy <[email protected]>
Co-authored-by: Etienne Poirier <[email protected]>
Co-authored-by: peartree <[email protected]>
Co-authored-by: Nathan Doef <[email protected]>
Co-authored-by: TipzCM <[email protected]>
Co-authored-by: dotasek <[email protected]>
Co-authored-by: Jens Kristian Villadsen <[email protected]>
Co-authored-by: Michael Buckley <[email protected]>
Co-authored-by: longma1 <[email protected]>
Co-authored-by: Long Ma <[email protected]>

* Convert a few nulls to aggressive denies

* Change chain sort syntax for MS SQL (#5917)

* Change sort type on chains

* Change sort type on chains

* Test for MS SQL

* Comments

* Version bump

* version bump to 7.3.1-SNAPSHOT

---------

Co-authored-by: Luke deGruchy <[email protected]>
Co-authored-by: Etienne Poirier <[email protected]>
Co-authored-by: peartree <[email protected]>
Co-authored-by: Nathan Doef <[email protected]>
Co-authored-by: TipzCM <[email protected]>
Co-authored-by: dotasek <[email protected]>
Co-authored-by: Jens Kristian Villadsen <[email protected]>
Co-authored-by: Tadgh <[email protected]>
Co-authored-by: Michael Buckley <[email protected]>
Co-authored-by: Long Ma <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants