Need help with Basic/Digest Authentication in CP 2.2.1

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Need help with Basic/Digest Authentication in CP 2.2.1

Venkat Bommakanti

Hi folks,

I'm trying to implement Basic/Digest auth in a TG 1.0b1
(that includes CP 2.2.1) app...

I picked up the httpauth.py & httpauthfilter.py files from
http://www.cherrypy.org/wiki/rfc2617 and copied them to
the python/site-packages folder.

After enabling the unit-test in httpauthfilter.py, and running
the stand-alone test (ie outside of TG) I notice the following:
  1. both the unit tests pass (with an OK)
  2. I can access:
          http://localhost:8080
      just fine. It replies with the response:
          "hey how you doing?"
      as expected. So far so good...
  3. When I access:
          http://localhost:8080/admin
      or
          http://localhost:8080/admin/son
      I'm prompted with the popup login box as expected.
      When I enter "test"/"test" (id/pwd), the login is successful.
      However, I don't see the corresponding responses returned :-(
      The behaviour is the same in either Firefox 2 or Mozilla 1.7.12.
      When I use LiveHTTPHeaders plugin in Firefox, I see the
      following header info:
          HTTP/1.x 200 OK
          Date: Fri, 15 Dec 2006 01:10:19 GMT
          Server: CherryPy/2.2.1
          Content-Length: 0
          Content-Type: text/html
          Connection: close
      Note the content-length of 0... No resp is being returned.
   4. I then added print statements before each (response) method
      return (httpauthfilter.py) and set server_log_to_screen = True.
      The only print that is displayed is one that corresponds to
           http://localhost:8080/
      Nothing else.

Any clue what I may be doing wrong here...
What else could I do to debug this.

Thanks much,
/venkat


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Need help with Basic/Digest Authentication in CP 2.2.1

Sylvain Hellegouarch

Hello,

I think this filter needs some attention. I've been contacted this very
week with a very nice patch to this filter and I will work on it this
week end.

I'll then update the code as well. We'll see if this fixes your problem.

- Sylvain

venkatbo wrote:

> Hi folks,
>
> I'm trying to implement Basic/Digest auth in a TG 1.0b1
> (that includes CP 2.2.1) app...
>
> I picked up the httpauth.py & httpauthfilter.py files from
> http://www.cherrypy.org/wiki/rfc2617 and copied them to
> the python/site-packages folder.
>
> After enabling the unit-test in httpauthfilter.py, and running
> the stand-alone test (ie outside of TG) I notice the following:
>   1. both the unit tests pass (with an OK)
>   2. I can access:
>           http://localhost:8080
>       just fine. It replies with the response:
>           "hey how you doing?"
>       as expected. So far so good...
>   3. When I access:
>           http://localhost:8080/admin
>       or
>           http://localhost:8080/admin/son
>       I'm prompted with the popup login box as expected.
>       When I enter "test"/"test" (id/pwd), the login is successful.
>       However, I don't see the corresponding responses returned :-(
>       The behaviour is the same in either Firefox 2 or Mozilla 1.7.12.
>       When I use LiveHTTPHeaders plugin in Firefox, I see the
>       following header info:
>           HTTP/1.x 200 OK
>           Date: Fri, 15 Dec 2006 01:10:19 GMT
>           Server: CherryPy/2.2.1
>           Content-Length: 0
>           Content-Type: text/html
>           Connection: close
>       Note the content-length of 0... No resp is being returned.
>    4. I then added print statements before each (response) method
>       return (httpauthfilter.py) and set server_log_to_screen = True.
>       The only print that is displayed is one that corresponds to
>            http://localhost:8080/
>       Nothing else.
>
> Any clue what I may be doing wrong here...
> What else could I do to debug this.
>
> Thanks much,
> /venkat
>
>
>

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Need help with Basic/Digest Authentication in CP 2.2.1

Venkat Bommakanti


> I'll then update the code as well. We'll see if this fixes your problem.

Thanks Sylvain.

The newly updated modules specified at:

http://groups.google.com/group/cherrypy-users/browse_thread/thread/90f8d3ddcac781ea/#
are working as expected. I'm unable to reproduce the errors I saw
earlier. I have a lighty proxy in front of CP2.2.1 (TG) serving static
content, and everything works great.

Thanks again,
/venkat


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Need help with Basic/Digest Authentication in CP 2.2.1

Sylvain Hellegouarch

venkatbo wrote:

>
>> I'll then update the code as well. We'll see if this fixes your problem.
>
> Thanks Sylvain.
>
> The newly updated modules specified at:
>
> http://groups.google.com/group/cherrypy-users/browse_thread/thread/90f8d3ddcac781ea/#
> are working as expected. I'm unable to reproduce the errors I saw
> earlier. I have a lighty proxy in front of CP2.2.1 (TG) serving static
> content, and everything works great.
>

Good news then :)
- Sylvain

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---