Page 1 of 4 123 ... LastLast
Results 1 to 10 of 34

Thread: Extending authentication

  1. #1
    Join Date
    Nov 2005
    Posts
    6
    Rep Power
    9

    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

  2. #2
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    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.

  3. #3
    Join Date
    Nov 2005
    Posts
    6
    Rep Power
    9

    Default

    Thanks for the quick answer.

    How can I get Josh's PHP page (when it be ready) ?

  4. #4
    Join Date
    Dec 2005
    Posts
    74
    Rep Power
    9

    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.

  5. #5
    Join Date
    Aug 2005
    Posts
    228
    Rep Power
    10

    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 Attached Files
    Last edited by schemers; 02-14-2006 at 10:01 AM. Reason: attaching a file. fix example. attach example.

  6. #6
    Join Date
    Dec 2005
    Posts
    74
    Rep Power
    9

    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.

  7. #7
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    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?
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  8. #8
    Join Date
    Dec 2005
    Posts
    74
    Rep Power
    9

    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.

  9. #9
    Join Date
    Aug 2005
    Posts
    228
    Rep Power
    10

    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.

  10. #10
    Join Date
    Dec 2005
    Posts
    74
    Rep Power
    9

    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)

Similar Threads

  1. Does Zimbra support IMAP Secure Authentication?
    By zzzzsg in forum Administrators
    Replies: 6
    Last Post: 11-06-2009, 06:19 PM
  2. External Authentication with Active Directory via LDAPS
    By merrill in forum Administrators
    Replies: 1
    Last Post: 10-21-2007, 01:13 PM
  3. External LDAP Authentication Issue
    By xtreme-one in forum Installation
    Replies: 10
    Last Post: 02-16-2007, 06:52 PM
  4. Authentication to external ldap stop working.
    By jahaj in forum Installation
    Replies: 3
    Last Post: 12-05-2006, 02:17 PM
  5. ldap external authentication
    By tdi in forum Administrators
    Replies: 2
    Last Post: 10-21-2006, 04:53 AM

Posting Permissions

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