Results 1 to 7 of 7

Thread: Zimlets calling http urls

  1. #1
    DGS_David is offline Intermediate Member
    Join Date
    Aug 2006
    Location
    Somerset, UK
    Posts
    22
    Rep Power
    9

    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

  2. #2
    caio80 is offline Senior Member
    Join Date
    Mar 2007
    Location
    Ferrara, Italy
    Posts
    55
    Rep Power
    8

    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?!?!

  3. #3
    caio80 is offline Senior Member
    Join Date
    Mar 2007
    Location
    Ferrara, Italy
    Posts
    55
    Rep Power
    8

    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...

  4. #4
    tdesorbaix is offline Zimlet Guru & Moderator
    Join Date
    Apr 2007
    Location
    Paris, France
    Posts
    367
    Rep Power
    8

    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>

  5. #5
    caio80 is offline Senior Member
    Join Date
    Mar 2007
    Location
    Ferrara, Italy
    Posts
    55
    Rep Power
    8

    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.

  6. #6
    rrao is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    187
    Rep Power
    9

    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!

  7. #7
    caio80 is offline Senior Member
    Join Date
    Mar 2007
    Location
    Ferrara, Italy
    Posts
    55
    Rep Power
    8

    Default

    Thanks rrao,

    that would explain it!

    I'll try in the next future, letting you know the outcome.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Order of zimlets in Zimlets panel
    By Abak in forum Zimlets
    Replies: 2
    Last Post: 01-05-2009, 02:17 PM
  2. Zimlets Webinar: July 24th
    By GregA in forum Webinars
    Replies: 12
    Last Post: 09-12-2007, 09:24 PM
  3. where are my zimlets ?
    By santo in forum Zimlets
    Replies: 21
    Last Post: 06-05-2007, 07:30 AM
  4. Can't Deploy Zimlets after upgrade to 4.5.5
    By ajsp in forum Installation
    Replies: 2
    Last Post: 05-17-2007, 07:17 AM
  5. Graphs and Zimlets not displaying?
    By nadia007 in forum Installation
    Replies: 13
    Last Post: 11-24-2006, 07:51 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
  •