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:
- Install Vagrant and VirtualBox
Clone the fcrepo4-vagrant Git repository
Panel borderStyle dashed git clone https://github.com/fcrepo4-labs/fcrepo4-vagrant.git
cd fcrepo4-vagrant
- Edit the
install_files/config
file and change theFEDORA_AUDIT
value totrue
. - Optional: Edit the
install_files/config
file and change theFEDORA_AUDIT_LOCATION
value todesired location
. - Optional: Edit the
install_files/config
file and change theFEDORA_AUTH
value totrue
. Start the Vagrant VM:
Panel borderStyle dashed vagrant up
Build a webapp with Audit feature
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 borderStyle dashed git clone git@github.com:fcrepo4-labs/fcrepo-webapp-plus.git
cd fcrepo-webapp-plusBuild the webapp using the audit profile with/without authentication features.
Panel borderStyle dashed # 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 borderStyle dashed 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.