| 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.
|  | | 
11-26-2005, 09:24 AM
| | | 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 | 
11-26-2005, 11:13 AM
| | Zimbra Employee | |
Posts: 4,784
| | 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. | 
11-26-2005, 03:42 PM
| | | Thanks for the quick answer.
How can I get Josh's PHP page (when it be ready) ? | 
01-20-2006, 12:54 PM
| | | 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. | 
01-20-2006, 02:34 PM
| | Zimbra Employee | |
Posts: 228
| | 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.
Last edited by schemers : 02-14-2006 at 11:01 AM.
Reason: attaching a file. fix example. attach example.
| 
01-23-2006, 05:47 PM
| | | 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. | 
01-23-2006, 05:49 PM
| | Zimbra Employee | |
Posts: 4,784
| | 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? | 
01-23-2006, 06:33 PM
| | | 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. | 
01-23-2006, 07:02 PM
| | Zimbra Employee | |
Posts: 228
| | 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. | 
01-24-2006, 10:09 AM
| | | 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) | | Thread Tools | | | | Display Modes | Linear Mode | | Why Join? Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.  |