Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create a REST API endpoint for audit events attached to each resource, which allows creating external events and retrieving all events
  2. Update the repository to create audit event records in this container for internal events
  3. Create configurable option to allow or disallow deleting events in the repository
  4. Make sure that other repository functionality is not impacted by enabling or disabling in-repository audit event persistence
  5. Document end-to-end recipe for configuring event service with in-repository audit event persistence

RDF Vocabulary

Phase 2 Revised

Instead of creating a new REST API, we could simply create a container named, e.g., "audit" within any container.  External events could be posted there using the existing LDP API, and we would need to update Fedora 4 to do that automatically for internal events.  Much of the machinery needed to do this is already in place as part of the JMS module which currently listens to JCR events emits JMS events for all repository updates.  We could either update the JMS module to also create audit nodes, or create a separate module just for listening to JCR events and creating audit nodes.

    • A separate module has the advantage of being completely decoupled from the JMS module, which is particularly desirable for an optional module.
    • Updating the JMS module has the advantage of being a smaller update to existing code, and making it easier to suppress JMS events related to creating audit nodes.

RDF Vocabulary

Following the Audit Service PROV-O vs PREMIS guidelines, a typical A typical event encoded in RDF would look like this:

Code Block
@prefix audit:  <http://fedora.info/definitions/v4/audit#> .
@prefix fedora: <http://fedora.info/definitions/v4/repository#> .
@prefix foaf:   <http://xmlns.com/foaf/0.1/> .
@prefix premis: <http://www.loc.gov/premis/rdf/v1#> .
@prefix prov:   <http://www.w3.org/ns/prov#> .
@prefix xsd:    <http://www.w3.org/2001/XMLSchema#> .


<event1> a prov:InstantaneousEvent, premis:Event, audit:InternalEvent ;
  premis:hasEventRelatedAgent <agent1> ;"jquser"^^xsd:string, "Client Software v1.2.3"^^xsd:string .
  premis:hasEventType <http://id.loc.gov/vocabulary/preservationEvents/cre> ;
  fedorapremis:hasParenthasEventRelatedObject <http://localhost:8080/rest/55/59/ec/05/5559ec05-6ab1-4d61-905a-a5f3da360b23> ;
  provpremis:atTimehasEventDateTime "2012-04-30T20:40:40"^^xsd:dateTime .


External events (either directly added to a triplestore or created using the REST API in phase 2), should include the rdf:type audit:ExternalEvent to differentiate them from internal events.

Fixity events will also include the checksum generated:

Code Block
<event1> premis:hasFixity <event1#fixity1> ;
  premis:EventOutcomeInformation "SUCCESS" .

<agent1><event1#fixity1> a premis:AgentFixity ;
  premis:agentType <http://id.loc.gov/vocabulary/preservation/agentType/sof>hasMessageDigest "cf23df2207d99a74fbe169e3eba035e633b65d94"^^xsd:string ;
  foafpremis:hasMessageDigestAlgorithm "SHA1"^^xsd:string .

Should we create premis:Agent records for the agents?

Code Block
<event1> a prov:InstantaneousEvent, premis:Eventname "Client Software v1.2.3"^^xsd:String ;
  provpremis:actedOnBehalfOfhasEventRelatedAgent <agent2><agent1> .;
 

<agent2><agent1> a premis:Agent ;
  premis:agentType <http://id.loc.gov/vocabulary/preservation/agentType/per>sof> ;
  foaf:nick "jquser"^^xsd:String .

 

1. Is fedora:hasParent the right predicate to use to link to the resource being acted on, or is there a more appropriate predicate to use?

 

 

2. Should we use prov:atTime or premis:hasEventDateTime for recording the event timestamp?

 

 

3. Should we simplify the agents down to strings?

Code Block
<event1> a prov:InstantaneousEvent ;
  premis:hasEventRelatedAgent "jquser"^^xsd:string, "name "Client Software v1.2.3"^^xsd:string .

 

4. Should we include checksums produced by fixity checks?

Code Block
<event1> a prov:InstantaneousEvent String ;
  premisprov:hasFixityactedOnBehalfOf <event1#fixity1> ;
  premis:EventOutcomeInformation "SUCCESS" <agent2> .

<event1#fixity1><agent2> a premis:FixityAgent ;
  premis:hasMessageDigest "cf23df2207d99a74fbe169e3eba035e633b65d94"^^xsd:stringagentType <http://id.loc.gov/vocabulary/preservation/agentType/per> ;
  premisfoaf:hasMessageDigestAlgorithmnick "SHA1jquser"^^xsd:stringString .

 

...