Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. READ MORE

How to configure Certificate Authentication for Qlik Sense Monitoring Applications

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Mike_Dickson
Support
Support

How to configure Certificate Authentication for Qlik Sense Monitoring Applications

Last Update:

Oct 21, 2022 2:13:30 PM

Updated By:

Mike_Dickson

Created date:

Apr 16, 2021 9:34:30 AM

Attachments

Description:

This document explains the steps to configure the Qlik Sense Monitoring Applications (License Monitor, Operations Monitor, Etc) to use Certificate Authentication instead of default Windows Authentication.

 

Environment:

 

The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.

 

1. Export Qlik Certificates via the QMC

  • Use the FQDN of the central node for Machine name
  • Use Certificate Password
  • Check the box to Include secret key

ExportCerts.png

2. Navigate to the path listed to obtain the exported certificates:

  • C:\ProgramData\Qlik\Sense\Repository\Exported Certificates

 

3. Copy the folder that was created and paste it into Engine folder of ALL nodes that will be used to reload the Monitoring Applications

  • C:\ProgramData\Qlik\Sense\Engine\Certificates

EngineFolder.png

 

4. Create a security rule that allows a user to access all Data Connections within the HUB

  1. Create rule from template = Data Connection Access
  2. Name = Data Connection Access
  3. Actions = Read / Update
  4. user --> name --> value = <userID>

securityrule.png

 

4. Modify all REST Data Connections that are used by the Monitoring Apps. (e.g. monitor_apps_REST_app, monitor_apps_REST_appobject, monitor_apps_REST_xxxxxx, etc)

  1. Log into the HUB
  2. Open any application within your workspace to access the Data Load Editor
  3. Look for the Data Connections with the name monitor_apps_REST_xxxxxx
  4. Edit the Data Connection (Example monitor_apps_REST_app)
    1. URL = https://FQDNofCentralNode:4242/app/full
    2. Authentication Schema = Anonymous
    3. Certificate validation = Skip Server Certificate Validation
    4. Use certificate = From file
    5. PFX file name = <FQDN>\client.pfx
    6. PFX file password = (password used during export of certificates)
    7. Query Headers:
      1. Delete User-Agent = Windows
      2. Add X-Qlik-User = UserDirectory=INTERNAL; UserID=sa_api
    8. Test Connection and Save
  5. Log into QMC --> Data Connections --> Edit the Data Connection to remove the userID from the name.
    • e.g: Change from monitor_apps_REST_app (domain_administrator) to  monitor_apps_REST_app
  6. Repeat steps for all Data Connections with monitor_apps_REST_xxxxxx

 

5. Another way to update the rest of the data connections would be to modify them via the QMC

  1. Copy the Connection String from the one that was successfully updated via the HUB and paste into a notepad
  2. Copy the Connection String from one that still needs to be updated and paste into a notepad
  3. Update the next connection string with all of the information from the first one, BUT using the correct URL and paste into the Data Connection

 

6. Once all of the Data Connections have been modified, then you can attempt a Reload via the QMC of one of the Monitoring Applications (e.g: License Monitor)

 

 

PowerShell Script Option

Attached to the article is a zip file that includes a PowerShell Script that can preform all of the steps above. You can download and extract the script to your Central node.

(Nothing is deleted by running this script only renamed. If you would like to revert back prior to running the script, just swap the Data connections back in the QMC (they have -old appended to them)

1. Run the script as your Qlik Sense Service Account on the Central Node

2. Old Data connections used by the Monitoring Apps will be renamed: Example -  monitor_apps_REST_app --> monitor_apps_REST_app-old

3. The Data Connections will be modified to use certificate authorization instead of Windows Authentication (This will create a password protected Certificate at [ProgramData]\Qlik\Sense\Engine\Certificates using the FQDN of the Central Node)

4. Additional considerations: In multi-node environments where the central node does not perform reloads, the certificate generated will have to be moved to the corresponding folders on the other nodes: By Default, [ProgramData]\Qlik\Sense\Engine\Certificates\Central Node Name (keep the folder name the same)

Comments
agigliotti
Partner - Champion
Partner - Champion

Hi,
I noted the above PowerShell script only creates the new data connections for Operations Monitor App only.
Other data connection  (monitor_apps_REST_license*)  have been renamed in *-old  but the new connections using certificate authorization have not been created.
Could be possible to fix the script?

Best Regards

Mike_Dickson
Support
Support

Hello @agigliotti 

I can't say specifically why the new connection was not created in your environment, but the PowerShell script already does have the coding to create the (monitor_apps_REST_license_xxxxx). I just ran it again in my environment and you can see the 11 data connections with the owner being "sa_api"

data connections.JPG

agigliotti
Partner - Champion
Partner - Champion

Hi @Mike_Dickson ,

In my environment the Qlik Service user account does not have "RootAdmin" role.

Could this be the reason?

Mike_Dickson
Support
Support

Hello @agigliotti 

The Service account should not need RootAdmin access for the script to fully import/update the data connections.

If you are having specific problems with this though and not able to get it to work (even manually), I would suggest either posting a comment on the Qlik Community https://community.qlik.com/t5/Qlik-Sense/ct-p/qlik-sense to see if other user have run into this issue or creating a case with Support.

agigliotti
Partner - Champion
Partner - Champion

Hi @Mike_Dickson ,

I solved creating the missing data connections manually.
Thanks for your collaboration.
Best Regards

ChristopheDupont_BME
Contributor
Contributor

@Mike_Dickson

Great ! Great ! Great !

Your script save me !

Thanks a lot

AndyBurnsJPM
Contributor II
Contributor II

@Mike_Dickson  what's the significance of the trusted locations parameter? In the powershell I see it is qrs_proxy  but above when editing QMC, you have qrs-proxy

Mike_Dickson
Support
Support

@AndyBurnsJPM 

The "trustedlocation=qrs_proxy" in the connection string is there because when we made the script and article all we did was copy the old data connection (which required it because it was doing Windows NTLM) and modified it to work with Certificates. It appears that there are some sections of the connection string that are not specifically needed. I tested this by removing it from the new data connection string that was created and it still worked.

AndyBurnsJPM
Contributor II
Contributor II

Thanks Mike. Makes sense!

ARe
Partner - Contributor II
Partner - Contributor II

@Mike_Dickson 

I used the powershell and while reloading the monitoring app I got the error:

20230814T085756.101+0200 Certificate error: The certificate you are using is not located in the configured location.Please contact your administrator to confirm the correct location.
20230814T085756.102+0200 Error: Certificate error: The certificate you are using is not located in the configured location.Please contact your administrator to confirm the correct location.
20230814T085756.102+0200 Certificate error: The certificate you are using is not located in the configured location.Please contact your administrator to confirm the correct location.
20230814T085756.111+0200 Execution Failed
20230814T085756.121+0200 Execution finished.

 

Problem was that the powershell script applies some generic FQDN in the certificate path (...certificateFilePath=QlikServer1.domain.local...)

I'd suggest using a variable or asking the user to supply the path.

I solved the issue by manually editing of the new datasources.

KR,

Andreas

 

Version history
Last update:
‎2022-10-21 02:13 PM
Updated by: