q-masters / vscode-qlik

VSCode Extension for better Qlik App Development
MIT License
61 stars 6 forks source link

Able to connect to QS Desktop and Qlik Core #284

Closed countnazgul closed 4 years ago

countnazgul commented 4 years ago

Is your feature request related to a problem? Please describe. At the moment the extension always use authentication mechanism(s) when connecting to Qlik Engine. There are products, to which connection can be established without authentication - Qlik Sense Desktop and Qlik Core (with default settings)

Describe the solution you'd like Connect to Qlik Engines which do not require authentication.

Describe alternatives you've considered

Additional context Just want to mention that by default only Qlik Sense Desktop do not require any authentication. For Qlik Core there are ways to apply authentication mechanisms but the base setup (which most of the developers are using) is without any authentication

r-hannuschka commented 4 years ago

As we started with Qlik Core this was very simple, we just have to implement the "no authorization strategy" which simply tell us yes you are connected which can be used to connect to qlik core or any other system which requires no authorization.

part of #283 but i think we could do this quickly, i do not know how long i need for certificate or jwt since i have to extends the webview for both.

countnazgul commented 4 years ago

Ahhh sorry missed the other issue. If you want you can close this one :)

r-hannuschka commented 4 years ago

No is a good one, the other issue has 3 parts and i think it is better to break things down, so we have smaller features which i think is better. And i can select the checkbox in the other issue so we know it is allready done ;)

r-hannuschka commented 4 years ago

Solved but a question, it causes me some problems since i check we allready have an existing session we sendind an existing session key as cookie if we have one.

session.on("traffic:received", (response) => {
    if (response.method === "OnAuthenticationInformation" || response.method === "OnConnected") {
        /**
         * remove all listeners so we dont have a memory leak
         * method exists but not in typings so cast this one to any
         */
        (session as any).removeAllListeners();
        session.close();

        if (response.params.mustAuthenticate) {
            this.storage.delete(key);
            resolve({isLoggedIn: false, loginUrl: response.params.loginUri});
        } else {
            resolve({isLoggedIn: true, cookies });
        }
    }
});

My point is QlikSense sends on WebSocket OnAuthenticationInformation but QlikCore OnConnected (okay i do not have to authenticate), is any better way to solve that ? I'm a little bit afraid there are some other messages which can received i do not know yet.

Otherwise tested this with QlikCore and None Authrorization Strategy seems to be working.

To activate this one just activate in the Settings:

image

countnazgul commented 4 years ago

Some of these messages are from the Proxy (when Proxy is available) the list with the possible Proxy messages is here (check out the left menu)

But from this list im missing at least one message, which is purely engine one - OnMaxParallelSessionsExceeded so im guessing that the engine itself have a list of messages to return. Unfortunately cant seem to find the engine messages list

countnazgul commented 4 years ago

Just checked with v0.5.0 and all works! 🥳 Thank you!