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

[frontend/backend] Apply marking definition to export files (#5797) #6030

Merged
merged 45 commits into from
Apr 23, 2024

Conversation

Goumies
Copy link
Member

@Goumies Goumies commented Feb 18, 2024

Proposed changes

  • Update InternalFile entity model with content, file, and object markings
  • Update export generation forms with required fields: content and file max definition levels
  • Add markings to API and export report pdf connector communications

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

/!\ For this feature to be validated, evolutions in Client-Python and Connectors must be reviewed and merged first. /!\
This pull request is related to the ones in the Client-Python and Connectors :

@Goumies
Copy link
Member Author

Goumies commented Feb 18, 2024

The current work submitted in this Pull Request fulfills 1 / 3 acceptance criteria.
Please take a look at the brainstorming for more details.

We have to update the export list in the frontend to finalize this feature :

  • The exportFiles pagination only contains the id of every file. Despite the spread fragment presence. The idea was to compare the current user markings and the file ones for every file. Julien has mentioned a mechanism to control the access to data with the markings. It is supposed to automatically compare the resolved allowed markings of the user and the markings of the data to file in the current location.
  • The initial approach to store the Internal File in Elastic was to replace the manual file indexing with the usual Entity creation: indexFileToDocument -> createEntity. I kept both because createEntity alone was breaking the exportFiles pagination in the frontend. And, importing createEntity in file storage provokes a dependency cycle between file-storage.js and middleware.js

image

I have left comments in the code source where I made some attempts.

/!\ maxMarking (string) is now renamed to contentMarkings or contentMaxMarkings (array) :
impact of this change still needs to be tested.

CelineSebe and others added 24 commits April 23, 2024 14:18
Signed-off-by: Celine Sebe <celine.sebe@filigran.io>
Signed-off-by: Celine Sebe <celine.sebe@filigran.io>
Signed-off-by: Celine Sebe <celine.sebe@filigran.io>
…solver updated, internal file and work ref attribute updated (#5797)
Signed-off-by: Celine Sebe <celine.sebe@filigran.io>
Signed-off-by: Celine Sebe <celine.sebe@filigran.io>
Signed-off-by: Celine Sebe <celine.sebe@filigran.io>
Copy link

codecov bot commented Apr 23, 2024

Codecov Report

Attention: Patch coverage is 63.93443% with 44 lines in your changes are missing coverage. Please review.

Project coverage is 68.03%. Comparing base (023ed33) to head (6d8ba59).

Files Patch % Lines
...pencti-platform/opencti-graphql/src/domain/stix.js 10.00% 18 Missing ⚠️
...tform/opencti-graphql/src/domain/stixCoreObject.js 33.33% 6 Missing ⚠️
.../opencti-graphql/src/domain/stixCyberObservable.js 0.00% 4 Missing ⚠️
...orm/opencti-graphql/src/domain/stixDomainObject.js 20.00% 4 Missing ⚠️
.../opencti-graphql/src/schema/stixRefRelationship.ts 90.24% 4 Missing ⚠️
...rm/opencti-graphql/src/resolvers/stixCoreObject.js 40.00% 3 Missing ⚠️
...opencti-graphql/src/domain/stixCoreRelationship.js 0.00% 2 Missing ⚠️
...ncti-graphql/src/resolvers/stixCoreRelationship.js 66.66% 1 Missing ⚠️
...encti-graphql/src/resolvers/stixCyberObservable.js 66.66% 1 Missing ⚠️
.../opencti-graphql/src/resolvers/stixDomainObject.js 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6030      +/-   ##
==========================================
+ Coverage   68.01%   68.03%   +0.02%     
==========================================
  Files         538      538              
  Lines       65715    65779      +64     
  Branches     5568     5569       +1     
==========================================
+ Hits        44695    44752      +57     
- Misses      21020    21027       +7     

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

@ValentinBouzinFiligran ValentinBouzinFiligran merged commit 6c82c4d into master Apr 23, 2024
5 checks passed
@ValentinBouzinFiligran ValentinBouzinFiligran deleted the issue/5797 branch April 23, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apply marking definition to export files
7 participants