You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2011/02/03 08:38:56 UTC
DO NOT REPLY [Bug 50713] New: The "roles" command doesn't work
https://issues.apache.org/bugzilla/show_bug.cgi?id=50713
Summary: The "roles" command doesn't work
Product: Tomcat 7
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: Manager
AssignedTo: dev@tomcat.apache.org
ReportedBy: mashmk02@gmail.com
Created an attachment (id=26601)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=26601)
patch for context.xml of the Manager application
The Manager application has the "roles" command that list the security role
names. But now this command doesn't work correctly.
The "roles" command returns following message:
FAIL - Cannot resolve user database reference
And gets Exception:
SEVERE: Manager: java:comp/env/users
javax.naming.NamingException: Cannot create resource instance
at
org.apache.naming.factory.ResourceEnvFactory.getObjectInstance(ResourceEnvFactory.java:117)
at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.apache.naming.NamingContext.lookup(NamingContext.java:826)
at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at
org.apache.catalina.manager.ManagerServlet.roles(ManagerServlet.java:1055)
at
org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:366)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:589)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:382)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Tomcat 6.x contains same issue.
The workaround for this issue is to add <ResourceLink> to context.xml of the
Manager application.
And I made the patch for this issue.
regards.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50713] The "roles" command doesn't work
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50713
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #4 from Mark Thomas <ma...@apache.org> 2011-02-16 08:46:28 EST ---
The roles command has been removed from Tomcat 7 trunk. This will take affect
from 7.0.9 onwards.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50713] The "roles" command doesn't work
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50713
--- Comment #1 from Mark Thomas <ma...@apache.org> 2011-02-10 14:06:38 EST ---
The more I consider this issue, the more I am inclinded to remove the roles
command from the manager in Tomcat 7. My reasoning is follows:
- The manager can be used with any realm
- Most realms do not expose a role list
- It is not practical to list all roles for some realms (e.g. JNDI)
- I don't see what the use case is for this feature
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50713] The "roles" command doesn't work
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50713
--- Comment #3 from Eiji Takahashi <ma...@gmail.com> 2011-02-14 20:13:13 EST ---
Thanks for comments.
I encountered this issue when I used the Tomcat maven plugin's "tomcat:roles"
command that uses the "roles" command of the Manager app.
The "tomcat:roles" command can display the available security roles. But I
can't think of a case where it's necessary.
And I have no objection to remove the "roles" command.
Best regards.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50713] The "roles" command doesn't work
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50713
--- Comment #2 from Konstantin Kolinko <kn...@gmail.com> 2011-02-14 14:12:59 EST ---
The "Cannot resolve user database reference" message and the necessity to
create a <ResourceLink> are already documented, [1]
[1]
http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#List_Available_Security_Roles
I see nothing to fix here. Though the doc can be improved a bit:
1) This is "Cannot resolve user database reference" message, though the
solution for it is listed with the "No user database is available" message.
2) IIRC, there is no "<ResourceParams>" element in modern Tomcat versions.
Regardless of that, I agree with Mark that I do not see much reason in keeping
this command around. Especially I miss a plausible use case. Maybe it was used
for some demos?
Note, that besides this command being present inside manager webapp, there is
also RolesTask ANT task.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org