Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
titleAbout the Drupal Filter

The Drupal Filter is a library package that gets installed in the in the Fedora Web-App on the Tomcat Application Server. It is the Fedora side of the communication between Islandora's Tuque library and the Fedora repository system.

1. Download the Latest Version of the Islandora Drupal Filter

Download the appropriate Drupal Filter file, and copy it to $FEDORA_HOME/tomcat/webapps/fedora/WEB-INF/lib

...

Code Block
languagebash
$ wget  https://github.com/Islandora/islandora_drupal_filter/releases/download/v7.1.3/fcrepo-drupalauthfilter-3.8.0.jar 
$ cp -v fcrepo-drupalauthfilter-3.8.0.jar $FEDORA_HOME/tomcat/webapps/fedora/WEB-INF/lib

2. Make the Fedora Repository Aware of the New Filter

Navigate to $FEDORA_HOME/server/config and open the file jaas.conf in a text editor.
 
To allow the Drupal Servlet Filter to authenticate against Drupal’s database, replace the "fedora-auth" entry with the following lines that reference the DrupalServlet filters class files: 

Code Block
fedora-auth
{
org.fcrepo.server.security.jaas.auth.module.XmlUsersFileModule required
debug=true;
ca.upei.roblib.fedora.servletfilter.DrupalAuthModule required
debug=true;
};

3. Configure the new filter to connect to Drupal (filter-drupal.xml)

Create the file filter-drupal.xml in $FEDORA_HOME/server/config using the following text as a template (or download a sample file from https://raw.github.com/Islandora/islandora_drupal_filter/master/filter-drupal.xml), then modify the attributes of the <connection>  tag to match the server, port, database name, username and password of your site's Drupal database.

...

Warning

If you use the Drupal servlet filter to connect to multiple Drupal databases there is potential for users with the same username in each database to access each others private objects. To avoid this, use the Drupal LDAP module. A Drupal multi-site environment utilizing the LDAP module for all sites ensures a unique username/site configuration.

4. Stop and Restart tomcat to load the filter

This will enable the Drupal Servlet Filter.

Code Block
# $FEDORA_HOME/tomcat/bin/shutdown.sh

# $FEDORA_HOME/tomcat/bin/startup.sh

5. Test the Drupal Servlet Filter

This Python script was developed to verify the database connection(s) defined in filter-drupal.xml files. The script is available at:

...

If you don't get the a successful set of tests, please retrace your steps.

Create a milestone 3 snapshot backup:

Code Block
# $FEDORA_HOME/tomcat/bin/shutdown.sh
# /etc/init.d/mysql stop
# /etc/init.d/apache2 stop

# cd /usr/local 
# tar -cvzf fedora-milestone3.tar.gz fedora

# cd /var/lib 
# tar -cvzf mysql-milestone3.tar.gz mysql

# cd /var/www
# tar -cvzf drupal-milestone3.tar.gz drupal

# /etc/init.d/mysql start
# $FEDORA_HOME/tomcat/bin/startup.sh
# /etc/init.d/apache2 start