[
https://issues.apache.org/jira/browse/AMQ-5388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17162860#comment-17162860
]
Arthur Kahn commented on AMQ-5388:
----------------------------------
This bug is still not solved in 2020 (ActiveMQ 5.15.13)
I replace the impacted lines by:
{code:xml}
<bean id="securityConstraintMapping"
class="org.eclipse.jetty.security.ConstraintMapping">
<property name="constraint" ref="securityConstraint" />
<property name="pathSpec"
value="/api/*,*.jsp,*.html,*.png,*.css,/admin/js/*" />
</bean>
<bean id="adminSecurityConstraintMapping"
class="org.eclipse.jetty.security.ConstraintMapping">
<property name="constraint" ref="adminSecurityConstraint" />
<property name="pathSpec" value="*.action" />
</bean>
{code}
> User Role Granted Full Privileges in jetty.xml
> ----------------------------------------------
>
> Key: AMQ-5388
> URL: https://issues.apache.org/jira/browse/AMQ-5388
> Project: ActiveMQ
> Issue Type: Bug
> Components: Web Console
> Affects Versions: 5.9.0
> Environment: Any
> Reporter: Justin Reock
> Priority: Minor
> Labels: jetty, security, web-console
>
> The default ConstraintMapping for the "user" role grants privileges to
> /admin/*, which supersedes the *.action constraint that is supposed to be
> granted only to the admin role.
> The current pathspec for the user role reads:
> <property name="pathSpec" value="/api/*,/admin/*,*.jsp" />
> By granting access to /admin/*, that in turn grants access to all of the
> *.action URLs, essentially nullifying the attempt to restrict *.action URLs
> to only the admin role.
> To repeat, just log in as the default "user/user" account to the web console
> and add or delete destinations.
> Workaround is to change the pathSpec to:
> <property name="pathSpec" value="/,*.jsp,*.css" />
> Which allows access to the console but disallows access to the *.action URLs.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)