Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds pfx support for custom authenticator #62

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HaTiIn
Copy link

@HaTiIn HaTiIn commented Jun 4, 2024

With the help of a custom authenticator it is now possible to use certificate based authentication

@HaTiIn HaTiIn requested a review from a team as a code owner June 4, 2024 14:57
@qlikossbuild
Copy link
Collaborator

Hi, and thanks for contributing!

Note: If you are part of Qlik:
follow the process outlined on the internal developer portal instead.
Reach out to [email protected] if you do not have access to that developer portal.


Before we can handle your pull request we need you to sign our contributor license agreement.
This is a one-time process and enables you to contribute without hassle to any of the qlik-oss repositories in the future.

And it only takes a few minutes! Here are some useful links to get you started:

Having troubles? Feel free to reach out to us either here or on Slack!

Note: Once the CLA is sorted, you should rebase/touch this pull request to trigger an update of this CLA status.

@HaTiIn
Copy link
Author

HaTiIn commented Jun 4, 2024

I won't sign the CLA or anything else... but you can use my code changes for this feature.

@nilzona
Copy link
Contributor

nilzona commented Jun 17, 2024

Can you share en example of how a host-config would look like that would enable this feature?

@HaTiIn
Copy link
Author

HaTiIn commented Jun 17, 2024

Sure:

const appSession = openAppSession({
            appId: this.appId,
            hostConfig: {
                authType: "QlikApiTsSaEngineAuthModule",
                host,
                passphrase,
                pfx,
            },
        });

QlikApiTsSaEngineAuthModule:

...
type QlikApiTsSaEngineAuthModuleConfig = {
    pfx: Buffer;
    passphrase: string;
    host: string;
};
 async getRestCallAuthParams(
                props: GetRestCallAuthParamsProps<"QlikApiTsSaEngineAuthModule">,
            ): Promise<RestCallAuthParams> {
                return {
                    headers: {
                        "X-Qlik-User": "UserDirectory=INTERNAL; UserId=sa_engine",
                    },
                    queryParams: {},
                    credentials: "omit",
                };
            },
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants