Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Secure(ish) way to move web.config in to project w/o SQL passwords #129

Open
jeremy-farrance opened this issue Sep 27, 2020 · 0 comments
Open

Comments

@jeremy-farrance
Copy link
Collaborator

jeremy-farrance commented Sep 27, 2020

See either ACCU4.com or the CHRC App backend for reference. I REALLY like having DNN's web.config in the OHS project, but have avoided it mostly because (even though these repos are private) it includes things like SQL database account/login/passw info.

So to make this a little safer, this is the process. I have no idea if we should or how we would help account for this in this project or is it just a manual, post-deploy setup step.

Steps:

  1. create a new file app/webConnections.config
  2. add this file to .gitignore
  3. copy the SQL connection info from web.config (at appx line 37) in to app/webConnections.config and save/upload, so it is just this:
<connectionStrings>
  <add name="SiteSqlServer" connectionString="Data Source=.\SQLSTD;Initial Catalog=dbname;User ID=dbusername;Password=s3cr3TSh3rE!" providerName="System.Data.SqlClient" />
</connectionStrings>
  1. modify web.config to include this '` between the /configSections and appSettings tags in place of the stuff that is there now and upload
  2. test, make sure its working ;)

So we are just moving the sensitive info to an include and git ignoring it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant