I'm trying to use aspnet_regiis -pef
to encrypt configuration sections and protect sensitive data. I've managed to do that successfully for sections like connectionStrings and system.webServer but I'm interested in encrypting specific sub-sections (or even specific attributes if possible).
For example, I'd like to be able to encrypt the authentication section which is under system.webServer/security/authentication in the config. Or, ideally, I'd like to be able to encrypt an attribute or an element value only. Put it differently, I'd like to be able to give it an xpath and just have that specific part of the XML encrypted.
Is this possible? And is is there a way to retrieve all the sections that can be encrypted?