- Getting Started
-
Administration Guide
- Get Started with Administering Wyn Enterprise
- Configuration Settings
- Account Management
- Security Management
- System Management
- Document Management
-
How To and Troubleshooting
- Change Default Password
- Set Language Preference
- Set Time Zone
- Slack Integration
- MS Teams Integration
- Create Custom Language Packages
- Configure Identity Server
- Configure Single Sign-on
- Convert Crystal Reports/MS Access Reports to Wyn Reports
-
Encrypt or Decrypt Connection Strings
- Using ClickHouse as OLAP Database
- Hide Download Link in Scheduled Tasks
- Configure Redis Cluster using Username and Password
- User Guide
- Developer Guide
Encrypt or Decrypt Connection Strings
In Wyn Enterprise, we use connection strings to connect to a database server. These connection strings are typically stored in the configuration file of the application. It means that the connection-specific information such as the server name, database name, username, password, etc. are stored in plain text in the configuration file. This provides attackers an easy access to highly sensitive data in the file.
In order to protect the sensitive data in the configuration file, we should encrypt the connection strings. This is the best way to secure the credentials and other important details in the configuration file. Refer to the below sections that describe the different ways to encrypt a connection string using the Wyn Enterprise installer and the console tool.
Using Installer
You can enable the option to encrypt the connection string during the Wyn Enterprise installation process as shown.
Windows
Linux
Using Console Tool
You can manually encrypt or decrypt a connection string in the configuration file by using the console tool located here -
Windows - C:\Program Files\Wyn Enterprise\Tools\EncryptOrDecryptString
Linux - /opt/Wyn/Tools/EncryptOrDecryptString/
Note: The console tool is automatically installed during the Wyn Enterprise installation process.
The following steps describe how to encrypt the connection strings using the console tool in Windows.
Open the Command Prompt.
Enter the directory where the console tool is located, i.e. C:\Program Files\Wyn Enterprise\Tools\EncryptOrDecryptString to access eods.dll.
Copy the unencrypted database connection string from the configuration file (i.e. Wyn.conf) located here - C:\Program Files\Wyn Enterprise\Monitor\conf. Note that the configuration file in Linux is located here - /opt/Wyn/Monitor/Wyn.conf.
Run the following command to encrypt the connection string - dotnet eods.dll 0 ConnectionString where 'ConnectionString' refers to the unencrypted database connection string.
Press the Enter key. The database connection string is now encrypted.
Replace the string with the encrypted connection string, and then set the EnableEncryptedConnectionString node in the configuration file to 'True' as shown.
Restart the Wyn Services.
The changes are applied after the WynService is restarted.
The following steps describe how to decrypt the connection strings using the console tool in Windows.
Open the Command Prompt.
Enter the directory where the console tool is located, i.e. C:\Program Files\Wyn Enterprise\Tools\EncryptOrDecryptString to access eods.dll.
Copy the encrypted database connection string from the configuration file (i.e. Wyn.conf) located here - C:\Program Files\Wyn Enterprise\Monitor\conf. Note that the configuration file in Linux is located here - /opt/Wyn/Monitor/Wyn.conf.
Run the following command to decrypt the connection string- dotnet eods.dll 1 ConnectionString where 'ConnectionString' refers to the encrypted database connection string.
Press the Enter key. The database connection string is now decrypted.
Replace the string with the unencrypted connection string, and then set the EnableEncryptedConnectionString node in the configuration file to 'False' as shown.
Restart the Wyn Services.