Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlik Sense Authentication - Java

I am trying to develop a Java application which uses the Engine APIs to get all the apps and related data.

So far I have found that Qlik Sense has only NTLM or Kerberos as built in authentication mechanisms and the server needs to be connected to an external authentication module which authenticates the users. Please let me know if I have got this wrong.

Also, I have read that Qlik Sense will accept users authenticated against other systems. And then using the Ticket API or the Session module or the Header mode to access the Sense system. How does Qlik Sense know whom to trust? How do I link an external authentication module to the server?

The following is the sequence that I want to implement: authenticate -> get all apps data (please suggest if I can achieve this using REST APIs exposed or if I need to use web sockets and engine apis) -> use this information in our platform.

It would be very helpful if somebody can post a sample authentication sequence using the QPS or any other service which can be implemented without using the .NET SDK. A small concrete example would be super helpful.

Lastly, is it possible to do a simple straightforward authentication using REST APIs and using other APIs. Is there any other way to get the Apps list? Please advice.

Thanks,

Nikhil

13 Replies
konrad_mattheis
Luminary Alumni
Luminary Alumni

Hi Jessen,

I can confirm you that the connection from JAVA is working.

We developed long time ago a project for a customer to connect

with JAVA to the Enginge & QMC and do a lot of fancy stuff.

bye Konrad

Not applicable
Author

Hi Jessen,

Yes, I was able to connect using Java. I used NVWebSocket library for Java Web sockets. I had to import the certificates to a Java Keystore and use that to load the ssl context. One requirement is that your server url should have an entry in the proxy whitelist. I haven't tried much but I was able to call few global methods like getting the document list. Hope it helps.

The following examples helped: Java-WebSocket/SSLClientExample.java at master · TooTallNate/Java-WebSocket · GitHub

QES-NoProxy-Certs.js · GitHub

Thanks,

Nikhil

Anonymous
Not applicable
Author

Hi Nikhil,

May i know how do you import the certificate (export from Qlik) to java keystore and use them in Java?

Basically I have tried the same example as you mentioned but for SSL socket i could never connect to "hostname:4747/api" with my java keystore while javascripts works fine to me.

Thank you.

StevenJDH
Employee
Employee

Hello all,

For those who are interested, I've created an updated example for how to request a ticket via Java. This version is more adaptable with a number of improvements and has better clarity. The biggest change is that you can now also use the standard certificates that are exported from Qlik Sense without having to convert them to the Java KeyStore (*.jks) format. You can find the code here: https://github.com/StevenJDH/Qlik-Sense-Java-Examples