-
Notifications
You must be signed in to change notification settings - Fork 297
Description
ComplexAccessPoint.xml lists an example of how to apply an exclusion access control to requests made from outside a specified IP range: https://github.com/iipc/openwayback/blob/master/wayback-webapp/src/main/webapp/WEB-INF/ComplexAccessPoint.xml#L65-88
Historically, we have used something very similar at the Library of Congress, but instead of using OracleExclusionFilterFactory, we use StaticMapExclusionFilterFactory, and follow the exact format outlined in the example that I linked above. So, our code might look like:
<property name="authentication">
<bean class="org.archive.wayback.authenticationcontrol.AccessControlSettingOperation">
<property name="operator">
<bean class="org.archive.wayback.util.operator.NotBooleanOperator">
<property name="operand">
<bean class="org.archive.wayback.authenticationcontrol.IPMatchesBooleanOperator">
<property name="allowedRanges">
<list>
<value>192.168.1.16/24</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
<property name="factory">
<bean class="org.archive.wayback.accesscontrol.staticmap.StaticMapExclusionFilterFactory" init-method="init">
<property name="file" value="${wayback.basedir}/exclude.txt" />
<property name="checkInterval" value="600" />
</bean>
</property>
</bean>
</property>This works for us in Wayback 1.6 and 1.8. However, on the Openwayback 2.1.0 instance that we just installed, this same logic does not work. Using the StaticMapExclusionFilterFactory as the exclusionFactory property of the AccessPoint itself works, something like:
<bean name="8080:accesspoint" class="org.archive.wayback.webapp.AccessPoint">
...
<property name="exclusionFactory">
<bean class="org.archive.wayback.accesscontrol.staticmap.StaticListExclusionFilterFactory" init-method="init">
<property name="file" value="${wayback.basedir}/exclude.txt" />
<property name="checkInterval" value="600" />
</bean>
</property>
</bean>Likewise, using the StaticListExclusionFilterFactory as the AccessPoint's exclusionFactory property works. Tomcat is able to restart without errors when using StaticMapExclusionFilterFactory / StaticListExclusionFilterFactory with AccessControllSetting.factory, but the application does not exclude URLs provided in the defined exclude.txt file.
I've reviewed some of the recent-ish commits to the code involved in this process, and nothing is jumping out to me as an immediate red flag. After that, and doing loads of testing to no avail, I'm left scratching my head on this one. I could definitely be overlooking something more obvious to the folks familiar with this code base, so if that is the case, please let me know.
I am not seeing any helpful information in my Tomcat logs, but if I can provide any further environmental/testing info to assist in the investigation of this issue, just let me know.
Thanks in advance for the assistance.
Phil / [email protected]
EDIT: I believe Gina brought up this same issue in 2014 in the following google group exhange: https://groups.google.com/forum/#!topic/openwayback-dev/2nANsg14QJE