Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
knightluffy
Contributor II
Contributor II

why Xrfkey can be dynamic

Hi, 

I have test the QPS API successfully from https://github.com/goldbergjeffrey/qsticket . But I don't understand why the Xrfkey is designed as a static/dynamic 16 arbitrary characters string. Is it possible to use the dynamic Xrfkey to track the per-http request with some Qlik Sense log? 

 

1 Solution

Accepted Solutions
Levi_Turner
Employee
Employee

Yes, the Xrfkey can be dynamic or static (https://help.qlik.com/en-US/sense-developer/September2019/Subsystems/RepositoryServiceAPI/Content/Se...). As for why Jeff hard-coded the value, it's likely to speed up the development of the demo code.

View solution in original post

3 Replies
Levi_Turner
Employee
Employee

Yes, the Xrfkey can be dynamic or static (https://help.qlik.com/en-US/sense-developer/September2019/Subsystems/RepositoryServiceAPI/Content/Se...). As for why Jeff hard-coded the value, it's likely to speed up the development of the demo code.

vegard_bakke
Partner - Creator III
Partner - Creator III

Sorry for picking up an old thread. But, just to clarify: 
I know the xrfkey can be static, meaning the same  hardcoded value, always.
But should it?

 

Are there any security concerns by not changing it for every, either session or for every request?


If there are none, could we not all just use the value 'QLIKSENSEXREFKEY' always?


Levi_Turner
Employee
Employee

> Are there any security concerns by not changing it for every, either session or for every request?

No, there are not. Validation of the header and URL param being the same nominally is a layer of security but for all intents and purposes, that isn't anything close to real security.

> If there are none, could we not all just use the value 'QLIKSENSEXREFKEY' always?
> I know the xrfkey can be static, meaning the same hardcoded value, always.
> But should it?

I guess I'd frame things this way. If you have a robust integration layer which is making significant use of QRS API calls to automate activities, then it would be ideal to have a dynamic xrfkey. Presumably (and hopefully) you would have a fairly detailed transactional log in the integration layer which then can be joined together with the Qlik Sense Enterprise logs to audit an event. If everything is static (i.e. same user, same xrfkey) then debugging is basically not possible. You'd know it wasn't Qlik Sense Enterprise itself which did some activity (e.g. delete an app) but what module / routine / code actually made the request wouldn't be discernible from the Qlik side.

If you've got a batch job which runs once a month, then you likely don't care about tracing / logging / auditing a whole ton.