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 in the forums, please register and review our posting policy & tips. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack (11) Thread Tools Display Modes
  11 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 11-26-2005, 08:24 AM
Junior Member
 
Posts: 6
Default Extending authentication

Hello All,

I am trying to integrate Zimbar server with another private server.
The private server is actually a simple web application (jsp).
I want to support a single sign on mechanism. This means that if a user already authenticated himself against Zimbar he will not have to do it again against the private server. Where is best place to take a look at the Zimbra project.

Thanks, Ori
Reply With Quote
  #2 (permalink)  
Old 11-26-2005, 10:13 AM
Zimbra Employee
 
Posts: 4,784
Default

Well best way would be the reverse. You login to private and that will autologin you to Zimbra. You can us our SOAP api to auth the user and get an auth token. Josh is working on some PHP to do just that. If you want to have your private app auth against Zimbra you can check LDAP or would need to look at our source code to use our auth token.
Reply With Quote
  #3 (permalink)  
Old 11-26-2005, 02:42 PM
Junior Member
 
Posts: 6
Default

Thanks for the quick answer.

How can I get Josh's PHP page (when it be ready) ?
Reply With Quote
  #4 (permalink)  
Old 01-20-2006, 11:54 AM
Senior Member
 
Posts: 74
Default Autologin to Zimbra?

I guess the procedure will be,

1. get userid from current web session,
2. get "auth token",
3. call some url of zimbra to jump into zimbra.

Could you provide detailed info about 2 and 3??? I need to know

what "auth token" to retrive?
what url to pass the "auth token"?
what else parameters I need to pass? what's the http method to use?

Thanks.
Reply With Quote
  #5 (permalink)  
Old 01-20-2006, 01:34 PM
Zimbra Employee
 
Posts: 228
Default

Take a look at ZimbraServer/docs/preauth.txt (also attached) in the latest source release. It describes how to do exactly that.

I'll also attach a simple JSP that shows how to use preauth. The following line in the sample:

Code:
String redirect = generateRedirect(request, "user1");
Generates all the required preauth data to login as user1. You'd obviously want to change that to the user id you are preauth'ing. I modified this example slightly and didn't test it, so let me know if it doesn't work.
Attached Files
File Type: txt preauth.txt (9.6 KB, 1463 views)
File Type: txt preauth.jsp.txt (3.7 KB, 914 views)

Last edited by schemers : 02-14-2006 at 10:01 AM. Reason: attaching a file. fix example. attach example.
Reply With Quote
  #6 (permalink)  
Old 01-23-2006, 04:47 PM
Senior Member
 
Posts: 74
Default JSP help!!!

I used the java program in preauth.txt, compiled and ran it to generate preAuth, and manually passed it with other parameters to the /service/preauth?......, it works. This mechanism is not bad.

I loaded your preauth.jsp into webapps/zimbra, but can't get it compiled, even after I tried quite a few different things.

Could you please try it and post a working version?

Thanks.
Reply With Quote
  #7 (permalink)  
Old 01-23-2006, 04:49 PM
Zimbra Employee
 
Posts: 4,784
Default

Quote:
Originally Posted by jgao
I used the java program in preauth.txt, compiled and ran it to generate preAuth, and manually passed it with other parameters to the /service/preauth?......, it works. This mechanism is not bad.

I loaded your preauth.jsp into webapps/zimbra, but can't get it compiled, even after I tried quite a few different things.

Could you please try it and post a working version?

Thanks.
What error are you getting? Is there a stack trace?
__________________
Subscribe to our Blog - Bugzilla - Wiki - Downloads
Reply With Quote
  #8 (permalink)  
Old 01-23-2006, 05:33 PM
Senior Member
 
Posts: 74
Default preauth.jsp

I don't think it looks good or helpful if I post the compilation error here. You should get the same error as me if you load the jsp posted here by Schemers.

I'm running the preauth.jsp directly under webapps/zimbra, https, on M4 41.

Please.
Reply With Quote
  #9 (permalink)  
Old 01-23-2006, 06:02 PM
Zimbra Employee
 
Posts: 228
Default

we aren't shy, feel free to post. It looks like I just needed to remove the "return;" at the end. That code used to be in an if statement. I updated the example and it worked for me.

thanks.
Reply With Quote
  #10 (permalink)  
Old 01-24-2006, 09:09 AM
Senior Member
 
Posts: 74
Default Error

I changed only "user1" to "tester1@jian.cirrata.net", and error page is,

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 10 in the jsp file: /preauth.jsp
Generated servlet error:
Syntax error on token "<", ( expected

An error occurred at line: 10 in the jsp file: /preauth.jsp
Generated servlet error:
Syntax error, insert ")" to complete Expression

An error occurred at line: 10 in the jsp file: /preauth.jsp
Generated servlet error:
Syntax error on token "<", ( expected

An error occurred at line: 10 in the jsp file: /preauth.jsp
Generated servlet error:
Syntax error on token "(", invalid Expression

An error occurred at line: 10 in the jsp file: /preauth.jsp
Generated servlet error:
Syntax error on token "<", delete this token

An error occurred at line: 10 in the jsp file: /preauth.jsp
Generated servlet error:
Syntax error on token ">", delete this token

An error occurred at line: 10 in the jsp file: /preauth.jsp
Generated servlet error:
Syntax error on token "<", invalid AssignmentOperator

An error occurred at line: 10 in the jsp file: /preauth.jsp
Generated servlet error:
Syntax error on token "=", != expected

An error occurred at line: 10 in the jsp file: /preauth.jsp
Generated servlet error:
Syntax error on token "new", delete this token

An error occurred at line: 10 in the jsp file: /preauth.jsp
Generated servlet error:
Syntax error on token(s), misplaced construct(s)

An error occurred at line: 10 in the jsp file: /preauth.jsp
Generated servlet error:
Syntax error on token ")", : expected


org.apache.jasper.compiler.DefaultErrorHandler.jav acError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacEr ror(ErrorDispatcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateCla ss(JDTCompiler.java:397)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:288)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:267)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:255)
org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:296)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
com.zimbra.webClient.filters.SetHeaderFilter.doFil ter(SetHeaderFilter.java:283)
Reply With Quote
Reply


Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
External Authentication with Active Directory via LDAPS merrill Administrators 1 10-21-2007 01:13 PM
External LDAP Authentication Issue xtreme-one Installation 10 02-16-2007 06:52 PM
Authentication to external ldap stop working. jahaj Installation 3 12-05-2006 02:17 PM
ldap external authentication tdi Administrators 2 10-21-2006 04:53 AM
Does Zimbra support IMAP Secure Authentication? zzzzsg Administrators 3 05-26-2006 12:12 PM

Why Join?

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

Zimbrablog.com

sourceforge.net



 

Search Engine Optimization by vBSEO 3.1.0