Marc-- it seems pretty clear to me that the issues are with your own code rather than JSPWiki.

That said, it might be a good thing for us to have a LDAP UserDatabase implementation, finally. Would you be willing to donate your code as a starting point? If so, could you please create a new issue in JIRA? Mark it as an enhancement.

Andrew

On Oct 29, 2008, at 7:03, [EMAIL PROTECTED] wrote:

Andrew,

I found the reason why UserPreferences and Login page do not load: there are constantly findByUid calls (all with a different uid it seems) fired to the UserDatabase.
This seems a bug to me ?
The getWikiNames() that returns an empty array is also a problem.

regards,
Marc



Andrew,

thanks for the quick reply. I forgot to mention that I could not find that UPGRADING document, it's not available in the binary distribution (I found it now in the source distribution). I have tried a few things but nothing has changed. getWikiNames() indeed returns null because it will only return a wiki name for someone who is logged in because we use this custom LDAP implementation only for this (which is not required), this was not a problem in 2.4 but it seems to me that has this changed now ?

- What do you mean with "UserProfile custom properties ", is this the Map with Attributes ? What are these attributes then ? (they seem to be optional) - "your user database implementation does not implement finding by unique ID": it does (but it returns null, as I said we only use findByLoginName) - what is "Principal[] getWikiNames()" supposed to return ? All the wikinames in the database (as it seems to be done in the other Userdatabase implementations)?

A few settings in the properties file that are perhaps also usefull:
- jspwiki.cookieAssertions=true
- cookie authentication is off
jspwiki.authorizer = com.ecyrd.jspwiki.auth.authorize.WebContainerAuthorizer (same as in 2.4)

regards,
Marc



Begin doorgestuurd bericht:


Van: Andrew Jaquith <[EMAIL PROTECTED]>
Datum: 27 oktober 2008 16:47:24 GMT+01:00
Aan: "[email protected]" <[email protected] >
Onderwerp: Antw.: JSPWiki 2.8 Authentication troubles
Antwoord aan: [email protected]


Marc - we changed the contract for UserDatabase slighttly. I thought we documented the required changes in the UPGRADING document. However, you can get the details from the UserDatabase javadoc.

That said, here's what the problem is likely to be:
- your user database implementation does not implement finding by unique ID - your UserDatabase implementation does not implement UserProfile custom properties (a new 2.8 feature)

The empty array might also be the root cause... Let me know what you find.

Andrew

On Oct 27, 2008, at 8:57, [EMAIL PROTECTED] wrote:


Hi,



we are currently running JSPWiki 2.4, with our own custom LDAP login- and Userdatabase module, and we want to upgrade to 2.8.

However we have troubles with the new implemented Authorisation & Authentication:

- navigating to the Login or Userpreferences page does not work, the page gets not loaded, no error or warning is given, nothing to find in the logs (even in debug mode) except for the following lines:

"INFO com.ecyrd.jspwiki.auth.UserManager - Attempting to load user database class ... .LDAPUserDatabase

INFO com.ecyrd.jspwiki.auth.user.AbstractUserDatabase - Initializing LDAP database ...

INFO com.ecyrd.jspwiki.auth.UserManager  - UserDatabase initialized."

So it seems that our Userdatbase is initialized correctly.



- I tried to go to the Admin and SecurityConfig pages and these gave me following errors:

* Admin page:

"An error occurred while getting property "wikiNames" from an instance of class ... .LDAPUserDatabase.

Exception

 javax.servlet.jsp.el.ELException

Place where detected

 org.apache.commons.el.Logger.logError(), line 484"



* SecurityConfig:

"Error Message

An unknown exception java.lang.NullPointerException was caught by Error.jsp.

Exception

 java.lang.NullPointerException

Place where detected

 com.ecyrd.jspwiki.auth.WikiPrincipal.hashCode(), line 145 "



Our implementation only returns a profile for "findByLoginName", that was never a problem, and "getWikiNames" probably always returns an empty array, maybe that is the problem ?



regards,

Marc Patteet










Reply via email to