add update mechanism to records, which supports merge and replace; this includes building the security framework, and provides the tests to prove all the bits are working