summary


index.cgi : displays which groups your are part of. It has links to other parts of the system.

admin.cgi : has two main parts:


addgroup.cgi : is a file which lets user RIPE add a new TT box to the list. Has two main parts:



showloc.cgi : is a file that just displays current groups and locations of the box

If you are part of a ttxx group then you're just a user. If you're part of a ttxx_admin group then you have admin right for that group.

How does it work?

First, there's the root directory with the above scripts, and a .htaccess file which looks like:
AuthType Basic
AuthDBUserFile /var/www/conf/tt/dbmpasswd
AuthDBGroupFile /var/www/conf/tt/dbmgroup
AuthName "Test Traffic"
Require valid-user
AddHandler cgi-script cgi
DirectoryIndex index.cgi index.html
Options ExecCGI

Then there is a directory called ttaccess which has three files: dbmpasswd, dbmgroup, dbmname and dbmloc.



There is one apache directive in httpd.conf allowing use of .htaccess files in the /tt tree.

<Directory "name of directory in httpd.conf that ops set up">
AllowOverride All
</Directory>

Then there are subdirectories of /tt root, called ttxx. Each ttxx directory has a .htaccess file that looks like:
AuthType Basic
AuthDBUserFile /var/www/conf/tt/dbmpasswd
AuthDBGroupFile /var/www/conf/tt/dbmgroup
AuthName "Test Traffic"
Require group tt01
The only thing that varies is the "Require group" line.
In each ttxx there's at the moment index.html. If you are not a part of that group then you won't be able to view it. Try changing the url to a different ttxx directory and see what happens. At the moment there are three ttxx directories: tt01, tt06 and tt33.

If you want to make use of this mechanism for other scripts, all that's needed is the remote user variable from the standard apache environment.

TODO

1,. perhaps merge showloc.cgi and index.cgi so that all the names are shown on the first page.. keep in mind that showloc.cgi lists every group that user RIPE is in. If we were to modify index.cgi to show locations, it should only show the group that that user is in and then just have that link to showloc.cgi which shows them all.

2. make use of SSI so that it looks like the rest of RIPE NCC pages.

3. make it all look nicer.