How to use HTML include macro for https URLs
Asked by hemanth acharya:

Hi,

How can I use the HTML macro to include the <https://someurl/> . It keeps throwing "Could not retrieve" page not permitted error. I added the url to the Whitelist as well.

Also, if Application link is the way to go, Can I just configure an outgoing link? I just want the contents from that site to be shown in confluence.

Thanks,

Hemanth


Answers:
author: Stephen Deutsch
body: You might try using an iframe? You can either include the iframe code in the HTML macro or use the iframe macro included in the content formatting plugin (free for that part).

comments: author: hemanth acharya
body: Using an iframe didn't work either. I mean there is still error.


author: hemanth acharya
body: Sorry it got resolved using an iframe. I embedded the iframe in the html code macro. Before that I put the url in the whitelist as a wildcard expression and allowed the incoming link, and this resolved.


author: Gopalakrishnan
body: The code which am trying to include, we don't want to have iframe since the height and width audjust dynamically, so I dont want to use iFrame.

Also I tried with Confidoc plugin, all i get the error is "  
Error rendering macro 'html-include' : javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure"  
And if I use confidoc plugin i get error as - "

```
Oops I broke:
```

```
IO Problem loading URL: https://techdocs.corp.ooyala.com/api/v1/provider/84132/attributes/htmlError: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target


```

What is the best practive to include a https link inside confluence?

Thanks.

comments: author: Alex Medved _ConfiForms_
body: The error tells you that the SSL certificate used to sign the server's certificate is not recognized as trusted by JVM

There is a good explanation (see accepted answer) on SO, <https://stackoverflow.com/questions/9619030/resolving-javax-net-ssl-sslhandshakeexception-sun-security-validator-validatore>


author: Gopalakrishnan
body: So it clearly, the certificate has to imported to the confluence server and to make this effect we have to restart the confluence server, please correct me if am wrong.

Thanks.


author: Mallmann
body: Hi Hemanth,

Can you confirm whether you have the certificate of the URL you're trying to include inside your JAVA's cacerts?

Also, can you please verify whether the logs are showing any error related to this behaviour? You might find a PKIX error in there, in case this is related to not having the certificate in the cacerts.

I hope it helps.

Eduardo

comments: author: hemanth acharya
body: Hi @Eduardo Mallmann , No there are no errors related to the certs. The certs are already there. Its our internal site which I can access normally in the browser.


author: Alex Medved _ConfiForms_
body: Try with [ConfiDoc](https://marketplace.atlassian.com/plugins/com.vertuna.confluence.plugins.confirest) plugin. No need to have iframes, could hide authentication details if/when necessary

comments: author: hemanth acharya
body: Is it not supported otherwise in html include macro? I mean, do we need to use this plugin itself to get through? Even in iframe this didn't work. Please confirm. Thanks


Tags: html

macro