Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Nov 29, 2010 @ 16:25
    Ismail Mayat
    0

    Encrypt db password in web.config

    Is it possible to encrypt the password in the web.config under appSettings key umbracoDbDSN without making a core change?

    Regards

    Ismail

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 29, 2010 @ 16:56
    Lee Kelleher
    0

    Hey Ismail,

    As far as I'm aware, it's not possible with the appSettings ... as you say, not without modifying the core. :-(

    - Lee

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Nov 29, 2010 @ 16:56
    Matt Brailsford
    0

    Hey Ismail,

    Assuming nothing has changed, Dirk answered this a while ago:

    http://our.umbraco.org/forum/core/general/6265-umbracoDbDSN---encrypted-connection-string

    So looks like it's a no.

    Matt

  • Colin Browne 31 posts 52 karma points
    Nov 29, 2010 @ 17:14
    Colin Browne
    0

    Thats a bit disappointing, I always felt a bit uneasy having the password so plainly visible...

  • Rick Mather 42 posts 124 karma points
    Nov 29, 2010 @ 17:37
    Rick Mather
    1

    You could always just use the aspnet_regiis tool:

    http://msdn.microsoft.com/en-us/library/zhhddkxy.aspx

    It'll only work on entire configuration sections though, so you'd have the encrypt everything in appSettings. Might be worth doing it as part of the deployment process though if you can't use a trusted connection (I don't like storing db passwords in plain text either - even in web.config).

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Nov 29, 2010 @ 23:07
    Aaron Powell
    1

    No there is no way to do an encrypted connection string without modifying the core.

    If you're worried about storing a password then generate a unique one per Umbraco instance, make it like 20 characters, and then create a user just for that db.

    If you properly secure your DB  then you shouldn't really need to worry about having an encrypted connection string.

  • Almir Mesanovic 1 post 3 karma points
    Dec 01, 2010 @ 14:41
    Almir Mesanovic
    1

    Hi Ismail,

    You can use .NET aspnet_regiis tool to encrypt or decrypt sections of web.config file.

    Check out following links

    http://msdn.microsoft.com/en-us/library/zhhddkxy.aspx

    http://weblogs.asp.net/scottgu/archive/2006/01/09/434893.aspx

  • Adrian Hesketh 7 posts 27 karma points
    Dec 03, 2010 @ 15:26
    Adrian Hesketh
    0

    You could always use Windows Authtentication.  That means that you wouldn't need to have a password in the Web.Config at all.  If you create an Application Pool in IIS, set it up to run as a Windows User that has access to the database, then add the Umbraco system to run in that application pool, you can use a database connection string like: data source=localhost;initial catalog=Umbraco;integrated security=True and the system will work fine.

    To be honest, the installation screen threw me a bit the first time I saw Umbraco since I always disable username / password authentication in SQL Server (it's considered bad security practice to use it in most Windows development organisations).

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Dec 03, 2010 @ 15:29
    Ismail Mayat
    0

    cheers adrian.

    Regards

    Ismail

Please Sign in or register to post replies

Write your reply to:

Draft