You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Torsten Krah <kr...@gmail.com> on 2018/01/24 14:07:52 UTC

[users@httpd] How to determine if some hook functions are registered for e.g the "Check User ID" phase

Is there some way to determine in a c-module which registered a authn
hook for authorization, if any other hook is configured in the "Check
User ID" phase of request processing?

Looking at:

https://httpd.apache.org/docs/2.4/de/mod/mod_lua.html#writinghooks

i can register a hook to negotiated the user ID (in any arbitrary way
and set r.user = 'foo').

How can any other module in the auth stack chain determine if there is
some auth hook registered for e.g. the "Check User ID" phase, if it
want's to know that detail?

kind regards

Torsten

PS: Little bit of background for that question - at the moment its e.g.
done in the svn authz module on the r->ap_auth_type but this does not
need to be set to be able to register a lua hook and run it in the
"Check User ID" phase.
So if that module wants to know if any auth is configured - what would
be the best way to get this info? Or is it a bad idea at all to look for
this information and do different things based on that info?


Re: [users@httpd] How to determine if some hook functions are registered for e.g the "Check User ID" phase

Posted by Eric Covener <co...@gmail.com>.
On Wed, Jan 24, 2018 at 10:41 AM, Eric Covener <co...@gmail.com> wrote:
> On Wed, Jan 24, 2018 at 9:07 AM, Torsten Krah <kr...@gmail.com> wrote:
>> Is there some way to determine in a c-module which registered a authn
>> hook for authorization, if any other hook is configured in the "Check
>> User ID" phase of request processing?
>>
>> Looking at:
>>
>> https://httpd.apache.org/docs/2.4/de/mod/mod_lua.html#writinghooks
>>
>> i can register a hook to negotiated the user ID (in any arbitrary way
>> and set r.user = 'foo').
>>
>> How can any other module in the auth stack chain determine if there is
>> some auth hook registered for e.g. the "Check User ID" phase, if it
>> want's to know that detail?
>>
>
> You might find some good hints in mod_info.c since it is able to
> display the ordered participants in each hook.

It does seem like a risky  idea to do it for anything but problem
determination, though.


-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to determine if some hook functions are registered for e.g the "Check User ID" phase

Posted by Eric Covener <co...@gmail.com>.
On Wed, Jan 24, 2018 at 9:07 AM, Torsten Krah <kr...@gmail.com> wrote:
> Is there some way to determine in a c-module which registered a authn
> hook for authorization, if any other hook is configured in the "Check
> User ID" phase of request processing?
>
> Looking at:
>
> https://httpd.apache.org/docs/2.4/de/mod/mod_lua.html#writinghooks
>
> i can register a hook to negotiated the user ID (in any arbitrary way
> and set r.user = 'foo').
>
> How can any other module in the auth stack chain determine if there is
> some auth hook registered for e.g. the "Check User ID" phase, if it
> want's to know that detail?
>

You might find some good hints in mod_info.c since it is able to
display the ordered participants in each hook.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org