please add following jars to $OPENNMS_HOME/libs to support org.eclipse.jetty.servlets.ProxyServlet: jetty-client-7.5.1.v20110908.jar jetty-servlets-7.5.1.v20110908.jar
Advantage is to support with minimal configuration OpenNMS Authentication for other needed services running on apache in example ViewVc Repository Browser.
example of configuration in $OPENNMS_HOME/jetty-webapps/opennms/WEB-INF/web.xml: ################################################################################ <servlet> <servlet-name>ViewVCProxy</servlet-name> <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class> <load-on-startup>1</load-on-startup> <init-param> <param-name>ProxyTo</param-name><param-value>http://localhost:8880/opennms/viewvc</param-value> </init-param> <init-param> <param-name>Prefix</param-name><param-value>/viewvc</param-value> </init-param> </servlet>
If apache is configured to listen only on localhost, with this configuration we can use OpenNMS Authentication for ViewVC site. No others can connect. Also configure urlViewVC in rancid.rws.rc to "http://opennms-server-ip-or-name:8980/opennms/viewvc" so links in OpenNMS Web Gui also work.
Also applicationContext-spring-security.xml can be used to restrict access: <intercept-url pattern="/viewvc/**" access="ROLE_ADMIN"/>
best regards Martin
Environment
all environments
Acceptance / Success Criteria
None
Lucidchart Diagrams
Activity
Show:
Seth Leger November 5, 2012 at 12:09 PM
Ha ha, this is a pretty unique use case! We should be able to add the extra Jetty JARs easily in the POMs at some point. I'm working on a Jetty upgrade in a branch so maybe I can work on it there.
Hi,
please add following jars to $OPENNMS_HOME/libs to support org.eclipse.jetty.servlets.ProxyServlet:
jetty-client-7.5.1.v20110908.jar
jetty-servlets-7.5.1.v20110908.jar
Advantage is to support with minimal configuration OpenNMS Authentication for other needed services running on apache in example ViewVc Repository Browser.
example of configuration in $OPENNMS_HOME/jetty-webapps/opennms/WEB-INF/web.xml:
################################################################################
<servlet>
<servlet-name>ViewVCProxy</servlet-name>
<servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
<load-on-startup>1</load-on-startup>
<init-param>
<param-name>ProxyTo</param-name><param-value>http://localhost:8880/opennms/viewvc</param-value>
</init-param>
<init-param>
<param-name>Prefix</param-name><param-value>/viewvc</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>ViewVCProxy</servlet-name>
<url-pattern>/viewvc/*</url-pattern>
</servlet-mapping>
################################################################################
If apache is configured to listen only on localhost, with this configuration we can use OpenNMS Authentication for ViewVC site. No others can connect.
Also configure urlViewVC in rancid.rws.rc to "http://opennms-server-ip-or-name:8980/opennms/viewvc" so links in OpenNMS Web Gui also work.
Also applicationContext-spring-security.xml can be used to restrict access:
<intercept-url pattern="/viewvc/**" access="ROLE_ADMIN"/>
best regards
Martin