StatusThis feature is available since January 2011.
IntroductionForm Runner can be deployed directly within portals like Liferay. However in some cases, it is desirable to deploy Form Runner separately. The Form Runner proxy portlet provides allows this type of deployment, with the following benefits:
This guide describes how to install, administer and use the Form Runner proxy portlet. NOTE: This feature has only been tested with Liferay 6. It is likely to also work with other JSR-286 compliant portals but note that this hasn't been tried by Orbeon as of 2011-01.
ArchitectureThe solution is comprised of:
The proxy portlet communicates with the Form Runner server using HTTP. The Form Runner server can be entirely hidden behind a firewall as it doesn't need direct access from the user's web browser. InstallationInstall and deploy Orbeon Forms as usual. You can deploy it:
Note the URL at which Form runner is deployed. The default is:
NOTE: An instance of Form Runner configured as server for the proxy portlet cannot, as of 2011-01-07, be used as a regular instance of Form Runner due to the URL rewriting configuration. See the Limitations section below for more details.
Configure Form RunnerFor builds since 2012-05-14, no particular configuration is needed. NOTE: For builds prior to 2012-05-14, you need the following configuration in your
properties-local.xml:
NOTE: Prior to 2011-10-18 builds, the following property was also needed: <property as="xs:string" name="oxf.url-rewriting.strategy.servlet" value="wsrp"/>
Deploy the proxy portlet1. Deploy
orbeon-PE-proxy-portlet.war into Liferay2. Add an instance of The Orbeon Forms → Form Runner portlet to a page: Configure the proxy portlet1. Open the portlet preferences page:
2. Configure the preferences
The preferences are as follows:
When read-only access is enabled, if the Form Runner summary page is enabled and accessed, selecting a form takes the user to the Review page instead of the Edit page for a given form.
Press the "Save" or "Cancel" button to save/cancel and return to the portlet.
The default values of the preferences are provided via initialization parameters in the
portlet.xml file:
Securing Form Runner with an IP filterRationaleThe proxy portlet can be secured with Liferay. On the other hand, the Form Runner server runs as a servlet and whether it runs within the same container as Liferay or on a different machine, direct accesses from end clients must be prevented. One first step to achieve this is to place the Form Runner server behind a firewall, where it can be accessed from the portal but not from end clients. Additional security steps can be desirable depending on your environment. One such step is to use an IP filter in order to:
The following describes such a configuration. Example configurationThere are many IP filter options out there. One option is to use the very flexible UrlRewriteFilter. You can configure it this way: Put urlrewrite-3.2.0.jar in the Orbeon Forms WEB-INF/lib folderConfigure the filter in Orbeon Forms WEB-INF/web.xml
This is a generic configuration which enables the filter for any incoming path. Put the urlrewrite.xml configuration in the Orbeon WEB-INF folderHere is an example configuration:
This configuration encodes the following rule: "for any incoming path, if the remote IP is different from 0:0:0:0:0:0:0:1%0 (IPv6) and different from 127.0.0.1 (IPv4), then set the status to 403 and redirect to the path /unauthorized". You should modify the IP address(es) to fit your network configuration, as the originating address might not be 127.0.0.1, as well as modify the redirection path. Enabling UrlRewriteFilter's logging is helpful to see what's happening during development. To do this, modify the <filter> config to:
NOTE: You could also setup filtering on the type "remote-host" and check on the value "localhost" instead of filtering on IP addresses, however often reverse DNS lookups are not enabled in servlet containers for performance reasons, which means you need to filter by IP address instead. Test the setupMake sure accesses from the proxy portlet work as before, and test that accesses from machines other than the portal and/or directly from the client browser get rejected. ScenariosScenario: create and save form dataIn this scenario, the user of the portlet is only allowed to capture and save form data.
Portlet preferences:
Configuration properties in
properties-local.xml (here for the orbeon/contact form):
Scenario: list, edit, create and save form dataIn this scenario, the user of the portlet can, in addition to capture and save, also list and edit submitted form data.
Portlet preferences:
Configuration properties in
properties-local.xml (here for the orbeon/contact form):
NOTE: Remove the
delete token if the Delete button is not needed.Scenario: list and review form dataIn this scenario, the user of the portlet is only allowed to capture and save form data.
Portlet preferences:
Configuration properties in
properties-local.xml (here for the orbeon/contact form):
LimitationsOrbeon Forms URL rewriting configuration is globalNOTE: This is no longer a limitation starting 2011-10-18 builds.
Form Runner configuration properties are globalThe Form Runner configuration properties are global, i.e. a given Form Runner server cannot have configuration properties per portlet (although it can have them per app/form name). This means for example that for a given app/form/action, it is not possible to have a different set of buttons. Concretely, this means that you cannot have the following portlet instances at the same time:
This is because both scenarios need a different configuration for the summary page buttons. Related resources
|



