Results 1 to 4 of 4

Thread: Custom Auth problem

  1. #1
    jginzburg is offline New Member
    Join Date
    May 2008
    Posts
    3
    Rep Power
    7

    Question Custom Auth problem

    Hello,

    Ive implemented a Radius Custom Auth extension, as depicted in the Admin Guide.
    This is currently its (very simplified) source:
    public class RadiusCustomAuth extends ZimbraCustomAuth {
    Logger logger;
    public void authenticate(Account account, String pass,
    Map<String, Object> arg2, List<String> arg3) throws Exception {
    logger.info("RadiusCustomAuth: authenticating...");
    }

    public RadiusCustomAuth() {
    super();
    Logger logger = Logger.getLogger(this.getClass().getName());
    logger.info("RadiusCustomAuth created");
    }
    }
    I've hooked it to the Zimbra server using the Zimbra extension framework.I've registered this custom auth mechanism under the name "Radius" and I've also enabled the example.com domain for using this handler (by using zmprov modifydomain example.com zimbraAuthMech custom:Radius).
    When I restart the server I can see in the log that my RadiusCustomAuth handler is loaded because the line "RadiusCustomAuth created" is printed.
    But when I try to authenticate a user, instead of "RadiusCustomAuth: authenticating..." this is the log I get:

    2008-05-12 18:36:27,214 INFO [btpool0-0] [] AuthProvider - Adding auth provider: zimbra com.zimbra.cs.service.ZimbraAuthProvider
    2008-05-12 18:36:27,322 INFO [btpool0-0] [ua=zclient/5.0.5_GA_2201.RHEL5;oip=10.8.13.18;] SoapEngine - handler exception: authentication failed for user01@example.com,

    The Radius handler is associated to this domain (I'm sure on this because if I associate an inexistent handler to this domain I get "handler anInexistentHandler for custom auth for domain example.com not found" when authenticating the user).

    Any ideas why I'm getting this handler exception instead of my silly log?

  2. #2
    Greg is offline Zimbra Employee
    Join Date
    Sep 2005
    Location
    Tucson - San Francisco - Moscow
    Posts
    127
    Rep Power
    9

    Default

    Looks like you are doing everything correctly. A couple of questions:
    - how do you know that your auth handler is not being triggered?
    - what is the log level in /opt/zimbra/conf/log4j.properties.in
    Bugzilla - Wiki - Downloads - Before posting... Search!
    P.S.: don't forget to vote on this bug
    add Samba LDAP entries to Exchange Migration Tool

  3. #3
    Greg is offline Zimbra Employee
    Join Date
    Sep 2005
    Location
    Tucson - San Francisco - Moscow
    Posts
    127
    Rep Power
    9

    Default

    Another comment, your extension should consist of minimum two classes
    1) class that implements ZimbraExtension
    2) class that extends ZimbraCustomAuth
    MANIFEST file in the jar has to point to the class that implements ZimbraExtension, e.g.:

    Code:
    Zimbra-Extension-Class: com.zimbra.cs.service.radius.RadiusCustomAuth
    Class that implements ZimbraExtension should have "init" method that will register the extension at run-time:


    Code:
    public class RadiusAuthModuleExtension implements ZimbraExtension {
        public void init() {
    
            ZimbraCustomAuth.register("radius", new RadiusAuth());
        }
    
        public void destroy() {
            ExtensionDispatcherServlet.unregister(this);
        }
        
        public String getName() {
            return "radius";
        }
    }
    Bugzilla - Wiki - Downloads - Before posting... Search!
    P.S.: don't forget to vote on this bug
    add Samba LDAP entries to Exchange Migration Tool

  4. #4
    dlopezleon is offline Starter Member
    Join Date
    Jul 2008
    Posts
    1
    Rep Power
    7

    Default

    Hi Greg, thank you for answering.
    We solved that problem. As you said we were doing things fine (I just added the destroy method you gave us but the problem wasn't there).
    The thing was that the users we tried to authenticate were users that didn't have an account in our zimbra. We though that it would first check if the user was valid and then try to get the right inbox, but it was the other way around (which makes more sense now :P).
    Thanks for your help.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. New Installation Postifix Problem
    By ranpel in forum Administrators
    Replies: 6
    Last Post: 12-24-2009, 01:48 PM
  2. [SOLVED] How to deploy a Custom Auth Handler?
    By jginzburg in forum Developers
    Replies: 1
    Last Post: 05-12-2008, 09:42 AM
  3. memcached and nginx pop3/imap auth problem.
    By serivo in forum Administrators
    Replies: 3
    Last Post: 04-22-2008, 09:13 AM
  4. [SOLVED] NE Migration: SMTP AUTH Failure
    By markpr in forum Installation
    Replies: 14
    Last Post: 10-03-2007, 12:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •