httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Issac Goldstand <mar...@beamartyr.net>
Subject Re: Visiting mod_authn_cache
Date Mon, 02 Nov 2009 09:15:16 GMT
Issac Goldstand wrote:
> Paul (or anyone else interested),
>   Any interested in visiting mod_authn_cache over the hackathon?  I
> won't be there physically but have been working on the template that was started at the
mod-auth project @ sourceforge. 

[snip]

I've actually gotten everything working except for the timeout thing. 
I'm probably missing something obvious in C, but this is what I'm doing...

I've got a timeout period set as a apr_short_interval_time_t, a
timestamp on each cache entry set as an apr_time_t, and I populate the
latter with apr_time_now() when I add the cache entry and compare if
(cache timestamp + the timeout < apr_time_now()) then use the cached
credentials, otherwise delete the old cache entry.

The odd thing is that I *never* get the else to run.  Ever. 

I've attached the codebase as I've modified it so far (no commit access
to mod-auth @ SF), and a sample config that I'm using is:

LogLevel debug

  AuthType Basic
  AuthName "Test"
  AuthBasicProvider file cache
  AuthnCacheTimeout 1
  AuthnCacheProvider pam
  AuthUserFile /root/test.htpasswd
  require valid-user

This results in log entries like the following:

[Mon Nov 02 08:34:29 2009] [debug] mod_authn_cache.c(184): [client
10.1.1.92] No entry for user issacg
[Mon Nov 02 08:34:29 2009] [info] [client 10.1.1.92] Creating new cache
entry for user issacg 0
[Mon Nov 02 08:34:29 2009] [debug] mod_authn_cache.c(162): [client
10.1.1.92] Found entry for user issacg
[Mon Nov 02 08:34:29 2009] [info] [client 10.1.1.92] Entry for user
issacg matches cached password. Authenticating.
[Mon Nov 02 08:34:29 2009] [debug] mod_authn_cache.c(162): [client
10.1.1.92] Found entry for user issacg

If I wait a few seconds and try again, the same repeats (it says "No
entry for..." and never shows the "Entry for user timed out"

Any ideas?

  Issac

Mime
View raw message