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

  1. #1

    Default Intranet security

    Hi. I'm designing an intranet application in a heterogenious MS environment (XP, W2K Server, SQL Server 2K). The perfect security scenario for me is described in the Patterns & Practices guide entitled "Building Secure ASP.NET Applications". In the "Intranet Security" chapter [1] the text describes the "ASP.NET to SQL Server" architecture and recommends that impersonation be switched off and the machine.config file be amended to supply a known password for the ASPNET account. We use windows authentication throughout.

    However, the application is one of several on the machine so editing machine.config is not an option. It is an essential requirement for me to be able to determine the user's identity when making changes to the database for audit purposes. How should I proceed?

    Many thanks

    kh

    [1] [url]http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetch05.asp[/url]
    kh Guest

  2. Similar Questions and Discussions

    1. Intranet Development
      Our company is in the process of planning an Intranet. Does anyone know of a good open source Intranet application or a comprehensive tutorial that...
    2. Intranet ODBC
      i have several computers networked together. if i create cfm pages, is it possible to connect these pages to the MS Access database? if yes, how do...
    3. caspol & local intranet security
      Hi We have built an aspnet application which uses a windows user control embedded in an object tag. The app is to be deployed on a large client...
    4. Consume web service via XMLHTTP on intranet security problems
      *Crossposted to microsoft.public.dotnet.webservices* This is all on our intranet and everything is running on Win 2K. We have an ASP application...
    5. Win2k Intranet from OS X
      spacemancw <spacemancw@yahoo.com> wrote: Your admin probably needs to allow Basic authentication alongside with integrated Windows...
  3. #2

    Default Re: Intranet security

    The easiest thing to do would be to switch to Win2K3 server. With that, you
    can easily set up an App Pool identity that is a domain account that can be
    used to connect to SQL Server. Then, you would just make sure that only
    apps that need to use that identity use that App Pool.

    This is harder to deal with in Win2K. The other supported way to do this is
    to have your ASP.NET application impersonate a known domain identity so that
    will be used to connect to SQL, but unfortunately, Win2K requires SYSTEM
    level permissions to impersonate a specific user (this is because the
    LogonUser API requires Act as part of the operating system privileges on
    Win2K to be called), so you'd need to change your ASP.NET processModel from
    Machine to System to get that which is a big security risk.

    Another option is to do all of your SQL access through a COM+ component that
    you configure with a known domain identity.

    The other easy option is to give up on SSPI access to SQL and use a SQL
    login. Then, be careful with your connection string.

    HTH,

    Joe K.

    "kh" <kh@discussions.microsoft.com> wrote in message
    news:23E85C78-D1E3-4F69-B926-465C9C778E0D@microsoft.com...
    > Hi. I'm designing an intranet application in a heterogenious MS
    environment (XP, W2K Server, SQL Server 2K). The perfect security scenario
    for me is described in the Patterns & Practices guide entitled "Building
    Secure ASP.NET Applications". In the "Intranet Security" chapter [1] the
    text describes the "ASP.NET to SQL Server" architecture and recommends that
    impersonation be switched off and the machine.config file be amended to
    supply a known password for the ASPNET account. We use windows
    authentication throughout.
    >
    > However, the application is one of several on the machine so editing
    machine.config is not an option. It is an essential requirement for me to be
    able to determine the user's identity when making changes to the database
    for audit purposes. How should I proceed?
    >
    > Many thanks
    >
    > kh
    >
    > [1] [url]http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetch05.asp[/url]

    Joe Kaplan \(MVP - ADSI\) Guest

  4. #3

    Default Intranet Security

    I'm building an Intranet Web app to track our company's purchase orders. I
    would like to have the employees use the app without being prompted for a
    user name and pw, hoping to catch their identities from their Windows account.

    Since it's an Intranet app, I'm using Windows authentication, and denying
    anonymous access.
    Here are the web.config settings for authentication and authorization:
    <authentication mode="Windows" />
    <identity impersonate="true"/>
    <authorization>
    <deny users="?" /> <!-- Allow all users -->
    </authorization>

    In my Page_load event, I am able to get the user's identity once he logs in
    to the app, and then I pass that identity to a SQL Server db to retrieve
    other info about the employee.

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load

    If Not Page.IsPostBack Then
    Dim wp As WindowsPrincipal
    If Page.User.Identity.IsAuthenticated AndAlso TypeOf
    User.Identity Is WindowsIdentity Then

    Try
    wp = DirectCast(Page.User, WindowsPrincipal)
    Session("FullDomainName") = wp.Identity.Name

    'Check for valid employee in SQL Server db.
    If IsValidEmployee(Session("FullDomainName"),
    Session("ConnectStringSQL")) Then
    'Welcome the user.
    lblUser.Text = "Welcome " & Session("FirstName") & " "
    & Session("LastName") & "!"

    Catch ex As Exception
    lblError.Text = ex.Message
    imbCreatePO.Visible = False
    imbTrackPO.Visible = False
    imbApprovePO.Visible = False
    End Try

    End If
    End If
    End If
    End Sub

    What am I missing that is causing the app to display the prompt for a user
    name and password? Shouldn't it recognize that the employee is already logged
    in to Windows?


    Richard Guest

  5. #4

    Default Re: Intranet Security

    Richard when are u gettting the PROMPT??
    Are u redirecting them to another page in another domain or something..
    Pls elaborate..or have u solved it..
    Patrick



    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Patrick Olurotimi Ige Guest

  6. #5

    Default Re: Intranet Security

    Hi Patrick, I'm getting the prompt immediately before the page displays. I'm
    not redirecting.

    "Patrick Olurotimi Ige" wrote:
    > Richard when are u gettting the PROMPT??
    > Are u redirecting them to another page in another domain or something..
    > Pls elaborate..or have u solved it..
    > Patrick
    >
    >
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!
    >
    Richard 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