Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-20-2010, 03:09 PM
Starter Member
 
Posts: 4
Default Custom Authentication

A question , I'm planning to implement a Cuatom Authentication and my question is : Is this feature enable in Open Source Edition?


We are using the ZCS version Open Source.
Acording to
Account Authentication
Custom Authentication - zimbraCustomAuth

1) We Implement a custom handler (java class), MANIFEST file and install the jar file in lib/ext directory.

Java class looks like:

public class ZimbraDatabaseAuthentication extends ZimbraCustomAuth implements ZimbraExtension{
...
@Override
public void authenticate(Account acct, String password,
Map<String, Object> context, List<String> args) throws Exception {
System.out.println("***CUSTOM LOGGER AUTHENTICATION***");
}


@Override
public void init() {
ZimbraCustomAuth.register("sample", new ZimbraDatabaseAuthentication());
}
.....

}

And MANIFEST file
Zimbra-Extension-Class: Zimbra-Extension-Class: test.ZimbraDatabaseAuthentication


2) We run the command
zmprov modifydomain zclarin.lab zimbraAuthMech custom:sample

3) Restart the zimbra server

Now, in administration console appears new custom:sample but when run test button shows an error message in console:
soap:Sender
invalid request: auth mech must be: ldap or ad

When access to zimbra show error :
2010-04-21 10:05:51,454 INFO [btpool0-9://localhost:7071/service/admin/soap/GetDomainInfoRequest] [ip=127.0.0.1;] soap - GetDomainInfoRequest
2010-04-21 10:05:51,605 INFO [btpool0-7://localhost/service/soap/AuthRequest] [oip=10.53.5.104;ua=zclient/6.0.5_GA_2213.RHEL5_64;] soap - AuthRequest
2010-04-21 10:05:51,666 INFO [btpool0-7://localhost/service/soap/AuthRequest] [name=test@zclarin.lab;oip=10.53.5.104;ua=zclient/6.0.5_GA_2213.RHEL5_64;] SoapEngine - handler exception: authentication failed for test@zclarin.lab, handler sample for custom auth for domain zclarin.lab not found
2010-04-21 10:05:51,684 INFO [btpool0-7://localhost:7071/service/admin/soap/GetDomainInfoRequest] [ip=127.0.0.1;] soap - GetDomainInfoRequest


Custom authentication is supported in Open source versions ?

Last edited by muchimura; 04-21-2010 at 08:41 AM..
Reply With Quote
  #2 (permalink)  
Old 04-21-2010, 02:30 AM
Zimbra Employee
 
Posts: 70
Default

One can surely do custom authentication with zimbra by writing a server extension. Can you eloborate on your use case?
Reply With Quote
  #3 (permalink)  
Old 04-21-2010, 08:48 AM
Starter Member
 
Posts: 4
Default

Yes,

We are using the ZCS version Open Source.
Acording to
Account Authentication
Custom Authentication - zimbraCustomAuth

1) We Implement a custom handler (java class), MANIFEST file and install the jar file in lib/ext directory.

Java class looks like:

public class ZimbraDatabaseAuthentication extends ZimbraCustomAuth implements ZimbraExtension{
...
@Override
public void authenticate(Account acct, String password,
Map<String, Object> context, List<String> args) throws Exception {
System.out.println("***CUSTOM LOGGER AUTHENTICATION***");
}


@Override
public void init() {
ZimbraCustomAuth.register("sample", new ZimbraDatabaseAuthentication());
}
.....

}

And MANIFEST file
Zimbra-Extension-Class: Zimbra-Extension-Class: test.ZimbraDatabaseAuthentication


2) We run the command
zmprov modifydomain zclarin.lab zimbraAuthMech custom:sample

3) Restart the zimbra server

Now, in administration console appears new custom:sample but when run test button shows an error message in console:
soap:Sender
invalid request: auth mech must be: ldap or ad

When access to zimbra show error :
2010-04-21 10:05:51,454 INFO [btpool0-9://localhost:7071/service/admin/soap/GetDomainInfoRequest] [ip=127.0.0.1;] soap - GetDomainInfoRequest
2010-04-21 10:05:51,605 INFO [btpool0-7://localhost/service/soap/AuthRequest] [oip=10.53.5.104;ua=zclient/6.0.5_GA_2213.RHEL5_64;] soap - AuthRequest
2010-04-21 10:05:51,666 INFO [btpool0-7://localhost/service/soap/AuthRequest] [name=test@zclarin.lab;oip=10.53.5.104;ua=zclient/6.0.5_GA_2213.RHEL5_64;] SoapEngine - handler exception: authentication failed for test@zclarin.lab, handler sample for custom auth for domain zclarin.lab not found
2010-04-21 10:05:51,684 INFO [btpool0-7://localhost:7071/service/admin/soap/GetDomainInfoRequest] [ip=127.0.0.1;] soap - GetDomainInfoRequest


Custom authentication is supported in Open source versions ?
Reply With Quote
  #4 (permalink)  
Old 07-13-2011, 06:11 AM
Special Member
 
Posts: 117
Default

Did you find the solution? I am having the same problem.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.