mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 22:13:08 +00:00

git-svn-id: http://scm.dspace.org/svn/repo/trunk@1341 9c30dcfa-912a-0410-8fc2-9e0234be79fd
699 lines
44 KiB
HTML
699 lines
44 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html>
|
|
<head>
|
|
<title>DSpace System Documentation: Configuration and Customization</title>
|
|
<link rel="StyleSheet" href="style.css" type="text/css">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
</head>
|
|
|
|
<body>
|
|
<h1>DSpace System Documentation: Configuration and Customization</h1>
|
|
|
|
<p><a href="index.html">Back to contents</a></p>
|
|
|
|
<p>There are a number of ways in which DSpace can be configured and/or customized:</p>
|
|
|
|
<ul>
|
|
<li>Altering the configuration files in <code><i>[dspace]</i>/config</code></li>
|
|
|
|
<li>Creating modified versions of the JSPs; these can be placed separately from and override the default installed JSPs, so that future updates of the code won't overwrite your changes</li>
|
|
|
|
<li>Implementing a custom 'authenticator' class, so that user authentication in the Web UI can be adapted and integrated with any existing mechanisms your organization might use</li>
|
|
|
|
<li>Editing the source code</li>
|
|
</ul>
|
|
|
|
<p>Of these methods, only the last is likely to cause any headaches; if you update the DSpace source code directly, it may make applying future updates difficult. However, DSpace is open source, of course, and if you make any modifications that might be helpful to other institutions or organizations, feel free to send them to the DSpace team at MIT.</p>
|
|
|
|
<h2><a name="dspacecfg" id="dspacecfg">The <code>dspace.cfg</code> Configuration Properties File</a></h2>
|
|
|
|
<p>The primary way of configuring DSpace is to edit the <code>dspace.cfg</code>. You'll definitely have to do this before you can operate DSpace properly. <code>dspace.cfg</code> contains basic information about a DSpace installation, including system path information, network host information, and other things like site name.</p>
|
|
|
|
<p>The default <code>dspace.cfg</code> is a good source of information, and contains comments for all properties. It's a basic Java properties file, where lines are either comments, starting with a '<code>#</code>', blank lines, or property/value pairs of the form:</p>
|
|
<pre>
|
|
property.name = property value
|
|
</pre>
|
|
|
|
<p>Due to time constraints, this document does not contain an exhaustive list of properties; they are all listed in the supplied <code>dspace.cfg</code>. Below are some particularly relevant properties with notes for their use:</p>
|
|
|
|
<table>
|
|
<caption>
|
|
<code>dspace.cfg</code> Main Properties (Not Complete)
|
|
</caption>
|
|
|
|
<tbody>
|
|
<tr>
|
|
<th>Property</th>
|
|
|
|
<th>Example Values</th>
|
|
|
|
<th>Notes</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><code>dspace.dir</code></td>
|
|
|
|
<td><code>/dspace</code></td>
|
|
|
|
<td>Root directory of DSpace installation. Omit the trailing '/'. Note that if you change this, there are several other parameters you will probably want to change to match, e.g. <code>assetstore.dir</code>.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><code>dspace.url</code></td>
|
|
|
|
<td><code>http://dspace.myu.edu</code><br>
|
|
<code>http://dspacetest.myu.edu:8080</code></td>
|
|
|
|
<td>Main URL at which DSpace Web UI webapp is deployed. Include any port number, but do not include a trailing '/'</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><code>dspace.hostname</code></td>
|
|
|
|
<td><code>dspace.myu.edu</code></td>
|
|
|
|
<td>Fully qualified hostname; do not include port number</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><code>dspace.name</code></td>
|
|
|
|
<td><code>DSpace at My University</code></td>
|
|
|
|
<td>Short and sweet site name, used throughout Web UI, e-mails and elsewhere (such as OAI protocol)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><code>config.template.foo</code></td>
|
|
|
|
<td><code>/opt/othertool/cfg/foo</code></td>
|
|
|
|
<td>When <code>install-configs</code> is run, the file <code><i>[dspace]</i>/config/templates/foo</code> file will be filled out with values from <code>dspace.cfg</code> and copied to the value of this property, in this example <code>/opt/othertool/cfg/foo</code>. <a href="#templates">See here for more information.</a></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><code>plugin.sequence.org.dspace.eperson.AuthenticationMethod</code></td>
|
|
|
|
<td><code>org.dspace.eperson.X509Authentication, org.dspace.eperson.PasswordAuthentication</code></td>
|
|
|
|
<td>Comma-separated list of classes implementing the <code>org.dspace.eperson.AuthenticationMethod</code> interface, which make up the <a href="#authenticate">authentication stack</a>. Authentication methods are called on in the order listed.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><code>authentication.x509.keystore.path</code></td>
|
|
|
|
<td><code>/tomcat/conf/keystore</code></td>
|
|
|
|
<td>Path to Java keystore containing Client CA's certificiate for client X.509 certificates (Optional; only needed if X.509 user authentication is used.)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><code>authentication.x509.keystore.password</code></td>
|
|
|
|
<td><code>changeit</code></td>
|
|
|
|
<td>Password to Java keystore configured above in <code>authentication.x509.keystore.path</code></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><code>handle.prefix</code></td>
|
|
|
|
<td><code>1721.1234</code></td>
|
|
|
|
<td>The Handle prefix for your site, <a href="install.html#handles">see the Handle section</a></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><code>assetstore.dir</code></td>
|
|
|
|
<td><code>/bigdisk/store</code></td>
|
|
|
|
<td>The location in the file system for asset (bitstream) store number zero. This should be a directory for the sole use of DSpace.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><code>assetstore.dir.n</code></td>
|
|
|
|
<td><code>/anotherdisk/store1</code></td>
|
|
|
|
<td>The location in the file system of asset (bitstream) store number <code>n</code>. When adding additional stores, start with 1 (<code>assetstore.dir.1</code> and count upwards. Always leave asset store zero (<code>assetstore.dir</code>). For more details, see <a href="storage.html#bitstreams">the Bitstream Storage section</a>.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><code>assetstore.incoming</code></td>
|
|
|
|
<td><code>1</code></td>
|
|
|
|
<td>The asset store number to use for storing new bitstreams. For example, if <code>assetstore.dir.1</code> is <code>/anotherdisk/store1</code>, and <code>assetstore.incoming</code> is <code>1</code>, new bitstreams will be stored under <code>/anotherdisk/store1</code>. A value of <code>0</code> (zero) corresponds to <code>assetstore.dir</code>. For more details, see <a href="storage.html#bitstreams">the Bitstream Storage section</a>.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><span style="font-family: monospace;">srb.xxx</span><br style="font-family: monospace;">
|
|
<span style="font-family: monospace;">srb.xxx.n</span><br></td>
|
|
|
|
<td><span style="font-family: monospace;">/zone/home/user.domain</span><br></td>
|
|
|
|
<td>The sets of SRB access parameters (see <span style="font-family: monospace;">dspace.cfg</span>) if one or more SRB accounts are used. The <span style="font-family: monospace;">srb.xxx</span> set would correspond to asset (bitstream) store number zero. The <span style="font-family: monospace;">srb.xxx.n</span> set would correspond to asset (bitstream) store number <span style="font-family: monospace;">n</span>. For more details, see <a href="storage.html#bitstreams">the Bitstream Storage section</a>.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><code>webui.submit.enable-cc</code></td>
|
|
|
|
<td><code>true</code></td>
|
|
|
|
<td>Enable the Creative Commons license step in the submission process. Submitters are given an opportunity to select a Creative Commons license to accompany the Item. Creative Commons licenses govern the use of the content. For more details, see <a href="http://creativecommons.org">the Creative Commons website</a>.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>Whenever you edit <code>dspace.cfg</code>, you should then run <code><i>[dspace]</i>/bin/install-configs</code> so that any changes you may have made are reflected in the configuration files of other applications, for example Apache. You may then need to restart those applications, depending on what you changed.</p>
|
|
|
|
<h2><a name="email" id="email">Wording of E-mail Messages</a></h2>
|
|
|
|
<p>Sometimes DSpace automatically sends e-mail messages to users, for example to inform them of a new workflow task, or as a subscription e-mail alert. The wording of emails can be changed by editing the relevant file in <code><i>[dspace]</i>/config/emails</code>. Each file is commented. Be careful to keep the right number 'placeholders' (e.g.<code>{2}</code>).</p>
|
|
|
|
<h2><a name="admincontact" id="admincontact">Local DSpace Administrator Contact Information</a></h2>
|
|
|
|
<p>There are several places in DSpace in which the user will be shown contact information for the local DSpace Administrator: for instance, when an error occurs, or in the on-line help when the user is looking for more information. The contact information is displayed by <code><i>[dspace-source]</i>/jsp/components/contact-info.jsp.</code> This JSP retrieves the help e-mail in dspace.cfg, but the phone number in the JSP is a dummy phone number that needs to be edited directly in the JSP. You should be sure to edit this file (adding any additional information you feel might be useful) so that users know who to contact for further information.</p>
|
|
|
|
<h2><a name="registries" id="registries">The Dublin Core and Bitstream Format Registries</a></h2>
|
|
|
|
<p>The <code><i>[dspace]</i>/config/registries</code> directory contains two XML files. These are used to load the <em>initial</em> contents of the Dublin Core type registry and Bitstream Format registry. After the initial loading (performed by <code>ant fresh_install</code> above), the registries reside in the database; the XML files are not updated.</p>
|
|
|
|
<p>Currently, the system requires that every item have a Dublin Core record. The exact Dublin Core elements and qualifiers that are used can be configured by editing the Dublin Core registry. This can either be done at install-time, by editing <code><i>[dspace]</i>/config/registries/dublin-core-types.xml</code>, or at run-time using the administration Web UI. However, note that some elements and qualifiers must be present for DSpace to function correctly since they are used for various purposes by the code. Details are in the relevant <code>.xml</code> file.</p>
|
|
|
|
<p>Also note that altering the Dublin Core registry does not, at the current time, cause corresponding changes in the Web UI (e.g. the submission interface or search indices).</p>
|
|
|
|
<p>The bitstream formats recognized by the system and levels of support are similarly stored in the bitstream format registry. This can also be edited at install-time via <code><i>[dspace]</i>/config/registries/bitstream-formats.xml</code> or by the administation Web UI. The contents of the bitstream format registry are entirely up to you, though the system requires that the following two formats are present:</p>
|
|
|
|
<ul>
|
|
<li><code>Unknown</code></li>
|
|
|
|
<li><code>License</code></li>
|
|
</ul>
|
|
|
|
<h2><a name="crosswalks" id="crosswalks">Activating Additional Crosswalks</a></h2>
|
|
|
|
<p>DSpace comes with an unqualified DC Crosswalk used in the default OAI-PMH data provider. There are also other Crosswalks bundled with the DSpace distribution which can be activated by editing one or more configuration files. How to do this for each available Crosswalk is described below.</p>
|
|
|
|
<h3>METS</h3>
|
|
<p>The METS Crosswalk can be activated as follows:
|
|
<ul>
|
|
<li>Uncomment the METS Crosswalk entry from the <code>config/templates/oaicat.properties</code> file</li>
|
|
<li>Run the <code>bin/install-configs</code> script</li>
|
|
<li>Restart Tomcat</li>
|
|
<li>Verify the Crosswalk is activated by accessing a URL such as <code>http://mydspace/dspace-oai/request?verb=ListRecords&metadataPrefix=mets</code></li>
|
|
</ul>
|
|
</p>
|
|
|
|
<h3>DIDL</h3>
|
|
<p>By activating the DIDL provider, DSpace items are represented as MPEG-21 DIDL objects. These DIDL objects are XML documents that wrap both the Dublin Core metadata that describes the DSpace item and its actual bitstreams. A bitstream is provided inline in the DIDL object in a base64 encoded manner, and/or by means of a pointer to the bitstream. The data provider exposes DIDL objects via the metadataPrefix didl.</p>
|
|
<p>The crosswalk does not deal with special characters and purposely skips dissemination of the <code>license.txt</code> file awaiting a better understanding on how to map DSpace rights information to MPEG21-DIDL.</p>
|
|
</p>
|
|
<p>The DIDL Crosswalk can be activated as follows:
|
|
<ul>
|
|
<li>Uncomment the <code>oai.didl.maxresponse</code> item in <code>dspace.cfg</code></li>
|
|
<li>Uncomment the DIDL Crosswalk entry from the <code>config/templates/oaicat.properties</code> file</li>
|
|
<li>Run the <code>bin/install-configs</code> script</li>
|
|
<li>Restart Tomcat</li>
|
|
<li>Verify the Crosswalk is activated by accessing a URL such as <code>http://mydspace/dspace-oai/request?verb=ListRecords&metadataPrefix=didl</code></li>
|
|
</ul>
|
|
</p>
|
|
|
|
<h2><a name="templates" id="templates">Configuration Files for Other Applications</a></h2>
|
|
|
|
<p>To ease the hassle of keeping configuration files for other applications involved in running a DSpace site, for example Apache, in sync, the DSpace system can automatically update them for you when the main DSpace configuration is changed. This feature of the DSpace system is entirely optional, but we found it useful.</p>
|
|
|
|
<p>The way this is done is by placing the configuration files for those applications in <code><i>[dspace]</i>/config/templates</code>, and inserting special values in the configuration file that will be filled out with appropriate DSpace configuration properties. Then, tell DSpace where to put filled-out, 'live' version of the configuration by adding an appropriate property to <code>dspace.cfg</code>, and run <code><i>[dspace]</i>/bin/install-configs</code>.</p>
|
|
|
|
<p>Take the <code>apache13.conf</code> file as an example. This contains plenty of Apache-specific stuff, but where it uses a value that should be kept in sync across DSpace and associated applications, a 'placeholder' value is written. For example, the host name:</p>
|
|
<pre>
|
|
ServerName @@dspace.hostname@@
|
|
</pre>
|
|
|
|
<p>The text <code>@@dspace.hostname@@</code> will be filled out with the value of the <code>dspace.hostname</code> property in <code>dspace.cfg</code>. Then we decide where we want the 'live' version, that is, the version actually read in by Apache when it starts up, will go.</p>
|
|
|
|
<p>Let's say we want the live version to be located at <code>/opt/apache/conf/dspace-httpd.conf</code>. To do this, we add the following property to <code>dspace.cfg</code> so DSpace knows where to put it:</p>
|
|
<pre>
|
|
config.template.apache13.conf = /opt/apache/conf/dspace-httpd.conf
|
|
</pre>
|
|
|
|
<p>Now, we run <code><i>[dspace]</i>/bin/install-configs</code>. This reads in <code><i>[dspace]</i>/config/templates/apache13.conf</code>, and places a copy at <code>/opt/apache/conf/dspace-httpd.conf</code> with the placeholders filled out.</p>
|
|
|
|
<p>So, in <code>/opt/apache/conf/dspace-httpd.conf</code>, there will be a line like:</p>
|
|
<pre>
|
|
ServerName dspace.myu.edu
|
|
</pre>
|
|
|
|
<p>The advantage of this approach is that if a property like the hostname changes, you can just change it in <code>dspace.cfg</code> and run <code>install-configs</code>, and all of your tools' configuration files will be updated.</p>
|
|
|
|
<p>However, take care to make all your edits to the versions in <code><i>[dspace]</i>/config/templates</code>! It's a wise idea to put a big reminder at the top of each file, since someone might unwittingly edit a 'live' configuration file which would later be overwritten.</p>
|
|
|
|
<h2><a name="customui" id="customui">Customizing the Web User Interface</a></h2>
|
|
|
|
<p>The Web UI is implemented using Java Servlets which handle the business logic, and JavaServer Pages (JSPs) which produce the HTML pages sent to an end-user. Since the JSPs are much closer to HTML than Java code, altering the look and feel of DSpace is relatively easy.</p>
|
|
|
|
<p>To make it even easier, DSpace allows you to 'override' the JSPs included in the source distribution with modified versions, that are stored in a separate place, so when it comes to updating your site with a new DSpace release, your modified versions will not be overwritten.</p>
|
|
|
|
<p>You can also easily edit the text that appears on each JSP page by editing the dictionary file. However, note that unless you change the entry in all of the different language message files, users of other languages will still see the default text for their language. See <A HREF="application.html#i18n">internationalization</A>.</P>
|
|
|
|
<p>Note that the data (attributes) passed from an underlying Servlet to the JSP may change between versions, so you may have to modify your customized JSP to deal with the new data.</p>
|
|
|
|
<p>Thus, if possible, it is recommeded you limit your changes to the 'layout' JSPs and the stylesheet.</P>
|
|
|
|
<p>The JSPs are stored in <code><i>[dspace-source]</i>/jsp</code>. Place your edited version of a JSP in the <code><i>[dspace-source]</i>/jsp/local</code> directory, with the same path as the original. If they exist, these will be used in preference to the distributed versions in <code><i>[dspace-source]</i>/jsp</code>. For example:</p>
|
|
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<th>DSpace default</th>
|
|
|
|
<th>Locally-modified version</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><code><i>[dspace-source]</i>/jsp/community-list.jsp</code></td>
|
|
|
|
<td><code><i>[dspace-source]</i>/jsp/local/community-list.jsp</code></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><code><i>[dspace-source]</i>/jsp/mydspace/main.jsp</code></td>
|
|
|
|
<td><code><i>[dspace-source]</i>/jsp/local/mydspace/main.jsp</code></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>Heavy use is made of a style sheet, in <code><i>[dspace-source]</i>/jsp/styles.css.jsp</code>. If you make edits, call the local version <code><i>[dspace-source]</i>/jsp/local/styles.css.jsp</code>, and it will be used automatically in preference to the default, as described above.</p>
|
|
|
|
<p>Fonts and colors can be easily changed using the stylesheet. The stylesheet is a JSP so that the user's browser version can be detected and the stylesheet tweaked accordingly.</p>
|
|
|
|
<p>The 'layout' of each page, that is, the top and bottom banners and the navigation bar, are determined by the JSPs <code><i>[dspace-source]</i>/jsp/layout/header-*.jsp</code> and <code><i>[dspace-source]</i>/jsp/layout/footer-*.jsp</code>. You can provide modified versions of these (in <code><i>[dspace-source]</i>/jsp/local/layout</code>, or define more styles and apply them to pages by using the "style" attribute of the <code>dspace:layout</code> tag.</p>
|
|
|
|
<p>After you've customized your JSPs, <strong>you must rebuild the DSpace Web application</strong>. If you haven't already built and installed it, follow the <a href="install.html">install</a> directions. Otherwise, follow the steps below:</p>
|
|
|
|
<ol>
|
|
<li>
|
|
<p>Rebuild the <code>dspace.war</code> file by running the following command from your <code><i>[dspace-source]</i></code> directory:</p>
|
|
<pre>
|
|
ant -Dconfig=<i>[dspace]</i>/config/dspace.cfg build_wars
|
|
</pre>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Shut down Tomcat, and delete the existing <i>[tomcat]</i>/webapps/dspace directory.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Copy the new .war file to the Tomcat webapps directory:</p>
|
|
<pre>
|
|
cp <i>[dspace-source]</i>/build/dspace.war <i>[tomcat]</i>/webapps
|
|
</pre>
|
|
</li>
|
|
</ol>
|
|
|
|
<p>When you restart the web server you should see your customized JSPs.</p>
|
|
|
|
<h2><a name="customsimpleitem" id="customsimpleitem">Customizing the Simple Item Display Metadata</a></h2>
|
|
|
|
<h3>Customizing the Default Simple Item Display Metadata</h3>
|
|
|
|
<p>In <code>dspace.cfg</code> create a <code>webui.itemdisplay.default</code> item specifying a comma-separated list of metadata fields to display. For example, <p><code>webui.itemdisplay.default = dc.title, date.issued(date), identifier.uri(link), description.*</code></p> will set the default simple item display to show the title, issue date (in date format), handle URI (rendered as a link) and all DC description metadata. If no <code>webui.itemdisplay.default</code> is present, the default defers to a preset list hard-coded in DSpace. If an item has no value for a particular field, it won't be displayed.</p>
|
|
|
|
<p>Add entries to the <code>Messages.properties</code> file as required. The name of the field for display will be drawn from the current UI dictionary, using the key <code>metadata.<metadata field></code>. For example <code>metadata.dc.title = Title</code>
|
|
|
|
<p>The metadata in <code>dspace.cfg</code> can be specified in the form <code><schema prefix>.<element>[.<qualifier>|.*][(date)|(link)], ...</code>. For example,
|
|
<ul>
|
|
<li>dc.title refers to unqualifed Dublin Core (DC) 'title' element</li>
|
|
<li>dc.title.alternative refers to the qualified DC element 'title.alternative'</li>
|
|
<li>dc.title.* refers to all DC 'title' elements (i.e. any or no qualifier)</li>
|
|
<li>dc.identifier.url refers to DC 'identifier.uri' and render as a link</li>
|
|
<li>dc.identifier.url refers to DC 'date.issued' and render as a date</li>
|
|
</ul>
|
|
</p>
|
|
|
|
<h3>Customizing the Simple Item Display Metadata for Individual Collections</h3>
|
|
|
|
<p>Create <code>dspace.cfg</code> entries for each of the "styles" of item display in the same way the default layout is configured. For example,
|
|
<p>
|
|
<code>webui.itemdisplay.thesis-style = contributor.*, identifier.uri, description.abstract</code>
|
|
</p>
|
|
Then associate this simple item display with collections using an additional <code>dspace.cfg</code> item. For example,
|
|
<p>
|
|
<code>webui.itemdisplay.thesis-style.collections = 123456789/1, 123456789/56</code>
|
|
</p>
|
|
Don't forget to add any required message keys to the <code>Messages.properties</code> file. In the above example, the <code>Messages.properties</code> file would need to contain something like:
|
|
<p>
|
|
metadata.dc.contributor.* = Authors
|
|
<br/>
|
|
metadata.dc.identifier.uri = Citation
|
|
<br/>
|
|
metadata.dc.description.abstract = Abstract
|
|
</p>
|
|
<p>
|
|
|
|
<h2><a name="authenticate" id="authenticate">Custom Authentication Code</a></h2>
|
|
|
|
<p>Since many institutions and organizations have exisiting authentication systems, DSpace has been designed to allow these to be easily integrated.
|
|
It keeps a series, or "stack", of <em>authentication methods</em>, so
|
|
each one can be tried in turn. This makes it easy to add new
|
|
authentication methods or rearrange the order without changing any
|
|
existing code. You can also share authentication code with other sites.</p>
|
|
|
|
<p>An authentication method is a class that implements the
|
|
interface <code>org.dspace.eperson.AuthenticationMethod</code>.
|
|
It <em>authenticates</em> a user by evaluating the <em>credentials</em>
|
|
(e.g. username and password) he or she presents and
|
|
checking that they are valid.</p>
|
|
|
|
<p>The basic authentication procedure in the DSpace Web UI is this:</p>
|
|
|
|
<ol>
|
|
<li>A request is received from an end-user's browser that, if fulfilled, would lead to an action requiring authorization taking place.</li>
|
|
|
|
<li>If the end-user is already authenticated:
|
|
|
|
<ul>
|
|
<li>If the end-user is allowed to perform the action, the action proceeds</li>
|
|
|
|
<li>If the end-user is NOT allowed to perform the action, an authorization error is displayed.</li>
|
|
|
|
<li>If the end-user is NOT authenticated, i.e. is accessing DSpace anonymously:</li>
|
|
</ul>
|
|
|
|
<li>The parameters etc. of the request are stored</li>
|
|
|
|
<li>The Web UI's <code>startAuthentication</code> method is invoked.</li>
|
|
|
|
<li>First it tries all the authentication methods which do <em>implicit</em>
|
|
authentication (i.e. they work with just the information already
|
|
in the Web request, such as an X.509 client certificate). If one
|
|
of these succeeds, it proceeds from Step 2 above.</li>
|
|
|
|
<li>If none of the implicit methods succeed, the UI responds by putting
|
|
up a "login" page to collect credentials for one of the
|
|
<em>explicit</em> authentication methods in the stack. The servlet
|
|
processing that page then
|
|
gives the proffered credentials to each authentication method in turn
|
|
until one succeeds, at which point it
|
|
retries the original operation from Step 2 above.</li>
|
|
</ol>
|
|
|
|
<p>Please see the source files <code>AuthenticationManager.java</code> and <code>AuthenticationMethod.java</code> for more details about this mechanism.
|
|
|
|
<h3>Authentication by Password</h3>
|
|
|
|
<p>The default method <code>org.dspace.eperson.PasswordAuthentication</code> has the following properties:
|
|
|
|
<ul>
|
|
<li>
|
|
<p>Use of inbuilt e-mail address/password-based log-in. This is achieved by forwarding a request that is attempting an action requiring authorization to the password log-in servlet, <code>/password-login</code>. The password log-in servlet (<code>org.dspace.app.webui.servlet.PasswordServlet</code> contains code that will resume the original request if authentication is successful, as per step 3. described above.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Users can register themselves (i.e. add themselves as e-people without needing approval from the administrators), and can set their own passwords when they do this</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Users are not members of any special (dynamic) e-person groups</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>LDAP Authentication</h3>
|
|
|
|
<p>As of version 1.3, the authentication method <code>org.dspace.eperson.LDAPAuthentication</code> is also supplied to support <A HREF="#ldap">LDAP authentication</A>.</P>
|
|
|
|
<h3>X.509 Certificate Authentication</h3>
|
|
|
|
<p>The X509 certificate authentication method has an extra feature: If the <code>authentication.x509.autoregister</code> configuration property is <code>true</code>, it will automatically register the user with the system.</p>
|
|
|
|
<h3>Example of Custom Authentication</h3>
|
|
|
|
<p>Also included in the source is an implementation of an authentication method used at MIT, <code>edu.mit.dspace.MITSpecialGroup</code>.
|
|
This does not actually authenticate a user, it <em>only</em>
|
|
adds the current user to a special (dynamic) group called 'MIT
|
|
Users' (which must be present in the system!). This allows us to
|
|
create authorization policies for MIT users without having to
|
|
manually maintain membership of the MIT users group.</p>
|
|
|
|
<p>By keeping this code in a separate method, we can customize the
|
|
authentication process for MIT by simply adding it to the stack in
|
|
the DSpace configuration. None of the code has to be touched.
|
|
|
|
<p>You can create your own custom authentication method and add it to
|
|
the stack. Use the most similar existing method as a model, e.g.
|
|
<code>org.dspace.eperson.PasswordAuthentication</code> for an "explicit"
|
|
method (with credentials entered interactively) or
|
|
<code>org.dspace.eperson.X509Authentication</code> for an implicit
|
|
method.</p>
|
|
|
|
|
|
<h2><a name="ldap" id="ldap">Configuring LDAP Authentication</a></h2>
|
|
|
|
<p>You can enable LDAP authentication by adding its method to the
|
|
stack in the DSpace configuration, e.g.
|
|
<pre>plugin.sequence.org.dspace.eperson.AuthenticationMethod = org.dspace.eperson.LDAPAuthentication</pre></p>
|
|
|
|
<p>If LDAP is enabled in the dspace.cfg file, then new users will be able to register by entering their username and password without being sent the registration token. If users do not have a username and password, then they can still register and login with just their email address the same way they do now.</p>
|
|
|
|
<p>If you want to give any special privileges to LDAP users, you will still need to extend the SiteAuthenticator class to automatically put people who have a netid into a special group. You might also want to give certain email addresses special privileges. Refer to the <a href="#authenticate">Custom Authentication Code</a> section above for more information about how to do this.</p>
|
|
|
|
<p>Here is an explanation of what each of the different configuration parameters are for:</p>
|
|
|
|
<ul>
|
|
<li><b>ldap.enable</b><br>
|
|
This setting will enable or disable LDAP authentication in DSpace. With the setting off, users will be required to register and login with their email address. With this setting on, users will be able to login and register with their LDAP user ids and passwords.</li>
|
|
|
|
<li><b>webui.ldap.autoregister</b><br>
|
|
This will turn LDAP autoregistration on or off. With this on, a new EPerson object will be created for any user who successfully authenticates against the LDAP server when they first login. With this setting off, the user must first register to get an EPerson object by entering their ldap username and password and filling out the forms.</li>
|
|
|
|
<li><b>ldap.provider_url = ldap://ldap.myu.edu/o=myu.edu</b><br>
|
|
This is the url to your institution's ldap server. You may or may not need the /o=myu.edu part at the end. Your server may also require the ldaps:// protocol.</li>
|
|
|
|
<li><b>ldap.id_field = uid</b><br>
|
|
This is the unique identifier field in the LDAP directory where the username is stored.</li>
|
|
|
|
<li><b>ldap.object_context = ou=people,o=myu.edu</b><br>
|
|
This is the object context used when authenticating the user. It is appended to the ldap.id_field and username. For example uid=username,ou=people,o=myu.edu. You will need to modify this to match your ldap configuration.</li>
|
|
|
|
<li><b>ldap.search_context = ou=people</b><br>
|
|
This is the search context used when looking up a user's ldap object to retrieve their data for autoregistering. With ldap.autoregister turned on, when a user authenticates without an EPerson object we search the ldap directory to get their name and email address so that we can create one for them. So after we have authenticated against uid=username,ou=people,o=byu.edu we now search in ou=people for filtering on [uid=username]. Often the ldap.search_context is the same as the ldap.object_context parameter. But again this depends on your ldap server configuration.</li>
|
|
|
|
<li><b>ldap.email_field = mail</b><br>
|
|
This is the ldap object field where the user's email address is stored. "mail" is the default and the most common for ldap servers. If the mail field is not found the username will be used as the email address when creating the eperson obejct.</li>
|
|
|
|
<li><b>ldap.surname_field = sn</b><br>
|
|
This is the ldap object field where the user's last name is stored. "sn" is the default and is the most common for ldap servers. If the field is not found the field will be left blank in the new eperson object.</li>
|
|
|
|
<li><b>ldap.givenname_field = givenName</b><br>
|
|
This is the ldap object field where the user's given names are stored. I'm not sure how common the givenName field is in different ldap instances. If the field is not found the field will be left blank in the new eperson object.</li>
|
|
|
|
<li><b>ldap.phone_field = telephoneNumber</b><br>
|
|
This is the field where the user's phone number is stored in the ldap directory. If the field is not found the field will be left blank in the new eperson object.</li>
|
|
</ul>
|
|
|
|
<h2><a name="search-index" id="search-index">Configuring Lucene Search Indexes</a></h2>
|
|
|
|
<p>(Available in DSpace 1.2.1+)</p>
|
|
|
|
<p>Search Indexes can be configured via the <code>dspace.cfg</code> file. This allows institutions to choose which DSpace metadata fields are indexed by Lucene.</p>
|
|
|
|
<p>For example, the following entries appear in a default DSpace installation:
|
|
<pre>
|
|
search.index.1 = author:contributor.*
|
|
search.index.2 = author:creator.*
|
|
search.index.3 = title:title.*
|
|
search.index.4 = keyword:subject.*
|
|
search.index.5 = abstract:description.abstract
|
|
search.index.6 = author:description.statementofresponsibility
|
|
search.index.7 = series:relation.ispartofseries
|
|
search.index.8 = abstract:description.tableofcontents
|
|
search.index.9 = mime:format.mimetype
|
|
search.index.10 = sponsor:description.sponsorship
|
|
search.index.11 = id:identifier.*
|
|
</pre>
|
|
</p>
|
|
|
|
<p>The form of each entry is <code>search.index.<id> = <search field>:<metadata field></code> where:
|
|
<ul>
|
|
<li><code><id></code> is an incremental number to distinguish each search index entry</li>
|
|
<li><code><search field></code> is an identifier for the search field this index will correspond to</li>
|
|
<li><code><metadata field></code> is the DSpace metadata field to be indexed</li>
|
|
</ul>
|
|
<p>So in the example above, search.indexes1, 2 and 6 are configured as the <code>author</code> search field. The <code>author</code> index is created by Lucene indexing all <code>contributor</code>, <code>creator</code> and <code>description.statementofresponsibility</code> medatata fields.</p>
|
|
<p>After changing the configuration, run <code>index-all</code> to recreate the indexes.</p>
|
|
</p>
|
|
|
|
<p><strong>NOTE:</strong> While the indexes are created, this only affects the search results and has no effect on the search components of the user interface. To add new search capability (e.g. to add a new search category to the Advanced Search) requires local customisation to the user interface.</p>
|
|
|
|
<h2><a name="statistics" id="statistics">Configuring System Statistical Reports</a></h2>
|
|
|
|
<p>Statistics for the system can be made available at <code>http://www.mydspaceinstance.edu/statistics</code>. To use the system statistics you will have to initialise them as per the installation documentation, but before you do so you need to perform the customisations discussed here in order to ensure that the reports are generated correctly.</p>
|
|
|
|
<h3>Configuration File</h3>
|
|
|
|
<p>Configuration for the statistics system are in <code>[dspace]/config/dstat.cfg</code> and the file should guide you to correctly filling in the details required. For the most part you will not need to change this file.</p>
|
|
|
|
<h3>Customising Shell Scripts</h3>
|
|
|
|
<p>To customise the supplied perl scripts to do monthly and general report generation it is necessary to modify the scripts themselves sightly. This is because these scripts were developed to speed up the process of using DStat at Edinburgh University Library and were not particularly intended for external use. They appear here for the convenience of others and in order to bridge the gap between the report generation and the inclusion of those reports into the DSpace UI, which is currently a clunky process.</p>
|
|
|
|
<p>In order to get these scripts to work for you, open each of the following in turn:</p>
|
|
<pre>
|
|
dstat-general
|
|
dstat-initial
|
|
dstat-monthly
|
|
dstat-report-general
|
|
dstat-report-initial
|
|
dstat-report-monthly
|
|
</pre>
|
|
|
|
<p>scripts eding with <code>-general</code> do the work for building reports spanning the entire history of the archive; scripts ending <code>-initial</code> are to initialise the reports by doing monthly reports from some start date up to the present; scripts ending <code>-monthly</code> generate a single monthly report <em>for the current month</em>. These scripts are just designed to make life easier, and are not particularly clever or elegant.</p>
|
|
|
|
<p>In each file you will find a section:</p>
|
|
<pre>
|
|
# Details used
|
|
################################################
|
|
|
|
... some perl ...
|
|
|
|
################################################
|
|
</pre>
|
|
|
|
<p>the perl between the lines of hashes defines the variables which will be used to do all of the processing in the report. The following explains what the variables mean and what they should be set to for each of the scripts</p>
|
|
|
|
<p><strong>dstat-initial:</strong><br>
|
|
<code>$out_prefix</code>: prefix to place in front of each output file.<br>
|
|
<code>$out_suffix</code>: suffix for output file. A date will be inserted between the prefix and suffix<br>
|
|
<code>$start_year</code>: year to start back-analysing monthly logs from<br>
|
|
<code>$start_month</code>: month to start back-analysing monthly logs from<br>
|
|
<code>$dsrun</code>: path to your dsrun script, usually <code>[dspace]/bin/dsrun</code><br>
|
|
<code>$out_directory</code>: directory into which to place analysis files, for example <code>[dspace]/bin/log/</code><br></p>
|
|
|
|
<p><strong>dstat-monthly:</strong><br>
|
|
<code>$out_prefix</code>: prefix to place in front of each output file.<br>
|
|
<code>$out_suffix</code>: suffix for output file. A date will be inserted between the prefix and suffix<br>
|
|
<code>$dsrun</code>: path to your dsrun script, usually <code>[dspace]/bin/dsrun</code><br>
|
|
<code>$out_directory</code>: directory into which to place analysis files, for example <code>[dspace]/bin/log/</code><br></p>
|
|
|
|
<p><strong>dstat-general:</strong><br>
|
|
<code>$out_prefix</code>: prefix to place in front of each output file.<br>
|
|
<code>$out_suffix</code>: suffix for output file. Today's date will be inserted between the prefix and suffix<br>
|
|
<code>$dsrun</code>: path to your dsrun script, usually <code>[dspace]/bin/dsrun</code><br>
|
|
<code>$out_directory</code>: directory into which to place analysis files, for example <code>[dspace]/bin/log/</code><br></p>
|
|
|
|
<p><strong>dstat-report-initial:</strong><br>
|
|
<code>$in_prefix</code>: the prefix of the files generated by dstat-initial<br>
|
|
<code>$in_suffix</code>: the suffix of the files generated by dstat-initial<br>
|
|
<code>$out_prefix</code>: the report file prefix. Should be "<code>report-</code>" in order to work with DSpace UI<br>
|
|
<code>$out_suffix</code>: the report file suffix. Should be "<code>.html</code>" in order to work with DSpace UI<br>
|
|
<code>$start_year</code>: the start year used in dstat-initial<br>
|
|
<code>$start_month</code>: the start month used in dstat-initial<br>
|
|
<code>$dsrun</code>: path to your dsrun script, usually <code>[dspace]/bin/dsrun</code><br>
|
|
<code>$in_directory</code>: directory where analysis files were placed in dstat-initial<br>
|
|
<code>$out_directory</code>: the live reports directory: <code>[dspace]/reports/</code><br></p>
|
|
|
|
<p><strong>dstat-report-monthly:</strong><br>
|
|
<code>$in_prefix</code>: the prefix of the files generated by dstat-monthly<br>
|
|
<code>$in_suffix</code>: the suffix of the files generated by dstat-monthly<br>
|
|
<code>$out_prefix</code>: the report file prefix. Should be "<code>report-</code>" in order to work with DSpace UI<br>
|
|
<code>$out_suffix</code>: the report file suffix. Should be "<code>.html</code>" in order to work with DSpace UI<br>
|
|
<code>$dsrun</code>: path to your dsrun script, usually <code>[dspace]/bin/dsrun</code><br>
|
|
<code>$in_directory</code>: directory where analysis files were placed in dstat-monthly<br>
|
|
<code>$out_directory</code>: the live reports directory: <code>[dspace]/reports/</code><br></p>
|
|
|
|
<p><strong>dstat-report-general:</strong><br>
|
|
<code>$in_prefix</code>: the prefix of the files generated by dstat-general<br>
|
|
<code>$in_suffix</code>: the suffix of the files generated by dstat-general<br>
|
|
<code>$out_prefix</code>: the report file prefix. Should be "<code>report-general-</code>" in order to work with DSpace UI<br>
|
|
<code>$out_suffix</code>: the report file suffix. Should be "<code>.html</code>" in order to work with DSpace UI<br>
|
|
<code>$dsrun</code>: path to your dsrun script, usually <code>[dspace]/bin/dsrun</code><br>
|
|
<code>$in_directory</code>: directory where analysis files were placed in dstat-general<br>
|
|
<code>$out_directory</code>: the live reports directory: <code>[dspace]/reports/</code><br></p>
|
|
|
|
<p>If you want additional customisations, you will need to modify the lines which build the command to be executed and change the parameters passed to the java processes which actually carry out the analysis. For more information on these processes either build the javadocs or run:</p>
|
|
|
|
<pre>[dspace]/bin/dsrun ac.ed.dspace.stats.LogAnalyser -help
|
|
[dspace]/bin/dsrun ac.ed.dspace.stats.ReportGenerator -help</pre>
|
|
|
|
|
|
|
|
|
|
<h2><a name="webuithumbs" id="webuithumbs">Displaying Image Thumbnails</a></h2>
|
|
|
|
<h3>Browse and Search Results Page Thumbnails</h3>
|
|
|
|
<p>Image thumbnails can be enabled on the Browse and Search Results pages by setting the appropriate configuration values. To enable the display of thumbnails the following items must be set in the <code>dspace.cfg</code> file:</p>
|
|
|
|
<p><code>webui.browse.thumbnail.show = true</code></p>
|
|
|
|
<p>If set to <code>false</code> or this configuration item is missing then thumbnails will not be shown.</p>
|
|
|
|
<p>The size of the browse/search thumbnails can also be configured to a smaller size than that generated by the mediafilter. To do this set the following configuration items:</p>
|
|
|
|
<p><code>webui.browse.thumbnail.maxheight = <maxheight in pixels></code></p>
|
|
|
|
<p><code>webui.browse.thumbnail.maxwidth = <maxwidth in pixels></code></p>
|
|
|
|
<p>If these configuration items are not set, <code>thumbnail.maxheight</code> and <code>thumbnail.maxwidth</code> are used. Setting these values greater than or equal to the size of the thumbnail generated by the mediafilter (i.e. <code>thumbnail.maxheight</code> and <code>thumbnail.maxwidth</code>) will have no effect.</p>
|
|
|
|
<p><strong>Note:</strong></p>
|
|
|
|
<ul>
|
|
<li>where the primary bitstream is HTML, no thumbnail is shown;</li>
|
|
|
|
<li>where the primary bitstream has a thumbnail, its thumbnail is shown;</li>
|
|
|
|
<li>where the primary bitstream is not set, the first thumbnail found by DSpace will be shown;</li>
|
|
|
|
<li>where the user does not have read access to the thumbnail bitstream, no thumbnail is shown;</li>
|
|
|
|
<li>currently, for a thumbnail to display, a JPEG thumbnail under the current implementation rules must exist (i.e. primary bitstream name with ".jpg" suffix).</li>
|
|
</ul>
|
|
|
|
<h3>Configuring Thumbnail Link Behaviour</h3>
|
|
|
|
<p>The target of a thumbnail in the Browse and Search Results Page can be configured by setting the following configuration item:</p>
|
|
|
|
<p><code>webui.browse.thumbnail.linkbehaviour = <target page type></code></p>
|
|
|
|
<p>Currently the values <code>item</code> and <code>bitstream</code> are allowed. If this configuration item is not set, or set incorrectly, the default is <code>item</code>.</p>
|
|
|
|
<h3>Item Display Page Thumbnails</h3>
|
|
|
|
<p>Thumbnails may also be enabled or disabled on the Item Display page by setting the following configuration item in <code>dspace.cfg</code>:</p>
|
|
|
|
<p><code>webui.item.thumbnail.show = true</code></p>
|
|
|
|
<p>If set to <code>false</code> or this configuration item is missing then thumbnails will not be shown.</p>
|
|
|
|
<h2><a name="strengths" id="strengths">Displaying Community and Collection Item Counts</a></h2>
|
|
|
|
<p>To show the item count against communities and collections set the <code>webui.strengths.show</code> configuration item in the <code>dspace.cfg</code> file as follows:</p>
|
|
|
|
<p><code>webui.strengths.show = true</code></p>
|
|
|
|
<p>If this config item is missing or is set to any value other than <code>true</code> the item counts will not be shown.</p>
|
|
|
|
<h2><a name="luceneanalyzer" id="luceneanalyzer">Lucene Analyzer</a></h2>
|
|
|
|
<p>The Lucene analyzer used in searching and indexing can be configured by setting the <code>search.analyzer</code> configuration item in <code>dspace.cfg</code> to the class of the desired analzyer. If this item is not present/commented out, the default Lucene analyzer <code>org.dspace.search.DSAnalyzer</code> is used.</p>
|
|
|
|
<p>As well as those analyzers included in the Lucene distribution (see <code>lucene.jar</code>), a Chinese analyzer from the Lucene sandbox is included in <code>lucene-sandbox.jar</code>. This analyzer is yet to be included in the core Lucene distribution but can be configured by setting <code>search.analyzer = org.apache.lucene.analysis.cn.ChineseAnalyzer</code> in <code>dspace.cfg</code>.</p>
|
|
|
|
<h2><a name="formathelp" id="formathelp">On-line Help About File Formats</a></h2>
|
|
|
|
<p>Because the file format support policy is determined by each individual institution, the on-line help on this subject is intentionally left blank. The help file will, however, retrieve a list of formats and the support levels associated with them in your database and display this information to the user. We highly recommend that you edit the "Format Support Policy" section of the file <code><i>[dspace-source]</i>/jsp/help/formats.jsp</code>.</p>
|
|
|
|
<h2><a name="viewlicence" id="viewlicence">View Item Licence</a></h2>
|
|
|
|
<p>Setting <code>webui.licence_bundle = true</code> in <code>dspace.cfg</code> will result in a hyperlink being rendered on the Item View page that points to the item's licence.</p>
|
|
|
|
<hr>
|
|
|
|
<address>
|
|
Copyright © 2002-2004 MIT and Hewlett Packard
|
|
</address>
|
|
</body>
|
|
</html>
|