MicroStrategy ONE
Handling invalid certificates
When a data connector tries to load data, it looks for a valid certificate. If the certificate has expired, is self-signed, or is invalid for some other reason, the fetchTable function fails and no data is loaded. It is possible, however, that there are situations when you may want to import data from a data connector that does not have a valid certificate.
Overriding an invalid certificate
When data connectors are deployed over SSL/TLS and the data connector cannot provide a valid certificate, an error occurs during the running of the NodeJS process. In some cases, you may want to override this behavior. To do that, we have provided a setting that causes the application to ignore an invalid certificate and load data for that data connector. The setting is turned off by default, but it can be turned on when it is needed.
To turn on the setting, add a string type registry entry of "JSDisableStrictSSL"
in one of the locations below. If this registry entry exists, the data connector ignores an invalid certificate when the NodeJS process runs. The application only checks for the existence of the registry entry and does not check the value of the entry.
-
Windows
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MicroStrategy\Common Files
-
Linux
[I-SERVER install path]/MSIReg.reg/[HKEY_LOCAL_MACHINE\SOFTWARE\MicroStrategy\Common Files]\
-
Windows Workstation
HKEY_LOCAL_MACHINE\SOFTWARE\MicroStrategy\Common Files
-
Mac Workstation
Contects/Frameworks/OneTierDashboardWindow.framwork/Resources/MSIReg.reg/[HKEY_LOCAL_MACHINE\SOFTWARE\MicroStrategy\Common Files]
To navigate to this location, right-click the Workstation application and choose Show Package Contents.
Accepting a self-signed certificate
There may be instances when you want to allow a data connector to load data, even if its certificate is self-signed. For example, you may want to load data from a stand-alone server with a self-signed certificate.
To accept a self-signed certificate, add "strictSSL:false"
to the load_data.js
file in one of the following locations:
-
Windows or Linux Intelligence server:
<MicroStrategy Install path>\MicroStrategy\Intelligence Server\GenericGateway_SDK
-
Mac Workstation:
/Applications/MicroStrategy Workstation.app/Contents/Frameworks/OneTierDashboardWindow.framework/Versions/A/Resources/GenericGateway_SDK
-
Windows Workstation:
<MicroStrategy Install path>\MicroStrategy\Workstation\GenericGateway_SDK
Sample code that illustrates how to do this is shown below:
//Use jsdom to parse html page into DOM
jsdom.env({
url : conn_url,
strictSSL : false,
features : {
FetchExternalResources : ['script'],
ProcessExternalResources : ['script']
},
done : function (error, window) {
if (error){
// error handling
reportError("fail to load scripts from data connector. "+ error);
}else{
mylogger.log("finish loading page.");
//Fire on init event
eventEmitter.emit('init', window);
}
}
});
See Also