How to force reauthentication of a Web service client (Basic auth)

From: Alek Davis (alekDOTdavisATintelDOTcom)
Date: 10/24/03

  • Next message: Aung: "Need a FIX for Knowledge Base Article - 817854"
    Date: Fri, 24 Oct 2003 11:19:47 -0700
    
    

    Sorry for cross-posting, but I am not quite sure where this question belongs
    (maybe it should be addressed to some other group).

    I have a Web service (IIS/ASP.NET) configured to run under Basic
    authentication (anonymous access is disabled along with intergated Windows
    and digest authentication). I have another server application (RPC server/NT
    service) running on a different machine, which calls this Web service. The
    client applications, which call the RPC server, must provide user's
    credentials, which the RPC server will use for Basic authentication when
    calling the Web service.

    What I noticed is that after the first client provides valid credentials and
    the RPC server successfully calls the Web service, any other client making
    calls after that can provide invalid credentials (or no credentials at all),
    but the RPC server can still call the Web service. It looks like the first
    valid credentials are cached somewhere for a certain period of time, because
    after inactivity (not sure how long, but it looks like half an hour or so),
    the RPC server must reauthenticate (I also need to reauthenticate after
    restarting the RPC server or starting another instance). This is a potential
    security problem, so I would like to force reauthentication on every call to
    prevent different clients from "piggybacking" on the credentials of the
    first successful client, but I cannot figure out what I need to do. All of
    the RPC calls are stateless, which means that any Web service proxy objects
    go out of scope after the calls are complete. Even though my original
    application involves a mix of C/C# code (using COM Interop), I can duplicate
    the same behavior from a simple Windows Forms (C#) application calling a Web
    service. Could someone explain why the consecutive calls use the cached
    (whatever this means) Basic credentials? Is there a way to disable caching
    of credentials between the Web service method calls? The closest info, which
    looks more-or-less relevant, I was able to find, addresses a similar problem
    of the Web Browser control (http://support.microsoft.com/?id=195192), but it
    does not seem to help me solve the problem. Any hints? Is it possible to
    clear "cached" credentials when making SOAP calls from a
    SoapHttpClientProtocol-derived class?

    Thanks,

    Alek


  • Next message: Aung: "Need a FIX for Knowledge Base Article - 817854"

    Relevant Pages

    • Re: Accessing files & folders on client/other machine
      ... I am setting the credentials before calling the web method. ... The problem is that Web Service needs to accesss a file on client machine. ...
      (microsoft.public.dotnet.framework.webservices)
    • Re: Passing Credentials to a Web Service
      ... need to use it with SSL to prevent exposure of credentials). ... This web service is hosted in the ... is the client can be a part of the Corporate Intranet or the client can be ...
      (microsoft.public.dotnet.framework.aspnet.webservices)
    • Re: SQLXML Newbie Question...
      ... security and just send the credentials of the client to the web service. ... "Mark A. Donohoe" wrote in message ...
      (microsoft.public.sqlserver.xml)
    • Re: Anonymous and integrated authentication for Web service
      ... I tried changing values in the UseDefaultCredentials and Credentials ... You need to write the client appropriately. ... Given this are you saying they both can call the same web service? ... Integrated Windows authentication ...
      (microsoft.public.inetserver.iis.security)
    • Re: Error calling web service
      ... It looks as if the web service requires credentials to authenticate ... the incoming request. ... From a client application you can pass ...
      (microsoft.public.dotnet.framework.aspnet.webservices)