mjordan / riprap

A PREMIS-compliant fixity checking microservice.
MIT License
13 stars 7 forks source link

On initial fixity check event, compare known value from source with current value #13

Open mjordan opened 6 years ago

mjordan commented 6 years ago

The first time Riprap sees a resource, allowing it to do an initial fixity check would provide assurance that the resource was unaltered between the first time Riprap encountered it and the last known digest from some external system. This capability would be particularly useful during migrations. For example, when migrating from Islandora 7.x to CLAW, we could check a resource's TECHMD 7.x datastream, which contains an md5 digest for the OBJ datastream:

<?xml version="1.0" encoding="UTF-8"?>
<fits xmlns="http://hul.harvard.edu/ois/xml/ns/fits/fits_output" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hul.harvard.edu/ois/xml/ns/fits/fits_output http://hul.harvard.edu/ois/xml/xsd/fits/fits_output.xsd" version="1.1.1" timestamp="10/7/18 5:40 PM">
  <identification>
  [...]
  <fileinfo>
   [...]
    <md5checksum toolname="OIS File Information" toolversion="0.2" status="SINGLE_RESULT">554e8cfa58aae5806737e3263cab98c9</md5checksum>
   [..]
  </fileinfo>
  [...]

The result of this check could be persisted in the event_detail element. This could be done via a postcheck plugin.