forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "E.L." <>
Subject Re: htaccess
Date Tue, 06 Apr 2004 23:31:15 GMT

> Dave has shown you the way to copy pre-prepared files over.
> FOR-109 is an idea about automatically generating them, which would
> be a grand feature enhancement. Bear in mind that that capability
> would need to be optional, because not everyone uses such
> Apache-HTTPd-like methods as their web server.
> If you have any ideas in that department then we would be glad to hear.

Here is my idea.  Ok - so keeping in mind that I'm a forrest newbee (and I'm talking from
pragmatic operational point of view (hopefully) - here are my 2 cents:

For this functionality (focusing purely on providing an access control mechanism that uses
web server):
In some overall properties file (?
- user needs to specify web server (right now - only apache will work), so something like:
- If it is apache (or any other server I suppose) - user would need to specify the file name
web serve recognizes as a directive file.  In apache (by default) - the file is .htaccess,
- it can be anything (changed via Apache's httpd.conf).  So the next overall property would
specify this: = .htaccess

I believe that the above should be explicitly stated in forrest, rather than assume a default.

Now as to the name of this property - it probably needs to be something more general (I don't
if IIS for example has a file that specifies directives, or separate files for directives,
opposed to access control - in Apache - its all in one file).  Alternatively, this can be
access control property only - i.e.: = .htaccess

Restricting access to a particular part of a site involves 2 things:  the password file (this
usually in user's home directory and not part of web directories served by the web server)
and the
.htacess file for a particular directory that needs to be restricted.


password file:

.htaccess file:
AuthType Basic
AuthName "Password Required"
AuthUserFile /home/foouser/passwords/password.file
AuthGroupFile /home/foouser/passwords/group.file
Require group admins
Require user jsmith

Personally - I don't use the group password file.  In any case - one thing to keep in mind
is that
absolute path needs to be supplied to AuthUserFile and AuthGroupFile (if that exists). 
Furthermore, different password files can be used for different directories.

So - a possible approach to specify the above:

In site.xml:
Have something similar to the external links type of structure that allows user to specify
different password files (it doesn't matter if its group or user).  Also - have the same thing
users and groups (for those that are used through many different .htaccess files.  So it would
something like:
    < href="">
       <admingroup secref="admins">
	??stating group name as being called admins
	<totalsitepasswdfile secref="globalpasswdfile">
	???stating absolute path including file name of a password file (can be group or user - doesn't
  </  <external-apache-security>

Then in content directory have something like security.xml where .htaccess information is
describe.  Apache directives could be used to create xml tags:
<authname>"Password Required"</authname>
<authuserfile> /home/foouser/passwords/password.file</authuserfile>
<authgroupfile> /home/foouser/passwords/group.file</authgroupfile>

For above - you could use those external references instead of direct names.

The above would generate an .htaccess file (same data as in .htacess file shown above)for
content directory its in.  The security.xml (validation wise) would require authtype, authname,
authuserfile, authgroupfile, and one <group> or <user> or both.  One more thing
is that if the
user doesn't want a groupfile - then they still need to have this field and put a /dev/null
(forcing a good security practice).

Things to note:  I don't think that the other Require directive are needed at this stage.

Is this at all helpful to build this feature?


PS:  Relevent info:

Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway

View raw message