Thanks. Perhaps I should have clarified that I've previously read all of this and this tells me that no, there isn't a simple solution to this requirement. To be sure, the authors are indicating the use of environment variables if I don't have access to
cloud based security tools, which I don't. Only a mad person uses environment variables (is it 1980 or 2020?), so at some point, when I have a spare few days, I'll try to work out how to do it using a FileConfiguration provider and if it's simple enough I'll
post it.
For now, it has occurred to me that there is a very simple solution to this. As you say, it's easy enough to work the encryption tools, so I'll just create a little app that takes the sensitive string, with the keys and churns out the encrypted string.
I can then copy and paste the string into the config file and use a simple helper class to decrypt as necessary.
Member
7 Points
42 Posts
Re: Encrypt sections of the appsettings.json inside my Asp.Net Core MVC web apllication
Sep 01, 2020 11:15 AM|PJM8765|LINK
Thanks. Perhaps I should have clarified that I've previously read all of this and this tells me that no, there isn't a simple solution to this requirement. To be sure, the authors are indicating the use of environment variables if I don't have access to cloud based security tools, which I don't. Only a mad person uses environment variables (is it 1980 or 2020?), so at some point, when I have a spare few days, I'll try to work out how to do it using a FileConfiguration provider and if it's simple enough I'll post it.
For now, it has occurred to me that there is a very simple solution to this. As you say, it's easy enough to work the encryption tools, so I'll just create a little app that takes the sensitive string, with the keys and churns out the encrypted string. I can then copy and paste the string into the config file and use a simple helper class to decrypt as necessary.
Kind regards, Paul