Ticket #430 (assigned enhancement)

Opened 3 years ago

Last modified 7 months ago

mod_auth doesn't support virtual hosts

Reported by: anonymous Assigned to: anonymous (accepted)
Priority: normal Milestone: 1.4.20
Component: mod_auth Version: 1.4.
Severity: normal Keywords: mod_auth
Cc: Blocking:
Need Feedback:

Description

I have a lighttpd installation supporting multiple hosts. I need to require authorization on the root of one of these hosts, but not the others. The mod_auth plugin, however, does not allow you to specify which host the auth requirement should apply to.

I have written a patch that allows you to specify an "authority"=>"myhost.org" name-value-pair in the auth.require array. if no "authority" is specified, the behavior is the same as it was before the patch. if "authority" *is* specified, then the auth.require entry only applies to the named host. I have also added a flag "use_physical"=>"yes" that causes the auth.require key to refer to a file system path rather than a URI path. If "use_physical" is enabled, then the physical location of the page requested is calculated (following symlinks and all) and compared to the key for the auth.require section to determine if the auth requirement applies to the incoming request.

I can't find any way to submit patches on this site, so let me know if you are interested in receiving the patch. I'll check back on this ticket for any replies.

Attachments

auth.patch (5.3 kB) - added by anonymous on 12/31/2005 06:11:58 PM.
auth-fixed.patch (7.0 kB) - added by anonymous on 01/04/2006 11:41:47 PM.
Fixed version of the first patch

Change History

12/31/2005 06:11:58 PM changed by anonymous

  • attachment auth.patch added.

01/04/2006 11:41:47 PM changed by anonymous

  • attachment auth-fixed.patch added.

Fixed version of the first patch

01/04/2006 11:42:37 PM changed by Ryan Owen

Fixed an error in the first patch

01/05/2006 12:00:52 AM changed by jan@kneschke.de

  • owner changed from jan to anonymous.
  • status changed from new to assigned.

Why not use conditionals ?

$HTTPhost? == "www.example.org" {

auth.require = ( ... )

}

The match against a physical path is reasonable.


Add/Change #430 (mod_auth doesn't support virtual hosts)




Change Properties