DPAPI and connection string

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default DPAPI and connection string

    I am planning on using DPAPI for an asp.net application.
    I will configure the app to run under an account I
    create. My understaning of DPAPI is that it needs an
    login in order to work correctly, i.e. I need to log on
    interactivley at least once with the the account. That
    sounds dandy. My question is this, if I plan on
    configuring the custom account to *not* be able to logon
    interactively (via the local policy) will that nix the
    ability to use DPAPI??

    TIA, kevin
    Kevin Cunningham Guest

  2. Similar Questions and Discussions

    1. need help with connection string
      i keep reading that it is not secure to hard code the connection string to the server into my swf. so how can i get the string into my swf without...
    2. connection string
      Hi there, I have recently changed the connection string on a site that was working perfectly. I used an OLE DB connection with this code: var...
    3. Size of Entropy with Dpapi Encrypted Connection String
      Hi. I'm using the dpapi to encrypt a sql server connection string. Strictly speaking how many bytes of entropy am I supposed to use?? Phil...
    4. DB Connection String
      Hi, I need to store the database connection string inside web.config file. What would be the best way to encrypt and decrypt it? Thanks, Ali
    5. Encrypted Connection String
      How would I go about taking my DB connection strings and putting them into my Web.Config file in encrypted form? Of course, I'd need to know how to...
  3. #2

    Default Re: DPAPI and connection string

    Kevin,

    From
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT08.asp[/url]

    a.. DPAPI can work with either the machine store or user store (which
    requires a loaded user profile). DPAPI defaults to the user store, although
    you can specify that the machine store be used by passing the
    CRYPTPROTECT_LOCAL_MACHINE flag to the DPAPI functions.
    a.. The user profile approach affords an additional layer of security
    because it limits who can access the secret. Only the user who encrypts the
    data can decrypt the data. However, use of the user profile requires
    additional development effort when DPAPI is used from an ASP.NET Web
    application because you need to take explicit steps to load and unload a
    user profile (ASP.NET does not automatically load a user profile).
    a.. The machine store approach (adopted in this How To) is easier to develop
    because it does not require user profile management. However, unless an
    additional entropy parameter is used, it is less secure because any user on
    the computer can decrypt data. (Entropy is a random value designed to make
    deciphering the secret more difficult.) The problem with using an additional
    entropy parameter is that this must be securely stored by the application,
    which presents another key management issue.
    Note If you use DPAPI with the machine store, the encrypted string is
    specific to a given computer and therefore you must generate the encrypted
    data on every computer. Do not copy the encrypted data across computers in a
    farm or cluster.
    So, in theory, you never need to logon with the account if you use the
    machine store. Of course, your application should then safely store an
    entropy (salt) value to help protect it from other DPAPI applications with
    access to the machine store.

    -Steve Jansen

    "Kevin Cunningham" <anonymous@discussions.microsoft.com> wrote in message
    news:2ccbd01c39409$b9d338f0$a601280a@phx.gbl...
    > I am planning on using DPAPI for an asp.net application.
    > I will configure the app to run under an account I
    > create. My understaning of DPAPI is that it needs an
    > login in order to work correctly, i.e. I need to log on
    > interactivley at least once with the the account. That
    > sounds dandy. My question is this, if I plan on
    > configuring the custom account to *not* be able to logon
    > interactively (via the local policy) will that nix the
    > ability to use DPAPI??
    >
    > TIA, kevin

    Steve Jansen Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139