Tracing module list and calls

2009-06-16 Thread Markus Moeller
Hi,

   I am writing two authorizations modules for Apache 2 and have a problem
that the second module seems never be called (e.g. authz_2). How can I trace
the module stack and how can I debug the decision of apche to run or not to
run the module. None of the two modules is authoritative (not sure about any
module in-between).

I register the modules as follows:

static void
map_register_hooks(apr_pool_t *p)
{
   ap_hook_auth_checker(authz_1,NULL,NULL,APR_HOOK_FIRST);
}

module AP_MODULE_DECLARE_DATA authz_1_module =
{
   STANDARD20_MODULE_STUFF,
   authz_1_create_dir_config,/* dir config creater */
   NULL,/* dir merger --- default is to override
*/
   NULL,/* server config */
   NULL,/* merge server config */
   authz_1_cmds,/* command apr_table_t */
   authz_1_register_hooks   /* register hooks */
};


static void
map_register_hooks(apr_pool_t *p)
{
   ap_hook_auth_checker(authz_2,NULL,NULL,APR_HOOK_LAST);
}

module AP_MODULE_DECLARE_DATA authz_2_module =
{
   STANDARD20_MODULE_STUFF,
   authz_2_create_dir_config,/* dir config creater */
   NULL,/* dir merger --- default is to override
*/
   NULL,/* server config */
   NULL,/* merge server config */
   authz_2_cmds,/* command apr_table_t */
   authz_2_register_hooks   /* register hooks */
};



Thank you
Markus


Module order for authentication/authorization

2009-04-13 Thread Markus Moeller

How can I make sure that an authentication/authorisation module is always the 
the last ?  I was thinking of the following case order (e.g. mapping is always 
after authentication, but before authorisation):

Kerberos authentication - gives u...@realm
ldap authentication   -  gives user
basic authentication -  gives user
mapping authenticated users (e.g. u...@realm to user)   

authorisation based on user or group.


Thank you
Markus