Return to LAS FAQ
How can I request a password before allowing access to LAS?
Regrettably, LAS sites are sometimes required to limit access to the data they provide. Although we wish to encourage free access to data we recognize that password protection is sometimes necessary. This is most easily achieved by utilizing the authentication functionality already provided with your web server.If you are using the Apache server, a good introduction to authentication is available at:
We recommend adding the authentication directives in httpd.conf rather than using .htaccess files. This will cause your entry in the httpd.conf file to look something like this:
Alias /las_restricted /usr/local/httpd/htdocs/las_restricted/lasxml/ui/ ScriptAlias /las_restricted-bin/ /usr/local/httpd/htdocs/las_restricted/lasxml/server/ Alias /las_restricted-output/ /usr/local/httpd/htdocs/las_restricted/lasxml/server/output/ <Directory /usr/local/httpd/htdocs/las_restricted/lasxml/ui/> AddHandler cgi-script .pl Options +ExecCGI AuthName "LAS restricted data" AuthType Basic AuthUserFile /usr/local/web/users require user mclean </Directory>
If you only wish to limit access to certain data or only to data downloads you could try the following:
1) Set up two duplicate servers, one restricted and one not.
2) On the non-restricted server use <init_script>restricted</init_script> in the dataset configuration file to specify a specialized script for restricted datasets. This specialized script named restricted.jnl should contain the following lines:
message/error <script_error> message/error "The file you have attempted to access is restricted." message/error " " message/error "If you have the password you can access this data at" message/error " " message/error " URL_of_restricted_server" exit
This Ferret script will cause an error message to appear in the LAS output window without the usual debugging information.
3) If you only wish to restrict access to data downloads you should use <script_prefix>restricted_</script_prefix> and name your file restricted_std_list.jnl.
Jonathan Callahan: Jonathan.S.Callahan@noaa.gov
Last modified: November 30, 2001