Difference between revisions of "Anatomy of a request"

From EPrints Documentation
Jump to: navigation, search
Line 26: Line 26:
 
This leads us to the backbone of EPrints - the Rewrite module - where URL_REWRITE_* triggers are called; content negotiation can happen, as well as many other wonderous things!
 
This leads us to the backbone of EPrints - the Rewrite module - where URL_REWRITE_* triggers are called; content negotiation can happen, as well as many other wonderous things!
 
*<code>EPrints::Apache::Rewrite</code> module
 
*<code>EPrints::Apache::Rewrite</code> module
TODO: Explain flow of Rewrite - triggers - cgi - content negotiation - CRUD - ???
+
 
 +
'TODO:  
 +
*Explain flow of Rewrite
 +
**triggers
 +
**cgi
 +
**content negotiation
 +
**CRUD
 +
**???
 +
*permit on DataObj
 +
**can_request_view / can_user_view
 +
*summary pages (content neg/ URL rewrite)
 +
*DOI - 5 metadata elements
 +
*40x handling
  
  
 
[[Category:EPrints 3.3.12]]
 
[[Category:EPrints 3.3.12]]
 
{{AccessControl}}
 
{{AccessControl}}

Revision as of 13:56, 13 October 2014

This is a description of how EPrints and Apache handle an incoming request. Understanding this flow helps understand how an Access Control layer can be added to the system.

I will assume that you know how to locate a perl module file from the module name (e.g. EPrints::Apache::Rewrite will probably be ~/perl_lib/EPrints/Apache/Rewrite.pm, although this is not always the case!).

Below are relevant parts of config files and perl modules that are used with when processing a request:

  • Apache core config ~/cfg/apache.conf
PerlSwitches -I/home/eprints/eprints-3.3.12/perl_lib
PerlModule EPrints
PerlPostConfigHandler +EPrints::post_config_handler

The post_config_handler does some sanity checks on the EPrints setup (e.g. is Apache listening to the ports that the repositories are configured to work under) See: http://perl.apache.org/docs/2.0/user/handlers/server.html#C_PerlPostConfigHandler_ for more info about the post_config_handler

  • Apache repository config ~/cfg/apache/ARCHIVEID.conf
<VirtualHost *:80>
...
  PerlTransHandler +EPrints::Apache::Rewrite

</VirtualHost>

This leads us to the backbone of EPrints - the Rewrite module - where URL_REWRITE_* triggers are called; content negotiation can happen, as well as many other wonderous things!

  • EPrints::Apache::Rewrite module

'TODO:

  • Explain flow of Rewrite
    • triggers
    • cgi
    • content negotiation
    • CRUD
    • ???
  • permit on DataObj
    • can_request_view / can_user_view
  • summary pages (content neg/ URL rewrite)
  • DOI - 5 metadata elements
  • 40x handling
Access Control Layer