Configuration of realms.xml

The realms configuration contains the locations and prefixes of the various realms and denotes which realm is the ROOT realm.

The location of the file realms.xml is normally configured within the file yanel.xml , but this path can be overwritten by adding a file realms.xml to a hidden folder .yanel inside the user home directory or by setting the environment variable YANEL_REALMS_HOME. The loading order is implemented by the java class org.wyona.yanel.core.map.RealmManager and the order is

  1. Environment variable (YANEL_REALMS_HOME)
  2. Hidden folder inside user home directory {user.home}/.yanel
  3. DEPRECATED: User home directory {user.home}
  4. Environment entry (e.g. within apache-tomcat-7.0.25/conf/context.xml: <Environment name="yanel/realms-config-file" type="java.lang.String" value="/Users/alice/realms.xml"/>)
  5. Yanel configuration (yanel.xml)

Examples

<?xml version="1.0"?>

<realms xmlns="http://www.wyona.org/yanel/1.0" version="2007060600">

<realm id="realm-id" mount-point="/" user-tracking-domain-id="boost-example0123456789" jms_user="test" jms_password="test" authkey="eWFuZWwtc3JjLTExMTExMTExMTEK" root="true">
  <!--<name>Realm Name</name>-->
  <config src="/absolute/path/to/realm/"/>
  <reverse-proxy>
    <host-name>www.yanel.org</host-name>
<!--
    <port>80</port>
    <ssl-port>443</ssl-port>
-->
    <prefix>/yanel/yanel-website</prefix>
<!--
    <reverse-prefix>/optional</reverse-prefix>
-->
  </reverse-proxy>
</realm>

</realms>        
    

The elements host-name and prefix allow Yanel to act upon URLs as the original client requested, for example

  • Original client request: http://www.yanel.org/en/download/index.html
  • Request Yanel receives from reverse proxy: http://127.0.0.1:8080/yanel/yanel-website/en/download/index.html
whereas the reverse proxy configuration might be as follows:
  • ProxyPassReverseCookiePath /yanel /
  • ProxyPass / http://127.0.0.1:8080/yanel/yanel-website/
  • ProxyPassReverse / http://127.0.0.1:8080/yanel/yanel-website/

Environment variable YANEL_REALMS_HOME

The environment variable can for example be set within apache-tomcat-7.0.25/bin/catalina.sh of Tomcat

export YANEL_REALMS_HOME=/Users/michaelwechner/src/realms

whereas Yanel will then try to find a file

/Users/michaelwechner/src/realms/realms.xml



Your comments are much appreciated

Is the content of this page unclear or you think it could be improved? Please add a comment and we will try to improve it accordingly.