You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by leofreesand <yu...@hotmail.com> on 2014/02/03 12:16:49 UTC

Re: How to enable LDAP authentication for Roller 5?‏‏

I sovled this problem finally!

First I checked tomcat logfile the above 500 error is caused by a 
java.lang.IllegalAccessError and found a solution there:
http://osdir.com/ml/java.springframework.user/2008-10/msg00017.html
(simply using spring-ldap-1.2.1.jar instead of spring-ldap-1.2.jar...)

Then when using ldap username/password the page will jump to 
roller-ui/login-redirect.rol and display a '500 
java.lang.NullPointerException' error -- the same error mentioned by Andreas 
Heizenreder's wiki page comment:
https://cwiki.apache.org/confluence/display/ROLLER/Roller+4.0+with+LDAP+and+CAS

Then I added folling code in 
roller-weblogger-5.0.3-source\weblogger-web\src\main\java\org\apache\roller\weblogger\ui\core\security\BasicUserAutoProvision.java:
public boolean execute(HttpServletRequest request) {
  User ud = CustomUserRegistry.getUserDetailsFromAuthentication(request);
  if(ud != null) {
    UserManager mgr;
    // leo-- 
    ud.setId(org.apache.roller.util.UUIDGenerator.generateUUID());
    // --leo

Now rebuild source code to get a new roller-weblogger-web-5.0.3.jar, when a 
ldap user logged in the program will create same user in rollerdb 
automatically.
(one more thing: the defaultRole for ldap user must be 'editor' instead of 
'register', or you will get a '403 Access Denied' error.)



Re: How to enable LDAP authentication for Roller 5?‏‏

Posted by Glen Mazza <gl...@gmail.com>.
Thanks for letting us know, I created a JIRA item to track the matter: 
https://issues.apache.org/jira/browse/ROL-1987

Glen

On 02/03/2014 06:16 AM, leofreesand wrote:
> I sovled this problem finally!
>
> First I checked tomcat logfile the above 500 error is caused by a 
> java.lang.IllegalAccessError and found a solution there:
> http://osdir.com/ml/java.springframework.user/2008-10/msg00017.html
> (simply using spring-ldap-1.2.1.jar instead of spring-ldap-1.2.jar...)
>
> Then when using ldap username/password the page will jump to 
> roller-ui/login-redirect.rol and display a '500 
> java.lang.NullPointerException' error -- the same error mentioned by 
> Andreas Heizenreder's wiki page comment:
> https://cwiki.apache.org/confluence/display/ROLLER/Roller+4.0+with+LDAP+and+CAS 
>
>
> Then I added folling code in 
> roller-weblogger-5.0.3-source\weblogger-web\src\main\java\org\apache\roller\weblogger\ui\core\security\BasicUserAutoProvision.java:
> public boolean execute(HttpServletRequest request) {
>  User ud = CustomUserRegistry.getUserDetailsFromAuthentication(request);
>  if(ud != null) {
>    UserManager mgr;
>    // leo-- 
> ud.setId(org.apache.roller.util.UUIDGenerator.generateUUID());
>    // --leo
>
> Now rebuild source code to get a new roller-weblogger-web-5.0.3.jar, 
> when a ldap user logged in the program will create same user in 
> rollerdb automatically.
> (one more thing: the defaultRole for ldap user must be 'editor' 
> instead of 'register', or you will get a '403 Access Denied' error.)
>
>