Qlik Community

Qlik Sense Enterprise Documents & Videos

Documents & videos about Qlik Sense.

Using Qlik REST Connector behind a Proxy

MVP & Luminary
MVP & Luminary

Using Qlik REST Connector behind a Proxy

The Qlik REST Connector is a young and versatile connectivity solution so it’s still lacking some features. One missing point is a proxy authentication so all your REST calls get blocked if your Qlik server (or desktop) is behind a proxy. Btw. Qlik Web Connectors already provide this proxy configuration option.

But there is help if your Proxy works with HTTP Basic Authentication. You can just use the HTTP header Proxy-Authorization within your REST connection.

Copy out this HTTP header from your browser session and use it in the REST connectior dialog. Alternatively, you can encode your proxy credentials (user:pw) yourself with Base64:

Example: user:pw = test:test


HTTP Header:
Proxy-Authorization: Basic dGVzdDp0ZXN0

Now use the header in the REST connector dialog:

Qlik_REST_Connector_Proxy_Settings.png

Then, test your load script and cross fingers.. 😉

Happy Qliking!

Ralf

Comments
chris_johnson
Contributor III

Hi Ralf,

I'm running up against an issue trying to connect to an API (I'm just using a dummy one at JSONPlaceholder - Fake online REST API for developers).

I receive an error (HTTP error 407 - Proxy Authorization Required) which has led me to your post!

One thing to clarify though, when you say "Copy out this HTTP header from your browser session" what do you actually mean? Am I supposed to find this somewhere? I had a look at the headers that my browser is sending and I don't have anything regarding proxy-authorization.


What am I missing?

0 Likes
MVP & Luminary
MVP & Luminary

Hi Adam,

what headers is the browser sending when authorizing the proxy, let's say on a normal website you reach out?

0 Likes
chris_johnson
Contributor III

Hi Ralf,

Thanks for getting back to me. This is what I see when I go to xhaus.com to view what my browser is sending:

 

Request parameterValue
Requested URI/headers
Request MethodGET
Remote IP Address91.229.173.203
Remote IP Port26650
Protocol versionHTTP/1.1
HTTP Header*Value
Accepttext/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encodinggzip, deflate, sdch
Accept-Languageen-US,en;q=0.8
ConnectionKeep-Alive
Hostwww.xhaus.com
Max-Forwards10
Refererhttps://www.google.co.uk/
Upgrade-Insecure-Requests1
User-AgentMozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
Via1.1 svr-lfl-svwa2.bathempire.local:8081
X-Sophos-Metae3879be8459357899fdf8a14d56f9f31ce7b295e380decbf30c17b3c5a304a1922683523504570cb9e16d82daf6690af9b05abcccb0fc799f5050bdec0dbd3aefbe2f50e9537afd38a06a52cb80d3976e092b275cdf7be9e
0 Likes
MVP & Luminary
MVP & Luminary

What does the browser tools show?

0 Likes
chris_johnson
Contributor III

Hi Ralf,

Nothing with regards to the proxy at all:

    1. Request URL:https://www.facebook.com/rsrc.php/v3im314/yn/l/en_US/o_3J6ufnVQ4.js
    2. Request Method:GET
    3. Status Code:200 (from disk cache)
    4. Remote Address:172.21.41.12:8081
    5. Referrer Policy:origin-when-cross-origin
  1. Response Headers
    1. access-control-allow-credentials:true
    2. access-control-allow-origin:*
    3. cache-control:public,max-age=31536000,immutable
    4. content-encoding:br
    5. content-length:101836
    6. content-md5:VnkDHCVkuAoXzuMKrT+BtA==
    7. content-security-policy:default-src * data: blob:;script-src *.facebook.com *.fbcdn.net *.facebook.net *.google-analytics.com *.virtualearth.net *.google.com 127.0.0.1:* *.spotilocal.com:* 'unsafe-inline' 'unsafe-eval' fbstatic-a.akamaihd.net fbcdn-static-b-a.akamaihd.net *.atlassolutions.com blob: data: 'self';style-src data: blob: 'unsafe-inline' *;connect-src *.facebook.com *.fbcdn.net *.facebook.net *.spotilocal.com:* *.akamaihd.net wss://*.facebook.com:* https://fb.scanandcleanlocal.com:* *.atlassolutions.com attachment.fbsbx.com ws://localhost:* blob: *.cdninstagram.com 'self' chrome-extension://boadgeojelhgndaghljhdicfkmllpafd chrome-extension://dliochdbjfkdbacpmhlcpmleaejidimm;
    8. content-type:application/x-javascript; charset=utf-8
    9. date:Fri, 21 Jul 2017 18:53:38 GMT
    10. expires:Sat, 21 Jul 2018 18:53:36 GMT
    11. last-modified:Mon, 01 Jan 2001 08:00:00 GMT
    12. public-key-pins-report-only:max-age=500; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="r/mIkG3eEpVdm+u/ko/cwxzOMo1bk4TyHIlByibiA5E="; pin-sha256="q4PO2G2cbkZhZ82+JgmRUyGMoAeozA+BSXVXQWB8XWQ="; report-uri="http://reports.fb.com/hpkp/"
    13. status:200
    14. timing-allow-origin:*
    15. vary:Accept-Encoding
    16. x-content-type-options:nosniff
    17. x-fb-debug:ilcUynpaevC3mzKr4+JrHu2aNJeR+Q+cI1fj8Ket1t3s9Way22l2rP7b0dIyFxBUOh4EL20Oji2RS3S2TV1+dA==
    18. x-xss-protection:0
  2. Request Headers
    1. Provisional headers are shown
    2. Referer:https://www.facebook.com/v2.0/plugins/like.php?action=recommend&app_id=&channel=https%3A%2F%2Fstatic...
    3. User-Agent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
0 Likes
MVP & Luminary
MVP & Luminary

I assume your Proxy doesn't work with HTTP Basic Authentication.

0 Likes
Partner
Partner

I got it solved:

 

REST Connector How to configure proxy settings

In an environment that requires all requests go through a forward proxy, the REST Connector requires additional configuration before connections can be made.

Add the following lines in QvRestConnector.exe.config file, which is located C:\Program Files\Common Files\Qlik\Custom Data\QvRestConnector:

<system.net> <defaultProxy> <proxy usesystemdefault="false" proxyaddress="http://172.16.16.102:8888" bypassonlocal="false" /> </defaultProxy> </system.net>

The setting can also be set for all applications using .NET framework by modifying the file machine.config, located in C:\Windows\Microsoft.NET\Framework64\vX.X.XXXXX\Config. X.X.XXXX is the version number for the .NET framework installed.

This proxy configuration procedure can be used for other connectors included in Qlik Sense Enterprise for Windows hub: ODBC Connector Package, Salesforce Connector, and DataMarket Connector.

Version history
Revision #:
1 of 1
Last update:
‎2017-03-17 08:34 AM
Updated by: