Skip to main content

Using Xrfkey headers

A common vulnerability in web clients is cross-site request forgery, which lets an attacker impersonate a user when accessing a system. To protect against this vulnerability, calls to the Qlik Sense Proxy Service (QPS) API must include the following:

  • Xrfkey query parameter: Must equal 16 arbitrary characters. The characters can be changed in-between calls to the API.
  • Xrfkey=<16 arbitrary characters>

  • X-Qlik-Xrfkey: Custom HTTP header. The format is as follows:
  • X-Qlik-Xrfkey: <the same 16 characters as used for the Xrfkey query parameter>

Information noteThe only characters that are allowed for use in the Xrfkey parameter are 0 - 9, a - z, and A - Z.

Example:  

The following API call returns all server node configurations in the repository database:

https://localhost:4242/qrs/servernodeconfiguration/full?Xrfkey=abcdefghijklmnop&orderby=name%20asc HTTP/1.1 Accept-Encoding: gzip,deflate X-Qlik-User: UserDirectory=INTERNAL; UserId=sa_repository Accept-Charset: utf-8; q=0.9, us-ascii;q=0.1, iso-8859-1 Accept: text/xml; q=0.1, application/json; q=0.2 X-Qlik-Xrfkey: abcdefghijklmnop Host: localhost:4242 Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!