List Info

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




Need help with Basic/Digest Authentication in CP 2.2.1
user name
2006-12-15 01:31:52
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.cherr
ypy.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/adm
in
      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 cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en

-~----------~----~----~----~------~----~------~--~---

Need help with Basic/Digest Authentication in CP 2.2.1
user name
2006-12-15 07:33:20
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.cherr
ypy.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/adm
in
>       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 cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en

-~----------~----~----~----~------~----~------~--~---

Need help with Basic/Digest Authentication in CP 2.2.1
user name
2006-12-17 03:16:18

> 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/gr
oup/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 cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en

-~----------~----~----~----~------~----~------~--~---

Need help with Basic/Digest Authentication in CP 2.2.1
user name
2006-12-17 08:58:16
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/gr
oup/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 cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en

-~----------~----~----~----~------~----~------~--~---

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )