ASP.NET Impersonation / delegation

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

  1. #1

    Default Re: ASP.NET Impersonation / delegation

    you are on the right track. ntlm will not delegate even if your security
    team allowed delegation, only digest allows delegation.

    on win2k you have no choice but to set SE_TCB_NAME (this is removed in xp).
    its a fairly safe priviledge. its original intent was to control Trojan
    horses (programs that pretended to be the login program).

    -- bruce (sqlwork.com)



    "Magdelin" <magdelinsuja@newsgroups.nospam> wrote in message
    news:9C2BA3A9-A627-46B0-9215-EA8C99E0F978@microsoft.com...
    > Hi all,
    >
    > I am trying to implement ASP.NET impersonation/delegation in an intranet
    application in C#. The presentation layer developed in ASP.NET accesses the
    business logic via .net remoting. The business logic in-turn accesses the
    other network resources such as the SQL Server and the Active Directory.
    > Both the business logic and the web application are deployed in IIS
    installed on two separate Win2k servers. Since, the application requires
    "Windows Authentication" in order to implement the declarative Role-based
    security, both business and presentation layers are configured for
    impersonation, by including the <identity impersonate="true"/> tag in their
    respective web.config files. The directory security of business and web
    applications hosted in IIS is configured for "Integrated Windows
    Authentication". The anonymous, digest and basic authentication options are
    not selected.
    >
    > With the above mentioned configuration, if the business logic tries to
    access the active directory, a COMexception occurs with the error message
    "An operation error has occurred". I believe this error has occurred because
    the impersonated account and the computer on which the business logic runs
    are not trusted for delegation by the Domain controller. The following links
    explains the reason for such an error.
    >
    > [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;810572[/url]
    > [url]http://support.microsoft.com/default.aspx?kbid=325894[/url]
    > [url]http://support.microsoft.com/default.aspx?kbid=264921[/url]
    >
    > Link to the newsgroup search
    >
    [url]http://msdn.microsoft.com/newsgroups/managed/default.aspx?query=double+hop&d[/url]
    g=&cat=en-us-msdnman&lang=en&cr=US&pt=&catlist=&dglist=&ptlist=
    >
    > Since our security team considers trusting win2k server for delegation to
    be a major security risk, I haven't had the opportunity, to test the
    business logic with the trusted configuration myself. From the trace log it
    is clear that the authentication type is NTLM and the account used to test
    the business logic has sufficient privileges to query the Active Directory
    (AD). The application is successful in querying the AD when account
    properties (userName and password) are included in the <Identity> tag.
    >
    > Fortunately, I found few delegation alternatives in MSDN at
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html[/url]
    /vxconaspnetdelegation.asp
    >
    > The WindowsImpersonationContext.Impersonate() is now considered as the
    best alternative for impersonating an account that is specially created for
    this purpose. The role based security will be implemented as before but for
    accessing resources such as AD and SQL Server the new helper account will be
    used. The account that currently runs the process will be impersonated with
    a special helper account which will have sufficient privileges to
    impersonate as well as query the AD. Once the task with the AD is completed,
    the windows identity will revert back to its original credentials. The
    following link details how to make such impersonation, possible.
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm[/url]
    l/cpconImpersonatingReverting.asp
    >
    > When the impersonation and reversion is tried on the win2k server, I
    receive the error message "1314: The required privilege is not held by
    client". I know that the LogonUser API requires "Act as part of the
    operating system (SE_TCB_NAME)" privilege. But, I would like to grant the
    helper account with least possible privilege.
    >
    > Is there a privilege other than the "SE_TCB_NAME" that has fewer
    privileges but can still make the LogonUser API work? Is there a better
    alternative for ASP.NET impersonation/delegation?
    >
    > Any ideas or pointers to articles would be greatly appreciated.
    >
    > Thanks in advance.
    > Magdelin

    bruce barker Guest

  2. Similar Questions and Discussions

    1. ASP.NET Impersonation & Delegation
      I have read various articles regarding explaining ASP.Net security model. I have one simple question regarding Delegation that i can't seemed to...
    2. Impersonation, Delegation & SQL Server
      I bailed on this before and just went to Basic Authentication and told the users they would have to live with signing on again.... but now I need to...
    3. Impersonation or Delegation?
      A client makes a request that executes a stored procedure in SQL Server. That stored procedure attempts to read a file on the web server but fails...
    4. Impersonation/Delegation security considerations
      I'm having trouble finding specific documentation regarding the negative impact of using delegation in a Windows 2000 environment. I've read...
    5. Impersonation and delegation
      I've read many messages and even more technotes, but I still can't get the following scenario to work: I have a Windows 2003 web server and a...
  3. #2

    Default Re: ASP.NET Impersonation / delegation

    Hi,

    Unless you are running a Windows 2003 network, neither Digest nor NTLM are
    delegatable. Only Kerberos auth is delegatable. Windows 2003 introduces
    protocol transition, which allows the original user to use any
    authentication mechanism, and IIS 6.0 can get a Kerberos token to access a
    remote resource.

    SE_TCB_NAME is a significant user right as I understand it. Certainly more
    than trusting a computer for delegation IMHO.

    Cheers
    Ken


    "bruce barker" <nospam_brubar@safeco.com> wrote in message
    news:u8pdVVULEHA.2260@TK2MSFTNGP09.phx.gbl...
    : you are on the right track. ntlm will not delegate even if your security
    : team allowed delegation, only digest allows delegation.
    :
    : on win2k you have no choice but to set SE_TCB_NAME (this is removed in
    xp).
    : its a fairly safe priviledge. its original intent was to control Trojan
    : horses (programs that pretended to be the login program).
    :
    : -- bruce (sqlwork.com)
    :
    :
    :
    : "Magdelin" <magdelinsuja@newsgroups.nospam> wrote in message
    : news:9C2BA3A9-A627-46B0-9215-EA8C99E0F978@microsoft.com...
    : > Hi all,
    : >
    : > I am trying to implement ASP.NET impersonation/delegation in an intranet
    : application in C#. The presentation layer developed in ASP.NET accesses
    the
    : business logic via .net remoting. The business logic in-turn accesses the
    : other network resources such as the SQL Server and the Active Directory.
    : > Both the business logic and the web application are deployed in IIS
    : installed on two separate Win2k servers. Since, the application requires
    : "Windows Authentication" in order to implement the declarative Role-based
    : security, both business and presentation layers are configured for
    : impersonation, by including the <identity impersonate="true"/> tag in
    their
    : respective web.config files. The directory security of business and web
    : applications hosted in IIS is configured for "Integrated Windows
    : Authentication". The anonymous, digest and basic authentication options
    are
    : not selected.
    : >
    : > With the above mentioned configuration, if the business logic tries to
    : access the active directory, a COMexception occurs with the error message
    : "An operation error has occurred". I believe this error has occurred
    because
    : the impersonated account and the computer on which the business logic runs
    : are not trusted for delegation by the Domain controller. The following
    links
    : explains the reason for such an error.
    : >
    : > [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;810572[/url]
    : > [url]http://support.microsoft.com/default.aspx?kbid=325894[/url]
    : > [url]http://support.microsoft.com/default.aspx?kbid=264921[/url]
    : >
    : > Link to the newsgroup search
    : >
    :
    [url]http://msdn.microsoft.com/newsgroups/managed/default.aspx?query=double+hop&d[/url]
    : g=&cat=en-us-msdnman&lang=en&cr=US&pt=&catlist=&dglist=&ptlist=
    : >
    : > Since our security team considers trusting win2k server for delegation
    to
    : be a major security risk, I haven't had the opportunity, to test the
    : business logic with the trusted configuration myself. From the trace log
    it
    : is clear that the authentication type is NTLM and the account used to test
    : the business logic has sufficient privileges to query the Active Directory
    : (AD). The application is successful in querying the AD when account
    : properties (userName and password) are included in the <Identity> tag.
    : >
    : > Fortunately, I found few delegation alternatives in MSDN at
    :
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html[/url]
    : /vxconaspnetdelegation.asp
    : >
    : > The WindowsImpersonationContext.Impersonate() is now considered as the
    : best alternative for impersonating an account that is specially created
    for
    : this purpose. The role based security will be implemented as before but
    for
    : accessing resources such as AD and SQL Server the new helper account will
    be
    : used. The account that currently runs the process will be impersonated
    with
    : a special helper account which will have sufficient privileges to
    : impersonate as well as query the AD. Once the task with the AD is
    completed,
    : the windows identity will revert back to its original credentials. The
    : following link details how to make such impersonation, possible.
    :
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm[/url]
    : l/cpconImpersonatingReverting.asp
    : >
    : > When the impersonation and reversion is tried on the win2k server, I
    : receive the error message "1314: The required privilege is not held by
    : client". I know that the LogonUser API requires "Act as part of the
    : operating system (SE_TCB_NAME)" privilege. But, I would like to grant the
    : helper account with least possible privilege.
    : >
    : > Is there a privilege other than the "SE_TCB_NAME" that has fewer
    : privileges but can still make the LogonUser API work? Is there a better
    : alternative for ASP.NET impersonation/delegation?
    : >
    : > Any ideas or pointers to articles would be greatly appreciated.
    : >
    : > Thanks in advance.
    : > Magdelin
    :
    :


    Ken Schaefer Guest

  4. #3

    Default Re: ASP.NET Impersonation / delegation

    Hi Magdelin,

    I'm viewing this post and found it is a duplicated one with another one in
    microsoft.public.dotnet.framework.aspnet newsgroup.
    And both Bruce and Ken have also posted in that one. If feel it convenient
    that we continue to discuss in that
    thread, please feel free to followup there. Thanks.


    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! [url]www.microsoft.com/security[/url]
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    Get Preview at ASP.NET whidbey
    [url]http://msdn.microsoft.com/asp.net/whidbey/default.aspx[/url]

    Steven Cheng[MSFT] Guest

  5. #4

    Default Re: ASP.NET Impersonation / delegation

    ADAudit Plus is a valuable security tool that will help you be compliant with all the IT regulatory acts. With this tool, you can monitor user activity such as logon, file access, etc. A configurable alert system warns you of potential threats.

    http://www.manageengine.com/products/active-directory-audit/
    johnrockfellerz 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