Case Status
Log In


Kappris WebViewer KapprisFiler…
  • RSS Feed

Last modified on 3/9/2023 2:51 PM by User.


Kappris WebViewer KapprisFiler Installation

At svn 19601 on the FB16285 branch, SetUpWebSite.ps1 has been updated to work with the five new KapprisFiler deployment files:


1 — KapprisFiler is just another NETCore website, so you install it using this command line:

.\SetUpWebSite.ps1 -install -zipFileName -commitChanges

To uninstall, use the -uninstall switch instead of -install, and you won't need -commitChanges either.

2–5 — Each of the KF* zip files contains a KapprisFiler plugin. Once you've installed the main KapprisFiler website you can install each plugin with a command line like this:

.\SetUpWebSite.ps1 -install -zipFileName

This results in the creation and population of a folder like this:

C:\Program Files (x86)\Kutana\Kappris Filer\Plugins\KFImanage10

KapprisFiler scans the .\Plugins folder and loads whatever plugins it finds. This architecture lets us implement multiple plugins targeting various signing agencies and Document Management Systems, and the customer can cherry pick which of them are required.

As this website needs external access you will need to add some extra bindings for localhost and a blank to allow connection via the IP address. NOTE: These extra bindings will be wiped on uninstall/re-install

External test to confirm connection to KapprisFiler (see prerequisites here):

Browse to HTTPS:// and you should see the number of hooks that are set:

Setting up for DocuSign and LegalEsign

The Kappris SigningServer and Kappris Filer each have their own appsettings.json file.  If both websites are deployed in IIS on the same machine it makes sense to create environment variables that will be used by both websites, rather than trying to keep the two appsettings.json files in sync with each other.

Settings can be moved out of the appsettings.json file into the Environment, and you can optionally use a naming scheme that allows both KSS and KapprisFiler to see the value. So for example, the value AuthorizationHost can be commented out in appsettings.json, by prefixing its name with two slashes, so it becomes //AuthorizationHost then a new Environment variable named KapprisShared__DocuSign__AuthorizationHost can be created. Alternatively, you could create an Environment setting named KapprisFiler__DocuSign__AuthorizationHost which will only be visible to KapprisFiler.

The permissible DocuSign setting names are ClientId, ClientSecret, AccountId, AuthorizationHost, ApiUrl and FilerHook

The permissible LegalEsign setting names are ClientId and ApiKey

The following list contains all the settings you're likely to want in your Environment. Add the settings into the Environment using the SETX command from admin command prompt. The /m switch is required to set the variable machine-wide.

SETX KapprisShared__DocuSign__AccountId <account id> /m
SETX KapprisShared__DocuSign__ApiUrl /m
SETX KapprisShared__DocuSign__AuthorizationHost /m
SETX KapprisShared__DocuSign__ClientId <client id> /m
SETX KapprisShared__DocuSign__ClientSecret <client secret> /m
SETX KapprisShared__DocuSign__FilerHook /m
SETX KapprisShared__LegalEsign__ApiKey <api id (client secret)> /m
SETX KapprisShared__LegalEsign__ClientId <client id> /m

SETX KapprisSigning__InternalSigning__CursiveFont Brush Script MT /m
SETX KapprisSigning__InternalSigning__CursiveFontSize 24 /m
SETX KapprisSigning__InternalSigning__DatabaseConnection "Data Source=IW-Server2019;Initial Catalog=KapprisWIS;Integrated Security=SSPI;" /m
SETX KapprisSigning__InternalSigning__DefaultAgency O3.LegalEsign /m

SETX KapprisFiler__IManage10__ClientId <client ID> /m
SETX KapprisFiler__IManage10__ClientSecret <client secret> /m
SETX KapprisFiler__IManage10__BasePath <url of imanage server e.g> /m
SETX KapprisFiler__NetDocuments__ClientId <client ID> /m
SETX KapprisFiler__NetDocuments__ClientSecret <client secret> /m
SETX KapprisFiler__ConnectionStrings__QueueDatabase <Connection string to sql database for Kappris filer> e.g. "Server=IW-SERVER2019;Database=KapprisFiler;User ID=kapprisfiler;Password=K@ppr1$" /m

