Feature #1579

Updated by Serge Heiden almost 3 years ago

At this moment, images of facs edition can only be accessible by publishing them in the public tomcat directory. So even if a corpora access is restricted through profiles, images remain accessible to all clients by pointing to their URL (or parent directory, according to the server configuration).

h3. Solution 1

* create some kind of getfile.jsp page that reads and serves the images stored outside the public tomcat space and only if the user is connected and have the right permissions on the corpora, eg. : getfile.jsp?img=185&corpora=DISCOURS

h3. Solution 2

* TBD (using some Java classes instead of JSP page ?)

h3. Solution 3

* directly embed raw data of image in HTML pages using data URI, eg.:

<pre>
<img src="data:image/png;base64,iDFgdVRw0KGgoAAdfgANSUhEUgAAADIA..." />
</pre>

Need to check the state of the art of browsers compatibility with this inline embed.
See: http://caniuse.com/#feat=datauri

h3. Solution 4

Use an image server component dedicated to serving the images not especially limited to access control and file transfer. For example: pyramidal file transfer and zooming/pan strategy for big images, image annotation services, standard image metadata and annotations export, etc. eg "digilib":http://digilib.sourceforge.net

The image server component can be embedded in the TXM portal software or can be an independent Tomcat service with connectors to the TXM portal.

The image server component and TXM must share at least corpora images informations, user identities and access control rules. For this we could open the TXM identities management component to an external identity component eg "DS":http://directory.apache.org ldap (and connexion eg. "Shibbolet":https://shibboleth.net/products/opensaml-java.html) service, maybe access control rules also.



h3. Temporary workaround

* store the images in a subdirectory of the tomcat published space, eg. : /var/lib/tomcat7/webapps/txm/[CORPORA_NAME]/img
* protect this directory with basic authentication, see: http://www.linuxhelp.in/2012/08/password-protected-directory-in-tomcat.html

Back