| Issue 15: | Can't log in to new installation | |
| 2 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
Hi there, I can't login to my new OKS 4.0.5 installation.
This is my configuration:
$ java -version
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)
$ echo $CLASSPATH
.:/home/ontopia/webdir/oks-enterprise-4.0.5/lib/oks-enterprise.jar:/home/
ontopia/webdir/oks-enterprise-4.0.5/apache-tomcat/common/lib/servlet-
api.jar:/home/ontopia/webdir/oks-enterprise-4.0.5/apache-tomcat/common/lib/
jsp-api.jar:/home/ontopia/webdir/oks-enterprise-4.0.5/apache-tomcat/common/
lib/standard.jar:/home/ontopia/webdir/oks-enterprise-4.0.5/apache-tomcat/
common/lib/jstl.jar:/home/ontopia/webdir/oks-enterprise-4.0.5/apache-
tomcat/server/lib/oks-realm.jar
This was initialized in .bashrc.
All files refered to in the CLASSPATH do actually exist.
changed webapps/omnigator/WEB-INF/topicmaps/userman.ltm
added:
[bock : user = "Benjamin Bock"]
{bock, username, [[bock]]}
{bock, password, [[okgoohno]]}
plays-role(bock : user, gold-users : role)
plays-role(bock : user, ontopoly-users : role)
(neither bock nor johndoe worked)
also changed "users" to "gold-users" in webapps/accessctl/WEB-INF/web.xml,
neither user nor gold-users worked for bock nor johndoe
76 <auth-constraint>
77 <role-name>gold-users</role-name>
78 </auth-constraint>
and
90 <security-role>
91 <role-name>gold-users</role-name>
92 </security-role>
The Stacktrace from logs/tomcat.log:
WARN 2009-05-23 13:44:46,315 realm.JAASRealm - Login exception
authenticating username "bock"
javax.security.auth.login.LoginException: unable to find LoginModule
class: net.ontopia.topicmaps.nav2.realm.TMLoginModule
at javax.security.auth.login.LoginContext.invoke
(LoginContext.java:808)
at javax.security.auth.login.LoginContext.access
$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run
(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv
(LoginContext.java:680)
at javax.security.auth.login.LoginContext.login
(LoginContext.java:579)
at org.apache.catalina.realm.JAASRealm.authenticate
(JAASRealm.java:366)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate
(FormAuthenticator.java:258)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:417)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
|
||||||||||||||
,
Jun 18, 2009
LMG wrote (per Mail): [...] Are you sure you want to use the topic map to store user information, though? You can use any authentication module you want to. Ontopia doesn't require you to use this particular one. --- Which is the prefered way to do authentication with Ontopia? It would be nice if some way of authentication worked out of the box. |
|||||||||||||||
,
Jun 18, 2009
There is no preference. Usually, customers have their own requirements (like Windows Domains or whatever), and so we've gone with that. The Topic Maps realm have been used for some customers who don't have anything pre-existing. I agree that this realm *should* work out of the box. So this is a bug that needs to be fixed. However, we can't do it right now, because we're working on getting the project set up. In cases like that I always try to propose a workaround for the user in the meantime. In your case, the workaround is to use some other authentication method. :) But we *will* fix this. |
|||||||||||||||
,
Jul 07, 2009
The TM-realm used to be the default out of the box, provided in the oks-realm.jar located in the apache-tomcat/server/lib directory. A quick fix that helped me out was copying the jar from an older OKS version. |
|||||||||||||||
,
Jul 07, 2009
From what I can see the ontopia-realm.jar is part of the new Ontopia 5.0.0b2 release: ontopia-5.0.0b2/apache-tomcat/server/lib/ontopia-realm.jar |
|||||||||||||||
,
Jul 08, 2009
Does this problem persist in Ontopia 5.0.0? |
|||||||||||||||
,
Jul 27, 2009
Just tried it myself, and, yes, the problem persists.
The same error message appears in the logs:
javax.security.auth.login.LoginException: unable to find LoginModule
class: net.ontopia.topicmaps.nav2.realm.TMLoginModule
at javax.security.auth.login.LoginContext.invoke
(LoginContext.java:808)
server/lib does contain the ontopia-realm.jar, and that does contain the
net.ontopia.topicmaps.nav2.realm.TMLoginModule class.
Not sure how to approach this, but it clearly is a bug, and the old fix clearly no
longer works.
Status: Accepted
|
|||||||||||||||
,
Aug 17, 2009
A user reports the following showing up in the logs on startup: ERROR 2009-08-13 07:09:48,462 realm.JAASRealm - Class net.ontopia.topicmaps.nav2.realm.UserPrincipal not found! Class not added. ERROR 2009-08-13 07:09:48,463 realm.JAASRealm - Class net.ontopia.topicmaps.nav2.realm.RolePrincipal not found! Class not added. This might be the real cause of the problem. Need to investigate further. |
|||||||||||||||
,
Aug 18, 2009
Investigated these classes, but they are in the .jar and everything seems fine. Tried googling possible causes, but came up empty-handed. It may be that we have to post to one of the Tomcat mailing lists to see if we can get some help. |
|||||||||||||||
,
Sep 02, 2009
I ran into the same problem. An extra clue might be that I included a handmade jar into the server/lib directory that used to work in earlier versions (tried upto 3.4.4), but fails in 5.0.0. It could be that JAASRealm no longer searches the server/lib directory when looking for classes. Seems like a Tomcat issue indeed. I confirm the message in comment 7 from a clean version 5.0.0 install. The message is generated while reading the conf/server.xml file. |
|||||||||||||||
,
Sep 02, 2009
We've tracked this issue down to a difference in server/lib/catalina-optional.jar which contains org.apache.catalina.realm.JAASRealm. Google showed me that changes in that class seem to impact useContextClassLoader. Reverting to an earlier catalina-optional.jar solved this issue for us for now. We'll keep searching for a more elegant solution. |
|||||||||||||||
,
Sep 02, 2009
Great to finally see some progress on this issue. Even if this isn't the ideal fix, at least it gives some indication of what's wrong. I'm transferring the issue to you, since you're the only one working actively on it right now. Great if you can solve this. If you can do so quickly enough we can get the fix into 5.0.1. Otherwise it'll wait for 5.0.2.
Owner: p.kruijsen
|
|||||||||||||||
,
Sep 02, 2009
It is indeed the useContextClassLoader setting that causes this issue. Documentation is at the bottom of {ontopia}/webapps/tomcat-docs/config/realm.html. The
default value 'true' turned out to cause a bug in Catalina, reported in https://issues.apache.org/bugzilla/show_bug.cgi?id=44084. Its fix in Tomcat 5.5.26 caused
our issue from OKS 4.0.3 onwards.
Resolution is to add the attribute useContextClassLoader="false" in every "Realm" element with className="org.apache.catalina.realm.JAASRealm" in
conf/server.xml. I've added the attribute in ontopia/ontopia/src/dist/tomcat/server.xml for the accessctl webapp in revision 459.
Status: Fixed
|
|||||||||||||||
,
Sep 03, 2009
Verified that the fix worked. Excellent work! :)
Status: Verified
Labels: Release5.0.1 |
|||||||||||||||
|
|
|||||||||||||||