Sun Java System Web Server 6.1 SP9 Administrator's Guide

Creating an ACL for a Directory Service Based on .htaccess Authentication

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:

ProcedureTo create an ACL for a directory service based on htaccess authentication

  1. Access the Server Manager and select the server instance you wish to create or edit ACLs for.

  2. Choose the Preferences tab from the Server Manager.

  3. Click the Restrict Access link.

  4. Under the Option column, choose the ACL file from the drop-down list and click Edit ACL.

  5. In the Access Control Rules page in the top frame, click the Users/Groups link for the ACL you want to edit.

  6. In the User/Group page in the bottom frame, from the Authentication database drop-down list, select htaccess.

  7. 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";

Migrating Existing .htaccess information to the File Authentication Database

To migrate your existing .htaccess information to the file authentication database in the Sun Java System Web Server 6.1:

The user file format is as follows:


The group file format is as follows:

#group1:user1 user2
#group2:user3 user4

Note –

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:


Note –

Columns are separated by colons.