{"record":{"id":"1e623d017b84932e","repo":"pentaho/pentaho-kettle","slug":"client-authentication-not-implemented","errorCode":null,"errorMessage":"Client Authentication not implemented","messagePattern":"Client Authentication not implemented","errorType":"exception","errorClass":"CertificateException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/cluster/SlaveConnectionManager.java","lineNumber":125,"sourceCode":"\n    return\n      HttpClientBuilder\n        .create()\n        .setDefaultCredentialsProvider( provider )\n        .setDefaultRequestConfig( requestConfig )\n        .setConnectionManager( manager )\n        .build();\n  }\n\n  public void shutdown() {\n    manager.shutdown();\n  }\n\n  private static X509TrustManager getDefaultTrustManager() {\n    return new X509TrustManager() {\n      @Override\n      public void checkClientTrusted( X509Certificate[] certs, String param ) throws CertificateException {\n        throw new CertificateException( \"Client Authentication not implemented\" );\n      }\n\n      @Override\n      public void checkServerTrusted( X509Certificate[] certs, String param ) throws CertificateException {\n        for ( X509Certificate cert : certs ) {\n          cert.checkValidity(); // validate date\n          // cert.verify( key ); // check by Public key\n          // cert.getBasicConstraints()!=-1 // check by CA\n        }\n      }\n\n      @Override\n      public X509Certificate[] getAcceptedIssuers() {\n        return new X509Certificate[0];\n      }\n    };\n  }\n","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/cluster/SlaveConnectionManager.java#L107-L143","documentation":"This error comes from the setEnvironmentVar scripting function in Pentaho Kettle's JavaScript step. When System.setProperty throws any exception (e.g. a SecurityManager blocks the write or the key/value cannot be converted), the function wraps the exception's toString() into a Mozilla Rhino JavaScriptRuntime error. The message is deliberately the raw exception text because the original cause is unknown at throw time.","triggerScenarios":"Calling setEnvironmentVar(a, b) with exactly 2 arguments where Context.toString() conversion or System.setProperty throws - e.g. a SecurityManager denies property writes, or the argument is a hostile/unconvertible Scriptable object.","commonSituations":"Running the transformation in a sandboxed/app-server environment with a SecurityManager; passing non-primitive JavaScript objects whose toString fails; calling the function during restricted JVM startup.","solutions":["Pass plain string or number arguments: setEnvironmentVar('MY_KEY', 'myValue').","Check for a SecurityManager / security policy that blocks System.setProperty and grant the needed property-write permission.","Verify the JVM allows setting properties at that point (some restricted embedders forbid it).","If you only need the value within the transformation, use a Kettle variable via setVariable instead of a JVM system property."],"exampleFix":"// before\nsetEnvironmentVar(myComplexObject, 42);\n// after\nsetEnvironmentVar(\"MY_KEY\", String(myComplexObject) || \"default\");","handlingStrategy":"try-catch","validationCode":"var k = String(key), v = String(val);\nif (k === \"\" ) throw new Error(\"setEnvironmentVar: empty key\");","typeGuard":"function isPlainValue(x) { return x != null && (typeof x === \"string\" || typeof x === \"number\"); }","tryCatchPattern":"try {\n  setEnvironmentVar(\"MY_KEY\", \"myValue\");\n} catch (e) {\n  // e contains the wrapped Java exception; fall back to a Kettle variable\n  setVariable(\"MY_KEY\", \"myValue\", \"\");\n}","preventionTips":["Pass plain strings/numbers, never host objects","Check for a SecurityManager in the runtime environment","Prefer Kettle variables over JVM system properties inside transformations"],"tags":["javascript","system-properties","security","scripting"],"backgroundTag":"invalid-argument-value","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}