Sun Java System Web Server 7.0 Administrator's Configuration File Reference

basic-auth

The basic-auth function verifies the authorization information sent by the client. The Authorization header is sent as part of the basic server authorization scheme. This function is usually used with the PathCheck-class function require-auth.

Parameters

The following table describes parameters for the basic-auth function.

Table 7–1 basic-auth Parameters

Parameter 

Description 

auth-type

Specifies the type of authorization to be used. The values can be basic, digest, or ssl. The default value is basic.

userdb

(Optional) Specifies the full path and file name of the database to be used for user verification. This parameter will be passed to the user function. 

userfn

Name of the user custom function to verify authorization. This function must have been previously loaded with load-modules. It has the same interface as all of the SAFs, but it is called with the user name (user), password (pw), user database (userdb), and group database (groupdb), if supplied, in the pb parameter.

This function checks the name and password using the database and returns REQ_NOACTION if they are not valid. It returns REQ_PROCEED if the name and password are valid. The basic-auth function will then add auth-type, auth-user (user), auth-db (userdb), and auth-password (pw, Windows only) to the rq->vars pblock. For more information on custom functions, see Chapter 1, Creating Custom Server Application Functions, in Sun Java System Web Server 7.0 Update 1 NSAPI Developer’s Guide.

groupdb

(Optional) Specifies the full path and file name of the user database. This parameter will be passed to the group function. 

groupfn

(Optional) Name of the group custom function that must have been previously loaded with load-modules. It has the same interface as all of the SAFs, but it is called with the user name (user), password (pw), user database (userdb), and group database (groupdb) in the pb parameter.

This parameter also has access to the auth-type, auth-user (user), auth-db (userdb), and auth-password (pw, Windows only) parameters in the rq->vars pblock. The group function determines the group to which the user belongs using the group database, add it to rq->vars as auth-group, and return REQ_PROCEED if found. It returns REQ_NOACTION if the user’s group is not found.

bucket

(Optional) Common to all obj.conf functions. Adds a bucket to monitor performance. For more information, see The bucket Parameter.

Example

In magnus.conf:

Init fn="load-modules" shlib="/path/to/mycustomauth.so" funcs="hardcoded_auth"

In obj.conf:

AuthTrans fn="basic-auth" auth-type="basic" userfn="hardcoded_auth"
PathCheck fn="require-auth" auth-type="basic" realm="Marketing Plans"

See Also

require-auth