Versions Compared

Key

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

Run the Vagrant VM

Follow the instructions at https://github.com/fcrepo4-labs/fcrepo4-vagrant for setting up the Fedora 4 Vagrant Virtual Machine.  These are essentially:

...

  • Edit the install_files/config file and change the FEDORA_AUDIT value to true.
  • Optional: Edit the install_files/config file and change the FEDORA_AUDIT_LOCATION value to desired location.
  • Optional: Edit the install_files/config file and change the FEDORA_AUTH value to true.
  • Start the Vagrant VM:

    Panel
    borderStyledashed
    vagrant up

Build a webapp with

...

internal audit events enabled

Follow the instructions at https://github.com/fcrepo4-labs/fcrepo-webapp-plus for building an audit capable fedora webapp. These are essentially:

  • Clone the fcrepo-webapp-plus Git repository

    Panel
    borderStyledashed
    git clone  git@github.com:fcrepo4-labs/fcrepo-webapp-plus.git
    cd fcrepo-webapp-plus
  • Build the webapp using the audit profile with/without authentication features.

    Panel
    borderStyledashed
    # Only audit capability
    mvn install -P audit -DskipTests=true
     
    # Audit capability with Role based Authentication.
    mvn install -P audit,rbacl
     
    # Audit capability with XACML based Authentication.
    mvn install -P audit,xacml
  • Follow the steps at Deploying Fedora 4 Complete Guide to deploy the wepapp.

 

Verify that audit events are created in the container

  • Verify that an empty container is created at the configured FEDORA_AUDIT_LOCATION (default: /audit).
  • Perform some auditable operations using the Fedora 4 HTML UI at http://localhost:8080/fcrepo/rest or using the REST API on the command-line:

    Panel
    borderStyledashed
    curl -u fedoraAdmin:secret3 -X POST -H "Slug: object1" http://127.0.0.1:8080/fcrepo/rest
    curl -u fedoraAdmin:secret3 -X POST -H "Slug: file1" --data-binary "test content" http://127.0.0.1:8080/fcrepo/rest/object1
    curl -u fedoraAdmin:secret3 -X PATCH -H "Content-type: application/sparql-update" --data-binary "insert data { <> <http://purl.org/dc/elements/1.1/title> \"new title\" . }" http://127.0.0.1:8080/fcrepo/rest/object1
    curl -u fedoraAdmin:secret3 -X DELETE http://127.0.0.1:8080/fcrepo/rest/object1/file1
    curl -u fedoraAdmin:secret3 -X DELETE http://127.0.0.1:8080/fcrepo/rest/object1
  • Verify that the audit event nodes are created under the configured FEDORA_AUDIT_LOCATION.