(1) Check that you have the fixed string 'Roles' as the second element
of the select in the roles query.
(2) Make sure you have security-constraint elements in the web.xml for
all of the URIs on which the role checks are made.
I think the distribution is ok in this respect, but your
modifications may have changed the URIs (?)
(3) For JBoss, you may need to add security-role-ref elements (as shown
below) within *each* <servlet> element in the web.xml even for the
trivial mapping "editor" to "editor" in the servlet and app role
namespaces. Check the JBoss docs on this; I think it is pretty picky,
whereas Tomcat seems to do trivial mappings by default (which is what
everyone expects); we should perhaps include this in our web.xml. If it
is this latter thing, please file a bug/task for us on the tracker.
<security-role-ref>
<role-name>editor</role-name>
<role-link>editor</role-link>
</security-role-ref>
--a.
Björn Ingimundarson wrote:
I am using Roller 1.1 with minor modifications built from source.
My main problem at the moment is that
request.getUserPrincipal() is returning the correct user but
request.isUserInRole("editor") is returning false.
Bjorn
Anil Gangolli wrote:
Can you also tell us what version of Roller you are using? and
whether you built from sources or used the distribution?
--a.
Björn Ingimundarson wrote:
Hello,
I am currently setting up Roller Weblogger on JBoss 4.0 and have
followed the instructions found at
http://rollerweblogger.org/wiki/Wiki.jsp?page=InstallationGuideJBoss4.
The installation went ok and I can see my blog and post comments and
all that good stuff.
There are however 2 issues that are bothering me when trying to
log-in and post/modify entries.
1. I can not see the Menu on the main page due to the following
exception:
13:26:19,800 ERROR
[org.roller.presentation.tags.menu.RollerMenuModel.<init>(RollerMenuModel.java:106)]
Unexpected exception
java.lang.ClassNotFoundException: No ClassLoaders found for:
org.roller.presentation.tags.menu.MenuImpl
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1276)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1567)
at
org.roller.presentation.tags.menu.RollerMenuModel.<init>(RollerMenuModel.java:72)
at
org.roller.presentation.tags.menu.MenuTag.prepareContext(MenuTag.java:63)
at
org.roller.presentation.tags.VelocityTag.doEndTag(VelocityTag.java:84)
at
org.roller.presentation.tags.HybridTag.doEndTag(HybridTag.java:64)
2. I can not access anything after I'm logged in
I get an error message after I am logged in: You are not
authorized to access that resource.
However I seem to be logged in. From my jboss.security.log I see
13:57:27,699 TRACE
[org.jboss.security.auth.spi.DatabaseServerLoginModule]
DatabaseServerLoginModule, dsJndiName=java:/jdbc/RollerDB
13:57:27,699 TRACE
[org.jboss.security.auth.spi.DatabaseServerLoginModule]
principalsQuery=SELECT passphrase FROM rolleruser WHERE username=?
13:57:27,699 TRACE
[org.jboss.security.auth.spi.DatabaseServerLoginModule]
rolesQuery=SELECT rolename, 'Roles' FROM userrole WHERE username=?
13:57:27,699 TRACE
[org.jboss.security.auth.spi.DatabaseServerLoginModule] login
13:57:27,699 TRACE
[org.jboss.security.auth.spi.DatabaseServerLoginModule] User
'bjossi' authenticated, loginOk=true
13:57:27,699 TRACE
[org.jboss.security.auth.spi.DatabaseServerLoginModule] commit,
loginOk=true
13:57:27,870 TRACE
[org.jboss.security.auth.spi.DatabaseServerLoginModule] Assign user
to role editor
13:57:27,870 TRACE
[org.jboss.security.plugins.JaasSecurityManager.roller-policy]
updateCache, subject=Subject:
Principal: bjossi
Principal: Roles(members:editor)
So I am a logged in user in role 'editor'.
Anyone out there with a successful JBoss Roller Weblogger Setup.
Anyone,, anyone.. :)
Best Regards,
Bjorn Ingimundarson