Home / Companies / Octopus Deploy / Blog / Post Details
Content Deep Dive

Encrypting connection strings in Web.config

Blog post from Octopus Deploy

Post Details
Company
Date Published
Author
Paul Stovell
Word Count
314
Language
English
Hacker News Points
-
Summary

Paul Stovell highlights the benefits of using Windows Authentication for connection strings in web applications to avoid storing passwords in the Web.config file, but acknowledges scenarios where this isn't feasible and recommends encrypting the connection string instead. To facilitate this, he created a step template for Octopus Deploy that automates the encryption process using the aspnet_regiis tool. This template, available in the Octopus Deploy Library, requires a parameter for the website directory and is intended to be executed after a package has been deployed to a web server. However, Stovell notes a potential security window when using IIS website features, suggesting a workaround involving a custom PowerShell script for safer implementation.