You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Wladimir Boton <wb...@gmail.com> on 2007/10/04 00:24:58 UTC

Login using Active Directory LDAP

Hi, I'm trying to use my corporate LDAP (on MS Active Directory) but it's
not working.

1) What is the configuration to do that?

2) How do I turn DEBUG log on? I add the line log4j.rootCategory=DEBUG,
roller-startup to the roller-custom.properties and it is showing some DEBUG
lines on the log file but not for all classes (specially the class regarding
the LDAP connection).

I'm using Roller 4.0 and Tomcat 5.5.

-- 
Wladimir Boton
http://www.wboton.com

Re: Login using Active Directory LDAP

Posted by Dave <sn...@gmail.com>.
On 10/5/07, Wladimir Boton <wb...@gmail.com> wrote:
> But It is not wrong I have to use JDNI if I want a LDAP login? the acegi
> should't use my JDBC (without JNDI configuration)?
> There is a security.xml configuration for JDBC instead of JNDI?

You should be able to come up with one, but it might require an extra
class or two.

If you do, please submit your changes as a patch. It would be nice to have.

- Dave

Re: Login using Active Directory LDAP

Posted by Wladimir Boton <wb...@gmail.com>.
It works.

But It is not wrong I have to use JDNI if I want a LDAP login? the acegi
should't use my JDBC (without JNDI configuration)?
There is a security.xml configuration for JDBC instead of JNDI?

bye


On 10/5/07, Dave <sn...@gmail.com> wrote:
>
> On 10/5/07, Wladimir Boton <wb...@gmail.com> wrote:
> > Roller is working normaly when I use the default login process (db).
> >
> > The mysql-connector-java-5.0.4-bin.jar is on the directory
> C:\Java\apache-
> > tomcat-5.5.20\common\lib
> > and the correct username and password was set in the
> > roller-custom.properties.
> >
> > Is there another place to setup this conection for the acegi?
> >
> > This is the security.xml part where is the dataSource.
> >
> >     <bean id="jdbcAuthoritiesPopulator" class="
> > org.apache.roller.weblogger.ui.core.security.AuthoritiesPopulator">
> >         <property name="dataSource">
> >             <bean class="org.springframework.jndi.JndiObjectFactoryBean
> ">
> >                 <property name="jndiName"
> > value="java:comp/env/jdbc/rollerdb"/>
> >             </bean>
> >         </property>
> >         <property name="authoritiesByUsernameQuery">
> >             <value>SELECT username,rolename FROM userrole WHERE username
> =
> > ?</value>
> >         </property>
> >     <property name="defaultRole"><value>admin</value></property>
> >     </bean>
>
> I have not tried to setup LDAP with Roller 4.0, but I believe that
> with the config you show above you will have to setup a JNDI
> accessible datasource for Roller. See section 9.3 in the installation
> guide for notes on how to do that.
>
> - Dave
>



-- 
Wladimir Boton
http://www.wboton.com

Re: Login using Active Directory LDAP

Posted by Dave <sn...@gmail.com>.
On 10/5/07, Wladimir Boton <wb...@gmail.com> wrote:
> Roller is working normaly when I use the default login process (db).
>
> The mysql-connector-java-5.0.4-bin.jar is on the directory C:\Java\apache-
> tomcat-5.5.20\common\lib
> and the correct username and password was set in the
> roller-custom.properties.
>
> Is there another place to setup this conection for the acegi?
>
> This is the security.xml part where is the dataSource.
>
>     <bean id="jdbcAuthoritiesPopulator" class="
> org.apache.roller.weblogger.ui.core.security.AuthoritiesPopulator">
>         <property name="dataSource">
>             <bean class="org.springframework.jndi.JndiObjectFactoryBean">
>                 <property name="jndiName"
> value="java:comp/env/jdbc/rollerdb"/>
>             </bean>
>         </property>
>         <property name="authoritiesByUsernameQuery">
>             <value>SELECT username,rolename FROM userrole WHERE username =
> ?</value>
>         </property>
>     <property name="defaultRole"><value>admin</value></property>
>     </bean>

I have not tried to setup LDAP with Roller 4.0, but I believe that
with the config you show above you will have to setup a JNDI
accessible datasource for Roller. See section 9.3 in the installation
guide for notes on how to do that.

