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

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 08-06-2008, 07:41 AM
Junior Member
 
Posts: 7
Default [SOLVED] SOAP AuthRequest for SSO-style Authentication

I'm not one for asking for help but this one's got me stumped. I've searched through the forums and could not find a solution that helped with my particular problem. I'm trying to have my Zimlet call a web service (via /service/proxy) and the communication works fine but one thing I'm doing is passing the ZM_AUTH_TOKEN to my web service where I then proceed to send a SOAP call back to Zimbra to authenticate the user. Unfortunately, and I've tried many variations of this SOAP call, the call always fails with the same error message: service.AUTH_REQUIRED (no valid authtoken present)

Here's a look at the SOAP I am both sending and receiving:

Send:
Code:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
     <soap:Header>
          <context xmlns="urn:zimbra" />
     </soap:Header>
     <soap:Body>
          <AuthRequest xmlns="urn:zimbraAccount">
               <authToken>[ZM_AUTH_TOKEN]</authToken>
          </AuthRequest>
     </soap:Body>
</soap:Envelope>
Where the [ZM_AUTH_TOKEN] is *actually* the ZM_AUTH_TOKEN passed from the Zimlet in the service call (regex: /[0-9]_[a-z0-9]{40}_[a-z0-9]{200}/).

Response from Zimbra:
Code:
HTTP/1.1 500 Internal Server Error
Date: Wed, 06 Aug 2008 14:28:49 GMT
Content-Type: text/xml; charset=utf-8
Content-Length: 473

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
     <soap:Header>
          <context xmlns="urn:zimbra"/>
     </soap:Header>
     <soap:Body>
          <soap:Fault>
               <soap:Code>
                    <soap:Value>soap:Sender</soap:Value>
               </soap:Code>
               <soap:Reason>
                    <soap:Text>no valid authtoken present</soap:Text>
               </soap:Reason>
               <soap:Detail>
                    <Error xmlns="urn:zimbra">
                         <Code>service.AUTH_REQUIRED</Code>
                         <Trace>btpool0-2:1218032929477:c2fb88ceae4b666a</Trace>
                    </Error>
               </soap:Detail>
          </soap:Fault>
     </soap:Body>
</soap:Envelope>
As far as I can tell, according to the limited documentation I've seen for SOAP & Zimbra this is perfectly fine, but it's obviously not working...
__________________
Jon

Last edited by jonnybravo; 08-06-2008 at 10:40 AM..
Reply With Quote
  #2 (permalink)  
Old 08-06-2008, 08:47 AM
Junior Member
 
Posts: 7
Default

Yeah, turns out I was doing everything A-OK. Hopefully this post can serve as a guide for anyone looking to do the same thing. The problem turned out to be an environment issue that was causing me to send requests to the wrong mail server.
__________________
Jon
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.