Hi,

I encountered a weird behaviour when I drop SIPXCONFIG DB and restart the
server:

When I try to login with superadmin I get:

HTTP ERROR: 500

Manager user name  cannot be empty or null.

RequestURI=/sipxconfig/j_acegi_security_check

*Powered by Jetty:// <http://jetty.mortbay.org/>*


This is because there is no principal (manager user) set for LDAP at
startup:

"2010-09-19T18:46:24.909000Z":667:JAVA:WARNING:decebal.buc.ro:P1-19:00000000:sipXconfig-web:"/sipxconfig/j_acegi_security_check:
"
java.lang.IllegalArgumentException: Manager user name  cannot be empty or
null.
    at org.springframework.util.Assert.hasLength(Assert.java:136)
    at
org.acegisecurity.ldap.DefaultInitialDirContextFactory.setManagerDn(DefaultInitialDirContextFactory.java:293)
    at
org.sipfoundry.sipxconfig.security.ConfigurableLdapAuthenticationProvider.getDirFactory(ConfigurableLdapAuthenticationProvider.java:135)

sipXconfig tries to create the LDAP authenticator but fails because LDAP
bind manager is null at startup

On the back scenes, spring requires a not null LDAP bind user (principal)
value:

>From DefaultInitialDirContextFactory:

    /**
     * Sets the directory user to authenticate as when obtaining a context
using the
     * <tt>newInitialDirContext()</tt> method.
     * If no name is supplied then the context will be obtained anonymously.
     *
     * @param managerDn The name of the "manager" user for default
authentication.
     */
    public void setManagerDn(String managerDn) {
        Assert.hasLength(managerDn, "Manager user name  cannot be empty or
null.");
        this.managerDn = managerDn;
    }


IMO, sipXconfig should not try to create a LDAP authenticator when there is
no LDAP configured on the system
(ConfigurableLdapAuthenticator.createProvider method)

Did this happen to anyone else? I am very surprised, because I never saw
this behaviour until now...

Mircea
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev/

Reply via email to