Orbeon/Tomcat newbie here – hope I’m just missing something obvious…
I’m on Orbeon 4 M11 & would like to try out the bundled orbeon-auth as an authorisation service, as described here: http://wiki.orbeon.com/forms/doc/developer-guide/page-flow-controller/authorization.
I initially had trouble even getting orbeon-auth to work, but now I have it to the point where if I visit http://localhost:8080/orbeon-auth it will prompt for authentication and will return http 200 if I enter the correct credentials. Now I need to configure my pages to use orbeon-auth. According to the instructions in the link above I need to set this property:
<property as="xs:anyURI" processor-name="oxf:page-flow" name="authorizer" value="/orbeon-auth"/>
But I wasn’t sure where to put the code. I thought it might go in page-flow.xml within the <controller> tags, but when I put it there & try to visit a page I get the “Orbeon Forms – An Error Has Occurred” error page. I also tried putting it in properties-local.xml but that didn’t do anything. Hope someone can point me in the right direction…
Here is the entirety my properties-local.xml:
<!--
This file is an empty template for your own properties-local.xml file. Please follow the instructions here:
http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties
-->
<properties xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:oxf="http://www.orbeon.com/oxf/processors">
<!-- This is an example of property which overrides an existing property's default value:
<property as="xs:NMTOKENS"
name="oxf.xforms.logging.debug"
value="document model submission submission-details control event action analysis server html"/>
-->
<property as="xs:string" name="oxf.fr.persistence.provider.Test.*.*" value="oracle"/>
<property as="xs:string" name="oxf.fr.persistence.provider.FieldReports.*.*" value="oracle"/>
<property as="xs:string" name="oxf.fr.persistence.service.oracle.datasource" value="oracle"/>
<property as="xs:boolean" name="oxf.fr.persistence.oracle.create-flat-view" value="true"/>
<property as="xs:string" name="oxf.fr.summary.buttons.*.*" value="new print delete"/>
<property as="xs:string" name="oxf.fr.detail.buttons.*.*" value="close clear print save save-locally submit workflow-review workflow-send"/>
<property as="xs:boolean" name="oxf.fr.detail.edit.accept-post.*.*" value="true"/>
<property as="xs:anyURI" name="oxf.fr.default-logo.uri.*.*"
value="/usr/local/tomcat/webapps/orbeon4pe/WEB-INF/resources/wb-logo.png"/>
<property
as="xs:anyURI"
processor-name="oxf:page-flow"
name="authorizer"
value="/orbeon-auth"/>
</properties>
I have not altered /WEB-INF/resources/page-flow.xml or the orbeon-auth /WEB_INF/web.xml file – they are as they come out of the box.
I was confused as to how this feature was supposed to function. I overrided the default page public methods (GET & HEAD) by adding the following to /WEB-INF/config/properties-local.xml:
…and an external GET request did indeed cause a call to orbeon-auth first (no prompt for authentication, not sure if that’s the expected behavior – orbeon-auth just returns 401/Unauthorized, then immediately 403/Forbidden, no prompt).