- Dave

Re: Login using Active Directory LDAP

Posted by Wladimir Boton <wb...@gmail.com>.
Roller is working normaly when I use the default login process (db).

The mysql-connector-java-5.0.4-bin.jar is on the directory C:\Java\apache-
tomcat-5.5.20\common\lib
and the correct username and password was set in the
roller-custom.properties.

Is there another place to setup this conection for the acegi?

This is the security.xml part where is the dataSource.

    <bean id="jdbcAuthoritiesPopulator" class="
org.apache.roller.weblogger.ui.core.security.AuthoritiesPopulator">
        <property name="dataSource">
            <bean class="org.springframework.jndi.JndiObjectFactoryBean">
                <property name="jndiName"
value="java:comp/env/jdbc/rollerdb"/>
            </bean>
        </property>
        <property name="authoritiesByUsernameQuery">
            <value>SELECT username,rolename FROM userrole WHERE username =
?</value>
        </property>
    <property name="defaultRole"><value>admin</value></property>
    </bean>



On 10/4/07, Dave <sn...@gmail.com> wrote:
>
> On 10/4/07, Wladimir Boton <wb...@gmail.com> wrote:
> > I got to turn on the log.
> >
> > I am getting the following error and I don´t know what to do.
> >
> > 2007-10-04 20:00:08,546 [http-8080-Processor25] DEBUG
> > org.acegisecurity.ui.webapp.AuthenticationProcessingFilter -
> Authentication
> > request failed: org.acegisecurity.AuthenticationServiceException: Could
> not
> > get JDBC Connection; nested exception is
> > org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
> driver of
> > class '' for connect URL 'null'; nested exception is
> > org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get
> > JDBC Connection; nested exception is
> > org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
> driver of
> > class '' for connect URL 'null'
>
> That wonderful Tomcat error message usually means that something is
> wrong with your database connection configuration, for example
> incorrect database URL, username or password, or perhaps your JDBC
> driver jar is not the Tomcat classpath.
>
> - Dave
>



-- 
Wladimir Boton
http://www.wboton.com

Re: Login using Active Directory LDAP

Posted by Dave <sn...@gmail.com>.
On 10/4/07, Wladimir Boton <wb...@gmail.com> wrote:
> I got to turn on the log.
>
> I am getting the following error and I don´t know what to do.
>
> 2007-10-04 20:00:08,546 [http-8080-Processor25] DEBUG
> org.acegisecurity.ui.webapp.AuthenticationProcessingFilter - Authentication
> request failed: org.acegisecurity.AuthenticationServiceException: Could not
> get JDBC Connection; nested exception is
> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of
> class '' for connect URL 'null'; nested exception is
> org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get
> JDBC Connection; nested exception is
> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of
> class '' for connect URL 'null'

That wonderful Tomcat error message usually means that something is
wrong with your database connection configuration, for example
incorrect database URL, username or password, or perhaps your JDBC
driver jar is not the Tomcat classpath.

- Dave

Re: Login using Active Directory LDAP

Posted by Wladimir Boton <wb...@gmail.com>.
I got to turn on the log.

I am getting the following error and I don´t know what to do.

2007-10-04 20:00:08,546 [http-8080-Processor25] DEBUG
org.acegisecurity.ui.webapp.AuthenticationProcessingFilter - Authentication
request failed: org.acegisecurity.AuthenticationServiceException: Could not
get JDBC Connection; nested exception is
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null'; nested exception is
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get
JDBC Connection; nested exception is
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null'


On 10/3/07, Wladimir Boton <wb...@gmail.com> wrote:
>
> Hi, I'm trying to use my corporate LDAP (on MS Active Directory) but it's
> not working.
>
> 1) What is the configuration to do that?
>
> 2) How do I turn DEBUG log on? I add the line log4j.rootCategory=DEBUG,
> roller-startup to the roller-custom.properties and it is showing some
> DEBUG lines on the log file but not for all classes (specially the class
> regarding the LDAP connection).
>
> I'm using Roller 4.0 and Tomcat 5.5.
>
> --
> Wladimir Boton
> http://www.wboton.com
>



-- 
Wladimir Boton
http://www.wboton.com