Security, WebServices

ewellnitz_at_solarc.com
Date: 09/29/05

  • Next message: Helge Jensen: "Installing CA-certificate in certificate-store from .NET"
    Date: 29 Sep 2005 08:39:32 -0700
    
    

    Thank you in advance to any help that anyone can provide for the
    following questions.

    We are implementing authentication and authorization in an n-tier
    environemnt, and I'm having two issues:

    1. Authenticating a user outside the domain using <authentication
    mode="Windows"/>
    2. Marshalling credentials across multiple web service hops with
    impersonation turned off.

    Here are a few current facts about our applicaiton:
    1. Using .NET Framework 2.0
    2. Messaging between tiers is accomplished using ASP.NET 2.0 Web
    Services.
    3. Clients connecting to the web services may or may not be outside the
    domain.
    4. Using Windows authentication (<authentication mode="Windows"/>)
    5. Using Authorization Manager (azman) for Authorization
    6. Impersonation turned off on web services b/c they need access to
    resources (eventlogs, files, etc).

    First question:
    We have an application user that is a member of the domain. When the
    user logs in to the application, we create a NetworkCredentials
    (username/pwd/domain) and set the credentials on the service proxy.
    This works greate when connecting within the domain, however when
    attempting to connect from outside the domain we are receiving a 401 -
    Access denied. After some research, I believe we need to use basic
    authenticaion as opposed to NTLM when outside the domain. However,
    when using basic authentication, will the framework still authenticate
    the user credentials against the domain user? (i.e can i use windows
    authentication + basic authentication w/o having to manually
    authenticate the user?)

    Second question:
    Since clients may be outside the domain, we cannot assume that the
    client has access to resources required by azman. Therefore, we
    created a security web service that wraps azman with a few methods such
    as CheckOperations(string[]). We would like to consume this service on
    the client and the middle tier (other web services). In addition, some
    of the business logic assemblies that consume the web service are
    shared b/t the client and middle tier. Inoking the service on the
    client seems to work fine, we just set the credentials on the security
    service proxy and authorize against the HTTPContext.Current.User.
    However, invoking the service from another middle tier service not
    work:

    1. Client sets credentials on and invokes BusinessLogicService
    (HTTPContext.Current.User are correct)
    2. BusinessLogicService calls method in client/middle tier shared
    assembly BusinessLogcAsm
    3. BusinessLogicAsm invokes the CheckOperations method on the
    SecurityService
    4. Since impersonation is off (see above), the SecuirtyService's
    HTTPContext.Current.User is not correct (its the user
    BusinessLogicService is running under).

    Invoking WindowsIdentity.Impersonate() before the security service call
    within BusinessLogicAsm will fix the issue in the middle tier, however
    since the BusinessLogicAsm is a shared asm I dont also want to
    impersonate on the client.

    Also, if there is an better security solution to attack the above
    topography, please let me know.

    Thank you,

    Eric Wellnitz


  • Next message: Helge Jensen: "Installing CA-certificate in certificate-store from .NET"

    Relevant Pages

    • Re: a web service to log in to a image application server
      ... I don't know how it would be handled client side using PHP. ... You could also reuse a known authentication scheme. ... The image server is used to stored image documents requiring ... If I develop a web service to authenticate log in to ...
      (microsoft.public.dotnet.framework.aspnet.webservices)
    • RE: Login to the WebService
      ... \par Hi Mike, ... As for forms authentication, I'd like to confirm the following things: ... \par have problem to use login to the web service. ... \par service that provides datas and files to the WinForm Client. ...
      (microsoft.public.dotnet.framework.webservices)
    • WSE 2.0 error: Requested registry access is not allowed
      ... authentication. ... either for web service and client. ...
      (microsoft.public.dotnet.framework.webservices.enhancements)
    • Login to the WebService
      ... Im thinking about the web service that provides datas and files to the WinForm Client. ... with the Forms authentication and working on AspSqlMembershipProvider and with Role provider implemented too. ... public string GetCurrentUser() ...
      (microsoft.public.dotnet.framework.webservices)
    • Re: Windows Authentication, Single sign on and Active Directory
      ... service proxy client fails to connect due to authentication failure and then ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... The server is always in the domain. ...
      (microsoft.public.dotnet.framework.aspnet.security)