Nothing can stop anyone from accessing your database through SQL Manager due to content changes. You can make it obvious.
Basically you need to use HMAC , which are key hashes. Unfortunately, this leads to the need to manage keys so that the key remains secret, which may not be possible in triggers. We use a cryptographic service to provide key management, but it is accessed from code.
You also need to think about the ability of users to delete an entry, rather than modify its contents. We ended up with two HMACs, one of which was calculated using the contents of the record (to make the changes to the record obvious), the second - using the current HMAC and HMAC records from the previous line to make the deletion visible.
Then you need to worry about deleting the first or last record x. To do this, we use a trailer and a header record, which always have the same content, if they are missing, the top or bottom of the table has been deleted. The combined HMAC header uses the record after it, not the record before (since there was no record before).
And of course, if you are going to delete old records to control the amount of data that you store, you will need a mechanism to add a new header record after deletion.
Patrick Jan 21 '11 at 10:26 2011-01-21 10:26
source share