Prerequisites

  1. An on premise installation of Spira (SpiraTest, SpiraTeam, or SpiraPlan)
  2. The Spira data sync service is installed and running

How to encrypt the credentials

  • Find the DataSyncService.exe.config file
  • Make sure this file is trusted (otherwise you will get error messages in later steps):
    • right clicking on the file, and selecting Properties
    • check the bottom of the window (below the  attributes section) for an "Unblock" box
    • if you only see the attributes Read-only and Hidden at the bottom of the window, it is already trusted. 
  • Edit the DataSyncService.exe.config file in a text editor to supply plain text credentials (if not already present)
  • Save the file and verify that the credentials work correctly (i.e. by running the data sync successfully)
  • Make a copy of the DataSyncService.exe.config file called "web.config". This is very important as the Microsoft encryption script only encrypts files named web.config 
  • Open PowerShell as an administrator and execute the following command, replacing {web config parent folder} with the file path to the folder containing the web.config file. Do not end the path with web.config.
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -pef "applicationSettings/Inflectra.SpiraTest.DataSyncService.Properties.Settings" "{web config parent folder}"
  • Verify the web.config file is encrypted correctly by:
    • opening the file in a text editor
    • check that there is now an <EncryptedData> tag where there used to be the settings.
    • note that the Powershell script will tell you if it failed, but it is always good to double check
  • Delete the original DataSyncService.exe.config file
  • Rename the newly encrypted web.config file to DataSyncService.exe.config
  • Finally, verify that the data sync still works correctly by letting it run and checking it can connect to Spira successfully