An error occurs when you open SmartForms (Runtime or Designer sites) on a server where an administrator has enabled FIPS or where a Group Policy enforces it. The error occurs because K2 does not use FIPS-compliant .NET classes for hashing and signing purposes.
Error message: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
The Local Security Policy: "System Cryptography: Use FIPS compliant algorithms for encryption, hashing and signing".
You can use this article to address the issue without disabling FIPS enforcement.
Since the release of K2 Five (5.0), the configuration setting enforceFIPSPolicy is set to false in application configuration files for all K2 services. This prevents the error when the Setup Manager or K2 Host Server launch on FIPS-enforced servers.
To allow SmartForms to work on FIPS-enforced servers, create a new CLRConfigFile config file with the enforceFIPSPolicy property set to false, and then assign the configuration file to the SmartForms Application Pool in IIS.
The configuration affects all sites that use the same Application Pool, not just SmartForms. If you have a secondary Runtime site or your Runtime site is separate from your other K2 sites, you must apply the AppPool config to that Runtime virtual directory as well.
- Create a new configuration file with the contents of the code block below. K2 recommends you store the file in the K2 root folder, for example, C:\Program Files\K2\AppPool.config
<?xml version="1.0" encoding="UTF-8" ?>
<legacyUnhandledExceptionPolicy enabled="false" />
<SymbolReadingPolicy enabled="1" />
<startup useLegacyV2RuntimeActivationPolicy="true" />
- Assign the config file to the Application Pool. The IIS GUI does not have a way to do this so you must use the command prompt.
- Open the CMD command prompt as an administrator.
- Run the following command; make sure to change the application pool name (highlighted in yellow) to your SmartForms application pool name and the path to the configuration file (highlighted in blue) that you created in Step 1:
%windir%\System32\inetsrv\appcmd.exe set config -section:system.applicationHost/applicationPools "/[name='K2 SmartForms']".CLRConfigFile:"C:\Program Files\K2\AppPool.config" /commit:apphost
- After successfully running the command, do an IISReset.
You should now be able to launch SmartForms without getting the FIPS error.
Workaround - additional configuration required for K2 blackpearl 4.7
To apply the workaround to K2 blackpearl 4.7, you need to perform the following steps in addition to the workaround steps described above.
- In each of the following configuration files, locate the <runtime> element and add the following node:
<enforceFIPSPolicy enabled="false" />
(See the screenshot below for an example)
- K2 blackpearl\Bin\controlutil.exe.config
- K2 blackpearl\Host Server\Bin\K2HostServer.exe.config
- K2 blackpearl\ServiceBroker\BrokerManagement.exe.config
- K2 blackpearl\Setup\AppDeployment.exe.config
- K2 blackpearl\Setup\controlutil.exe.config
- K2 blackpearl\Setup\DeployPackage.exe.config
- K2 blackpearl\Setup\Setup.exe.config
- K2 blackpearl\Setup\SourceCode.AppDeployment.exe.config
- K2 blackpearl\Setup\SourceCode.SetupManager.exe.config
- Restart the K2 server