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

Automatically check file integrity using a hash #1924

Closed
3 of 4 tasks
SamuelPull opened this issue Jul 25, 2024 · 0 comments · Fixed by #1940
Closed
3 of 4 tasks

Automatically check file integrity using a hash #1924

SamuelPull opened this issue Jul 25, 2024 · 0 comments · Fixed by #1940
Assignees
Labels
api Indicates api related issue or feature feature Indicates a new feature implementation frontend Indicates frontend related issue or feature storage-service Indicates storage-service related issue or feature

Comments

@SamuelPull
Copy link
Collaborator

SamuelPull commented Jul 25, 2024

  • The feature was discussed in discussions of this repository.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Description 💡

Is someone replaces an uploaded file directly in a blob container or bucket, giving it the same filename and metadata, this is not detected by TruBudget automatically.
Replaced file fails the hash verification initiated manually via the user interface, because hash associated with a document in a workflow item is created on file upload using the api.

  • TruBudget api should check integrity of uploaded files automatically by recomputing their hashes and comparing against data stored on chain. This can be done on file download or any file access? Details depend on performance. We have to take into account that files may be large ~70 MB (plus 30% for base 64 encoding).
    setDocumentAvailability looks like a good place
  • UI should inform the user when a hash of a file in storage doesn't match the hash stored on chain

I'm not sure about the role of file secret metadata, as this can be easily copied from one blob to a different blob, and this way it will match a file secret recorded on chain. I think this needs re-evaluation? Maybe I misunderstood its use.

@SamuelPull SamuelPull added feature Indicates a new feature implementation api Indicates api related issue or feature frontend Indicates frontend related issue or feature storage-service Indicates storage-service related issue or feature labels Jul 25, 2024
@SamuelPull SamuelPull self-assigned this Aug 13, 2024
@SamuelPull SamuelPull added this to the Trubudget 2.15.0 milestone Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Indicates api related issue or feature feature Indicates a new feature implementation frontend Indicates frontend related issue or feature storage-service Indicates storage-service related issue or feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant