AUTHOR: Marin Bratanov
DATE POSTED: May 03, 2018
Encrypt the Telerik settings in the web.config.
In some cases you may want to avoid storing information in plain text to improve security. While most of the settings the UI for ASP.NET AJAX controls use are flags, some contain keys or folder paths. To minimize the risk of this data being used without authorization (e.g., by someone who has file access to a shared server), you may want to encrypt the relevant web.config sections.
ASP.NET provides the aspnet_regiis tool that allows you to encrypt portions of the web.config, among other things. This process is transparent to the ConfigurationManager claas that the Telerik controls use to fetch the appSettings flags they use.
To encrypt the appSettings section, follow these steps:
aspnet_regiis -pef appSettings "d:\TelerikWebApp1\TelerikWebApp1" -prov "DataProtectionConfigurationProvider"
To decrypt the appSettings section, follow these steps:
aspnet_regiis -pdf appSettings "d:\TelerikWebApp1\TelerikWebApp1"
There are a few things you need to keep in mind if you decide to use this:
Here is an example of what you can expect to change in the web.config:
Before:
<
appSettings
>
add
key
=
"Telerik.Skin"
value
"Black"
/>
"Telerik.ScriptManager.TelerikCdn"
"Disabled"
"Telerik.StyleSheetManager.TelerikCdn"
"Telerik.Web.UI.RenderMode"
"lightweight"
"Telerik.Web.UI.DialogParametersEncryptionKey"
"YOUR-UNIQUE-STRONG-RANDOM-VALUE-UNIQUE-TO-YOUR-APP"
</
After:
configProtectionProvider
"DataProtectionConfigurationProvider"
EncryptedData
CipherData
CipherValue
>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAt7qilu/CHE6sZnEIuCfShQQAAAACAAAAAAAQZgAAAAEAACAAAADS+iPSr34LAqLLpZcwDquQRbnPVSkMi4/KYji2rAdMOAAAAAAOgAAAAAIAACAAAAClAuC3rESD0qU2qoS4/0pAN8jB7hBiF5MQ0okcnAjtLEADAAAtZZgC5AmyZi9zJJYh2J3mk5W7g8F+agIBhqwpQpVVtCbicXXL83YgsZtiqc0+dgGygJuJvMiEthqCNSYJAv+fxrRGDP1LFGqNA3wrVNFxowqVklBn0c5pXXlorSJG6V0zGx7U4JOLONflNm9kb2QyIBxxbCXR6ZIWkO795l7oz8hBKaC90Sq6L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