Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
vendors:cisco:uc:ucce:cvp [2024/09/13 14:23] – [Securing CVP] gerardorourkevendors:cisco:uc:ucce:cvp [2025/10/17 17:00] (current) gerardorourke
Line 35: Line 35:
   *[[vendors:cisco:uc:ucce:cvp:java|Call Studio Java Examples]]   *[[vendors:cisco:uc:ucce:cvp:java|Call Studio Java Examples]]
   *[[https://www.cisco.com/c/en/us/products/collateral/collaboration/white-paper-c11-743494.html|Cisco Virtual Assistant / Cisco Answers]]   *[[https://www.cisco.com/c/en/us/products/collateral/collaboration/white-paper-c11-743494.html|Cisco Virtual Assistant / Cisco Answers]]
 +  *[[vendors:cisco:uc:cvp:ftps|CVP FTPS - Call Studio Element]]
 +
  
 ==== CVP FTP ==== ==== CVP FTP ====
Line 85: Line 87:
 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\VXMLServer\Parameters\Java\Options]  [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\VXMLServer\Parameters\Java\Options] 
  
-==== Local value Examples====+===== Set Value - Local Variables =====
  
-Use Local vars (Set value) and use the below JavaScript+Create Local variables (similar to session variables) by using the JavaScript node "Set value
 + 
 +==== SHA 256 Example ==== 
 +<code> 
 +// CVP Rhino: SHA-256 via Java MessageDigest 
 +function sha256_sql(accountNum
 +    if (!accountNum) return null; 
 + 
 +    // Convert JS string to UTF-8 bytes 
 +    var javaStr = new java.lang.String(accountNum); 
 +    var bytes = javaStr.getBytes("UTF-8"); 
 + 
 +    // Create SHA-256 digest 
 +    var md = java.security.MessageDigest.getInstance("SHA-256"); 
 +    md.update(bytes); 
 +    var digest = md.digest(); 
 + 
 +    // Convert byte array to hex string 
 +    var hex = ''; 
 +    for (var i = 0; i < digest.length; i++) { 
 +        var h = (digest[i] & 0xFF).toString(16); 
 +        if (h.length === 1) h = '0' + h; 
 +        hex += h; 
 +    } 
 + 
 +    return hex.toUpperCase(); 
 +
 + 
 +// Example usage 
 +var accountNum = "4111111111111111"; 
 +var hash = sha256_sql(accountNum); 
 + 
 +// Expected output: 9BBEF19476623CA56C17DA75FD57734DBF82530686043A6E491C6D71BEFE8F6E 
 +</code> 
 + 
 +  * Uses Java’s MessageDigest, which handles byte arrays directly. 
 +  * Converts the string to UTF-8 bytes, matching SQL Server’s NVARCHAR behavior in HASHBYTES('SHA2_256', NVARCHAR). 
 +  * Outputs a hex string in uppercase, exactly like SQL Server’s CONVERT(VARCHAR(64), HASHBYTES(...), 2). 
 + 
 +CVP’s JavaScript engine (Rhino) runs on the JVM. That means every Java class is accessible from your JS code using the Packages namespace. Example: java.security.MessageDigest becomes Packages.java.security.MessageDigest in JS. 
 +So in the above code, it is calling the Java MessageDigest.getInstance method to get a SHA-256 digest object. 
 + 
 + 
 +You can instantiate objects, call methods, and access constants just like in Java.
  
 ===Retrieving the Length of a Session Variable in Call Studio=== ===Retrieving the Length of a Session Variable in Call Studio===
Line 138: Line 183:
 var mybanana = 'banana'; var mybanana = 'banana';
 eval("mybanana"); eval("mybanana");
 +</code>
 +
 +<alert type="warning">eval will convert an integer back to a float!</alert>
 +So do no use eval if you want to return an integer. Convert to a string and just have the string as the last line as in the below example.
 +<code>
 +var pollDurationInt;
 +pollDurationInt = {Data.Session.pollDuration};
 +pollDurationInt = parseInt(pollDurationInt,10);
 +pollDurationInt = pollDurationInt .toString();
 +pollDurationInt;
 </code> </code>
 ====user.microapp.error_code==== ====user.microapp.error_code====
Line 277: Line 332:
    
  *https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/icm_enterprise/icm_enterprise_12_6_1/configuration/guide/ucce_b_security-guide_12_6_1/ucce-m-cce-orchestration-windows-openssh-hardening-126.html  *https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/icm_enterprise/icm_enterprise_12_6_1/configuration/guide/ucce_b_security-guide_12_6_1/ucce-m-cce-orchestration-windows-openssh-hardening-126.html
 +
 +==== Quays - QID 38863 - Weak SSL/TLS Key Exchange====
 +
 +Add to the Java Options key located at:
 +Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\OPSConsoleServer\Parameters\Java\
 +
 +Note above is for CVP Ops console tomcat - but you can also set it for wsm, callserver, vxmlserver tomcat installs etc.
 +<code>
 +-Djdk.security.defaultKeySize=DiffieHellman:2048 
 +-Djdk.tls.ephemeralDHKeySize=2048
 +</code>
  • vendors/cisco/uc/ucce/cvp.1726233818.txt.gz
  • Last modified: 2024/09/13 14:23
  • by gerardorourke