[Catalyst] Viewing username in Apache access_log (via FastCGI)

J. Shirley jshirley at gmail.com
Tue Apr 29 23:13:47 BST 2008


On Tue, Apr 29, 2008 at 2:26 PM, Kutbuddin Doctor <ksdoctor at burnham.org> wrote:
> The Catalyst::Plugin::Authentication::Store::HTTP modules you pointed to
> seem to be
>  for using Catalyst as a controller to access remote (not my own) web sites
> that
>  use HTTP  authentication (basic, Digest, NTLM).
>
>  In my case I am using
>
>  Authenticaiton::Store::DBIC
>
>  so, the question is: How do I tell Apache who my authenticated user is. I
> only wish
>  to have this to be a part of the normal Apache access_log (my own).
>
>  Thanks for that pointer, but I am still looking for a solution.
>
>

You're confusing the difference between Credentials and Stores.  Also,
you seem to be using the outdated Catalyst::Plugin::Authentication
(but I don't know if Credential::HTTP has been ported, jayk?) -- this
may give you some problems if you do any straight "cpan> install
Catalyst::Plugin::Authentication" upgrades elsewhere (but hopefully
not).

A store is where the users exist, and where the password is stored (in
most cases, but not always).  The credential is how they are
authenticated (password, openID).  In the case of HTTP Authentication,
which is what you are after, you want something like:
http://search.cpan.org/~jrobinson/Catalyst-Plugin-Authentication-Credential-HTTP-0.09/lib/Catalyst/Plugin/Authentication/Credential/HTTP.pm

That will give you the typical browser popup window to get the user to
enter their username and password, and that is the only way that you
can have the logging format you are after.  You could just have a
separate application log, though (Catalyst::Log::Log4perl is my
favorite) rather than reworking your credential system.

-J



More information about the Catalyst mailing list