The Sun Java System Web Server provides support for .htaccess-based flat file authentication. If you have been using .htaccess authentication, you can migrate your existing data files with no change to the file authentication database. As noted in Using .htaccess Files, .htaccess user and group data can be stored in a single file or split into two files (one with user data and other with group data). Both existing formats are supported by the file authentication database.
To create an ACL for a directory service based on htaccess authentication, perform the following steps:
Access the Server Manager and select the server instance you wish to create or edit ACLs for.
Choose the Preferences tab from the Server Manager.
Click the Restrict Access link.
Under the Option column, choose the ACL file from the drop-down list and click Edit ACL.
In the Access Control Rules page in the top frame, click the Users/Groups link for the ACL you want to edit.
In the User/Group page in the bottom frame, from the Authentication database drop-down list, select htaccess.
Click Update.
When you set an ACL against an htaccess-based file authentication database, the dbswitch.conf file is updated with an ACL entry such as the sample entry given below:
version 3.0; acl "default"; authenticate (user) { prompt = "Sun One Web Server 6.1"; database = "myhtaccessfile"; method = "basic"; }; deny (all) user = "anyone"; allow (all) user = "all"; |
To migrate your existing .htaccess information to the file authentication database in the Sun Java System Web Server 6.1:
Copy your .htaccess userfile database to server-root/server-instance/config/userfile.
Copy your htaccess groupfile database to server-root/server-instance/config/groupfile
The user file format is as follows:
#user:password
The group file format is as follows:
#group1:user1 user2 #group2:user3 user4
Member names are separated by spaces.
When userfile and groupfile have the same file name, they are combined. each line of the combination follows the syntax shown below:
#user:password:group1,group2
Columns are separated by colons.