Other vendor-specific appsettings.json settings

These settings already exist as commented-out placeholders in appsettings.json. To use them, remove the leading comment characters // and supply a value from the relevant list below:

  • DocuSign RetrievalType
    • "" empty string - means retrieve individual files
    • "combined" - for one file
    • "archive" - for zip (not supported),
    • "certificate" - for just certificate
    • "portfolio" - for a portfolio pdf
  • DocuSign ConnectHmacKey
    • if this is commented out or set to the empty string "", it means don't try to use an hmac key
    • otherwise ConnectHmacKey is the path to the file for the connect hmac key
  • IManage10 BasePath
    • BasePath is the base url of the imanage server e.g.

Further Installation Notes

On the SQL server we need to create the KapprisFiler database and the SQL login account 'KapprisFiler' with the password shown above. The account needs db_owner roles for the KapprisFiler database.

Make sure that the port is NOT used when entering the DocuSign filer hook…


…would be correct as DocuSign can only use port 443. LegalEsign CAN use 44361 and this is not needed here.

Add the redirect URI for DocuSign:

Add the API Callbacks for LegalEsign (note the / at the end of each one):

And in the iManage KapprisFiler app:

KapprisFiler and iManage 10

First you will need to add the KapprisFiler app to iManage:

In iManage 10 control centre go to Settings | Applications and click Add Application:

Add the redirect URIs and note the Client ID and Secret.

Set the security for an admin user.

KapprisFiler and NetDocs

In the NetDocs Partner Portal App Registration choose New Application as below:

Configure as below noting the ClientID and Secret

In KapprisFiler AppSettings.json, add:

"IManage10": {
   "DocPattern": "[NAME] ([ID]) Signed [DATE]"

"NetDocuments": {
    "//ClientId": "",
    "//ClientSecret": "",
    "BasePath": "",
    "AuthorizePath": "",
    "DocPattern": "[NAME] ([ID]) Signed [DATE]"

See explanation of DocPattern here

In Kappris Signing Server AppSettings.json add:

"KapprisFiler": "<base url of KapprisFiler e.g.>

You can now add the Client IDs and Secrets for iManage and NetDocs into the environment of the Server hosting KapprisFiler with the SETX commands as described earlier.

KapprisFiler and DocuSign

Generate an RSA key pair in the DocuSign app:

Save the Public Key text as e.g. KutanaPublicKey.pem and the Private Key text as e.g. KutanaPrivateKey.pem

Save these files in a shared location and add an entry in the KapprisFiler appsettings.json as below:

"PrivateKey": "\\\\busdata\\company\\Docusign\\KapprisTestPrivate.pem",


HMAC Security - 

This is only triggered if a company is using Connect in DocuSign (optional DocuSign component)

Add setting "ConnectHmacKey" this allows us to get to the file containing the HMAC key used for connect, if not using connect this must be blank or not exist.

If we specify a hmacKey then the signed document must have a hmac verification header, or if an envelope has a hmac verification header it must match with our key.  if not we ignore the hook payload  as its not valid.

KSS now checks for ConnectHmacKey having a value and set up the event packet in the envelope to use HMAC

In the environment, add the below:


To obtain the HMAC key, go to your DocuSign account and choose 'Connect' in the LH menu then 'Connect Keys'

KapprisFiler homepage e.g. is where the client will login to iManage/NetDocs with the admin account specified when you created the app for earlier.

DocuSign Admin

The admin login for DocuSign should be done using the DocuSign Admin Module which the client will need to add to their DocuSign account if they don't already have it.

Setup instructions for this can be found here

You can view submissions to KapprisFiler at e.g.


The Status should change from Pending - Signed - Retrieved - Filed as the document goes through the various signing stages. 

New revision here