From 52b2916e41ede284d30d285f2cd8ceaa454af349 Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Mon, 25 Apr 2022 09:22:21 -0400 Subject: [PATCH 1/4] Fix for v2 keyring / dev env Signed-off-by: 1000TurquoisePogs --- lib/apiml.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/apiml.js b/lib/apiml.js index e99015db..c6a77630 100644 --- a/lib/apiml.js +++ b/lib/apiml.js @@ -124,7 +124,9 @@ ApimlConnector.prototype = { headers: {'accept':'application/json'} }, this.tlsOptions); - if (!process.env['KEYSTORE_DIRECTORY']) { + //TODO FIXME We should not be referring to env var this far in the code. + const zweVerifyCerts = process.env['ZWE_zowe_verifyCertificates']; + if (!zweVerifyCerts || zweVerifyCerts=='DISABLED') { //Keeping these certs causes an openssl error 46, unknown cert error in a dev environment delete options.cert; delete options.key; From 2cac3a3079a255f5ae25934ba326e3b8a8cfea2c Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Mon, 25 Apr 2022 09:26:45 -0400 Subject: [PATCH 2/4] Another ocurrence of keyring issue Signed-off-by: 1000TurquoisePogs --- lib/apiml.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/apiml.js b/lib/apiml.js index c6a77630..acc21106 100644 --- a/lib/apiml.js +++ b/lib/apiml.js @@ -260,7 +260,9 @@ ApimlConnector.prototype = { registerMainServerInstance() { const overrideOptions = Object.assign({},this.tlsOptions); - if (!process.env['KEYSTORE_DIRECTORY']) { + //TODO FIXME We should not be referring to env var this far in the code. + const zweVerifyCerts = process.env['ZWE_zowe_verifyCertificates']; + if (!zweVerifyCerts || zweVerifyCerts=='DISABLED') { //Keeping these certs causes an openssl error 46, unknown cert error in a dev environment delete overrideOptions.cert; delete overrideOptions.key; From 8b75faa34516ecdc5d274a628bb064f7ca30982b Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Mon, 25 Apr 2022 09:27:57 -0400 Subject: [PATCH 3/4] INST_DIR fix Signed-off-by: 1000TurquoisePogs --- plugins/terminal-proxy/lib/terminalProxy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/terminal-proxy/lib/terminalProxy.js b/plugins/terminal-proxy/lib/terminalProxy.js index ef8ca5ef..eab42658 100644 --- a/plugins/terminal-proxy/lib/terminalProxy.js +++ b/plugins/terminal-proxy/lib/terminalProxy.js @@ -690,7 +690,7 @@ let scanAndImportHandlers = function(logger) { let filenames; let len; try { - let handlerDir = pathModule.join(process.env.INSTANCE_DIR,'workspace','app-server','org.zowe.terminal.proxy','handlers'); + let handlerDir = pathModule.join(process.env.ZWE_zowe_workspaceDirectory,'app-server','org.zowe.terminal.proxy','handlers'); filenames = fs.readdirSync(handlerDir); len = filenames.length; for (let i = 0; i < len; i++) { From a37f18c1b1d64a0269066a9ca1ba528db9f9123f Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Mon, 25 Apr 2022 09:29:03 -0400 Subject: [PATCH 4/4] hostname fix Signed-off-by: 1000TurquoisePogs --- lib/swagger-catalog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/swagger-catalog.js b/lib/swagger-catalog.js index cf17690f..1c62c66c 100644 --- a/lib/swagger-catalog.js +++ b/lib/swagger-catalog.js @@ -252,7 +252,7 @@ function getSchemesFromContext (nodeContext) { } function getHost(nodeContext) { - let hostname = process.env['ZOWE_EXPLORER_HOST'] ? process.env['ZOWE_EXPLORER_HOST'] : os.hostname(); + let hostname = process.env['ZWE_zowe_externalDomains_0'] ? process.env['ZWE_zowe_externalDomains_0'] : os.hostname(); return nodeContext.https ? `${hostname}:${nodeContext.https.port}` : `${hostname}:${nodeContext.http.port}`; }