You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by de...@apache.org on 2013/07/02 12:42:56 UTC
svn commit: r1498875 - in /activemq/trunk:
activemq-web-console/src/main/webapp/
activemq-web-console/src/main/webapp/WEB-INF/ assembly/src/release/conf/
Author: dejanb
Date: Tue Jul 2 10:42:55 2013
New Revision: 1498875
URL: http://svn.apache.org/r1498875
Log:
https://issues.apache.org/jira/browse/AMQ-4567 - readonly web console
Added:
activemq/trunk/activemq-web-console/src/main/webapp/403.html
- copied, changed from r1497733, activemq/trunk/activemq-web-console/src/main/webapp/404.html
Modified:
activemq/trunk/activemq-web-console/src/main/webapp/404.html
activemq/trunk/activemq-web-console/src/main/webapp/500.html
activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/web.xml
activemq/trunk/assembly/src/release/conf/jetty-realm.properties
activemq/trunk/assembly/src/release/conf/jetty.xml
Copied: activemq/trunk/activemq-web-console/src/main/webapp/403.html (from r1497733, activemq/trunk/activemq-web-console/src/main/webapp/404.html)
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-console/src/main/webapp/403.html?p2=activemq/trunk/activemq-web-console/src/main/webapp/403.html&p1=activemq/trunk/activemq-web-console/src/main/webapp/404.html&r1=1497733&r2=1498875&rev=1498875&view=diff
==============================================================================
--- activemq/trunk/activemq-web-console/src/main/webapp/404.html (original)
+++ activemq/trunk/activemq-web-console/src/main/webapp/403.html Tue Jul 2 10:42:55 2013
@@ -27,8 +27,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Apache ActiveMQ</title>
<style type="text/css" media="screen">
- @import url('${pageContext.request.contextPath}/styles/type-settings.css');
- @import url('${pageContext.request.contextPath}/styles/site.css');
+ @import url('styles/type-settings.css');
+ @import url('styles/site.css');
</style>
@@ -77,9 +77,9 @@
<tr>
<td valign="top" width="100%" style="overflow:hidden;">
<div class="body-content">
- <p class="error">Page Not Found!</p>
+ <p class="error">Restricted!</p>
- <p>What do you want to do next?</p>
+ <p>You don't have permissions to execute this action?</p>
<ul class="alternate" type="square">
<li><a title="Manage ActiveMQ broker" href="/admin/">Manage ActiveMQ broker</a></li>
<li><a title="See some Web demos" href="/demo/">See some Web demos</a></li>
Modified: activemq/trunk/activemq-web-console/src/main/webapp/404.html
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-console/src/main/webapp/404.html?rev=1498875&r1=1498874&r2=1498875&view=diff
==============================================================================
--- activemq/trunk/activemq-web-console/src/main/webapp/404.html (original)
+++ activemq/trunk/activemq-web-console/src/main/webapp/404.html Tue Jul 2 10:42:55 2013
@@ -27,8 +27,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Apache ActiveMQ</title>
<style type="text/css" media="screen">
- @import url('${pageContext.request.contextPath}/styles/type-settings.css');
- @import url('${pageContext.request.contextPath}/styles/site.css');
+ @import url('styles/type-settings.css');
+ @import url('styles/site.css');
</style>
Modified: activemq/trunk/activemq-web-console/src/main/webapp/500.html
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-console/src/main/webapp/500.html?rev=1498875&r1=1498874&r2=1498875&view=diff
==============================================================================
--- activemq/trunk/activemq-web-console/src/main/webapp/500.html (original)
+++ activemq/trunk/activemq-web-console/src/main/webapp/500.html Tue Jul 2 10:42:55 2013
@@ -27,8 +27,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Apache ActiveMQ</title>
<style type="text/css" media="screen">
- @import url('${pageContext.request.contextPath}/styles/type-settings.css');
- @import url('${pageContext.request.contextPath}/styles/site.css');
+ @import url('styles/type-settings.css');
+ @import url('styles/site.css');
</style>
Modified: activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/web.xml?rev=1498875&r1=1498874&r2=1498875&view=diff
==============================================================================
--- activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/web.xml (original)
+++ activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/web.xml Tue Jul 2 10:42:55 2013
@@ -138,7 +138,13 @@
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Error pages -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
+
+ <!-- 403 doesn't work for some reason -->
+ <error-page>
+ <error-code>403</error-code>
+ <location>/403.html</location>
+ </error-page>
+
<error-page>
<error-code>404</error-code>
<location>/404.html</location>
Modified: activemq/trunk/assembly/src/release/conf/jetty-realm.properties
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/release/conf/jetty-realm.properties?rev=1498875&r1=1498874&r2=1498875&view=diff
==============================================================================
--- activemq/trunk/assembly/src/release/conf/jetty-realm.properties (original)
+++ activemq/trunk/assembly/src/release/conf/jetty-realm.properties Tue Jul 2 10:42:55 2013
@@ -17,4 +17,5 @@
# Defines users that can access the web (console, demo, etc.)
# username: password [,rolename ...]
-admin: admin, admin
\ No newline at end of file
+admin: admin, admin
+user: user, user
\ No newline at end of file
Modified: activemq/trunk/assembly/src/release/conf/jetty.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/release/conf/jetty.xml?rev=1498875&r1=1498874&r2=1498875&view=diff
==============================================================================
--- activemq/trunk/assembly/src/release/conf/jetty.xml (original)
+++ activemq/trunk/assembly/src/release/conf/jetty.xml Tue Jul 2 10:42:55 2013
@@ -27,12 +27,21 @@
<bean id="securityConstraint" class="org.eclipse.jetty.util.security.Constraint">
<property name="name" value="BASIC" />
+ <property name="roles" value="user,admin" />
+ <property name="authenticate" value="true" />
+ </bean>
+ <bean id="adminSecurityConstraint" class="org.eclipse.jetty.util.security.Constraint">
+ <property name="name" value="BASIC" />
<property name="roles" value="admin" />
<property name="authenticate" value="true" />
</bean>
<bean id="securityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
<property name="constraint" ref="securityConstraint" />
- <property name="pathSpec" value="/*" />
+ <property name="pathSpec" value="/,*.jsp" />
+ </bean>
+ <bean id="adminSecurityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
+ <property name="constraint" ref="adminSecurityConstraint" />
+ <property name="pathSpec" value="*.action" />
</bean>
<bean id="securityHandler" class="org.eclipse.jetty.security.ConstraintSecurityHandler">
<property name="loginService" ref="securityLoginService" />
@@ -41,6 +50,7 @@
</property>
<property name="constraintMappings">
<list>
+ <ref bean="adminSecurityConstraintMapping" />
<ref bean="securityConstraintMapping" />
</list>
</property>