Come up with mechanism for enforcing integrity protection usage #52

Open
opened 2026-04-05 15:05:14 +00:00 by Skipper · 0 comments
Owner

We have implemented mechanism, to sign stored data in database with root key.
However, we currently have no way of enforcing usage of them.
It's very easy to forget:

  • Creating signature. This would lead to incosistent database state on next code run, when data is genuine (not tampered with), however server couldn't know it
  • Verifying signature. This is the most criticial: even if we create signature, but do not verify it -- it defeats the whole purpose.

Therefore, to close this ticket, abstraction enforcing previously stated preconditions / invariants should be implemented.
I envision it as some generic IntegrityEnvelope<T>, that has methods to lookup by id (or some other identifier), create new signature, delete existing or update.

Keep in mind that it should be flexible enough to support 1-to-1, M-to-1, M-to-M type of relationships on query level.
This is because some business objects are made of multiple rows in different tables. Take grants, for example.

We have implemented mechanism, to sign stored data in database with root key. However, we currently have no way of enforcing usage of them. It's very easy to forget: - Creating signature. This would lead to incosistent database state on next code run, when data is genuine (not tampered with), however server couldn't know it - Verifying signature. This is the most criticial: even if we create signature, but do not verify it -- it defeats the whole purpose. Therefore, to close this ticket, abstraction enforcing previously stated preconditions / invariants should be implemented. I envision it as some generic `IntegrityEnvelope<T>`, that has methods to lookup by id (or some other identifier), create new signature, delete existing or update. Keep in mind that it should be flexible enough to support `1-to-1`, `M-to-1`, `M-to-M` type of relationships on query level. This is because some business objects are made of multiple rows in different tables. Take grants, for example.
Skipper added the
Kind
Security
Difficulty
High
3
labels 2026-04-05 15:05:25 +00:00
CleverWild self-assigned this 2026-04-05 15:13:54 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MarketTakers/arbiter#52