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-21-2006, 03:47 PM
Intermediate Member
 
Posts: 22
Default Zimlets calling http urls

I cannot find it again but whilst scanning the docs a few weeks ago I saw the zimbra_url zimlet mention it would get http url's only.

Since this time I have installed Zimbra server and like very much. I have played with installing the zimlets but find myself spending lot of time accessing https sites such as my employers intranet, bugzilla over https etc. The url and bugz zimlets in particular simply do not work.

Not being a AJAX coder, is there a techinical reason why https will not work?

Thanks,
David
Reply With Quote
  #2 (permalink)  
Old 01-30-2009, 09:32 AM
Senior Member
 
Posts: 54
Default

I was just wondering the same...

I need to make get/post requests to an API on a server which will accept just https connections.... By using (Please notice that allowedDomains is set in config_template.xml, tried both "https://<externalAPIserver>" and "<externalAPIserver>" as values):

Code:
this.sendRequest(requestParams, url, null ,this._callback, false, true)
Firebug says

Code:
http://<zimbrahostname>/service/proxy?target=https%3A%2F%2F<externalAPIserver>%2Fapi&param1=1&param2=45 403 Forbidden
I think this is due to the fact that I'm not requesting this url via the browser (perfectly working), this leads me to think that I don't have the certificates stored to negotiate the communication on the server as well.

Assuming I'm right, somebody has an idea on how to add certificates for the allowedDomains?!?!
Reply With Quote
  #3 (permalink)  
Old 02-05-2009, 09:30 AM
Senior Member
 
Posts: 54
Default

I chose to undergo the JSP way.

I added the host CA to the cacerts file in the bundled jetty, and used the HttpsOpenConnection() function. Nevertheless, doing the same via sendRequest method provided by ZmZimletBase should be a ToDo task IMHO...
Reply With Quote
  #4 (permalink)  
Old 02-06-2009, 09:27 AM
Zimlet Guru & Moderator
 
Posts: 265
Default

Quote:
Originally Posted by caio80 View Post
I was just wondering the same...

I need to make get/post requests to an API on a server which will accept just https connections.... By using (Please notice that allowedDomains is set in config_template.xml, tried both "https://<externalAPIserver>" and "<externalAPIserver>" as values):

Code:
this.sendRequest(requestParams, url, null ,this._callback, false, true)
Firebug says

Code:
http://<zimbrahostname>/service/proxy?target=https%3A%2F%2F<externalAPIserver>%2Fapi&param1=1&param2=45 403 Forbidden
Did you add a permission for the zimbra proxy to access this url?
You can verify it with a command line on the server :
zmprov gc <COS>

look if you have a line :
zimbraProxyAllowedDomains <externalAPIserver>

If not, you can add it like this :
zmprov mc <COS> +zimbraProxyAllowedDomains <externalAPIserver>
Reply With Quote
  #5 (permalink)  
Old 02-09-2009, 06:54 AM
Senior Member
 
Posts: 54
Default

I'm sure I correctly set the allowedDomains entry.

What I gotta check is whether setting the above applies even when working via the _dev dir facility.

As soon as I have some spare time, I'll reload the old code, and try it again, checking with "zmprov gc ...".

I'll keep you up to date.
Reply With Quote
  #6 (permalink)  
Old 02-09-2009, 09:08 AM
Zimbra Employee
 
Posts: 187
Default

>Please notice that allowedDomains is set in config_template.xml
you must *deploy* the zimlet for this to work. But, if you have your zimlet in _dev folder as well, it would create two zimlet instances. So, one way to do this is to create a dummy zimlet and set alloweddomains in that, then deploy that dummy zimlet. After that your actual zimlet in _dev will start working.

other way is to set it through backend.. zmprov mc <COS> +zimbraProxyAllowedDomains <externalAPIserver>
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #7 (permalink)  
Old 02-09-2009, 09:38 AM
Senior Member
 
Posts: 54
Default

Thanks rrao,

that would explain it!

I'll try in the next future, letting you know the outcome.
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.