New Model for Integrity Testing (Runtime Demand)
Zachary Adam-MacEwen edited this page 2018-09-27 18:06:15 -03:00

Integrity Checking in Tapestry 2.0

Tapestry from versions 0.3.0 through 1.1.x operated on the assumption that if the script worked once without mangling the files it creates, then it will do so reproducably. UNfortunately, there a lot of moving parts in a Tapestry run and a lot that can very stealthily go wrong. IN order to prevent this, From 2.0 onward, Tapestry will include a set of Integrity Checks as part of its controls.

At-Runtime vs On-Demant Integrity Checks

Under an ideal set of circumstances, the integrity of a Tapfile will be checked at runtime - right after it is created. However, this is only possible under two conditions. Either:

  1. The user is in posession of the private component of the Disaster Recovery key at runtime, or;
  2. The at-runtime integrity check is run prior to encryption.

As encryption is a data-processing step that bears the most significant posibility of mangling the data in each tapestry block, running the integrity check prior to this test is undesirable. For that reason, the at-runtime integrity check will have to be configurable.

For the paranoid, and for deployments where each user is not in posession of the private component of the recovery key, there will also necessarily be an on-demand method which can be invoked for Tapestry to simply performe the integity check.

Integrity Checking Method

Thanks to the New Recovery Index File Format, we will necessarily always be in posession of the hash of the file in its original condition. The integrity check will simply loop over each file in a block, ensure that it can be found in the RIFF, and temporarily expand it, comparing it to its checksum before deleting the expanded copy. If done correctly, it should be possible to do this entirely in memory, without writing to disk.

Because the primary concern is unintended changes to the files themselves, and the integrity check is a reliability measure and not a security measure, the hash in use shall be MD5.

It may be desirable to have the on-demand integrity check also make a call to re-sign the block upon completion, with the key of the person performing the check. That's under consideration as a feature for 2.0 or a later release.