Update to Metamodel Version 3.2#327
Conversation
Co-authored-by: Aaron Zielstorff <aaron.zielstorff@iese.fraunhofer.de>
Co-authored-by: Jannik Fried <Jannik.Fried@iese.fraunhofer.de>
- Added history configuration options via environment variables, including modes for history behavior (off, api, audit), retention days, immutability settings, and audit identity modes. - Introduced ChangeEvent structure to encapsulate event data for history storage. - Updated AppendVersionTx to append immutable event rows instead of updating existing history rows. - Implemented SHA-256 hashing for canonical JSON snapshots and row hashes for history events. - Added support for audit metadata in history events, including actor subject, request ID, and other contextual information. - Created tests for history functionality, ensuring stable hashing and correct behavior under different configurations. - Enhanced documentation to reflect new history features and configuration options.
- changes openapi - adds history guard
There was a problem hiding this comment.
The history tables should be in a different database in the same Postgres so that individual DB user rights can be configured.
There was a problem hiding this comment.
We decided to not do this. The external anchor will archive this exact requirement. If users need that, the should use the external anchor.
Co-authored-by: Jannik Fried <Jannik.Fried@iese.fraunhofer.de>
|
as a user i would expect that /$recent-changes sorts recent changes from latest to oldest. Currenlty it is sorted from oldest to latest. I assume that is specified in the standard? |
|
Error removing Submodel Element! Status: 500 How to reproduce: |
|
Error creating Submodel Element! Status: 500 To reproduce:
(dont know if those errors have anything to to with this PR) |
It's not defined in the spec as far as I can see. But agreed, it makes sense to sort from newest to oldest. Just forgot about that. The DB obviously stores it from oldest to newest in the append-only history tables. |
Description of Changes
Please provide a brief summary of what you have changed in this pull request. Be clear and concise.
Related Issue
If this pull request is related to an existing issue, please link that issue using the format
#issue_number.BaSyx Configuration for Testing
Describe any specific configuration settings or environment setup required to test these changes effectively. If possible, please provide the BaSyx configuration as .zip file.
AAS Files Used for Testing
Please provide any AAS files that were used in the testing of these changes. Include a brief descriptions of their relevance to the changes being proposed.
Additional Information
Include any additional information or context that could be useful for the reviewer. This could include challenges faced, alternative solutions that were considered, etc.
Please ensure that you have tested your changes thoroughly before submitting the pull request.