User Guide

94 Chapter 5 Configuring Advanced Security
and point at the SmSampleUsers.mdb file installed in the cfusion\database
directory.
2 Use the ColdFusion Administrator Advanced Security page to add a User
Directory. Select the ODBC namespace and enter SmSampleUsers in the location
form field. See Defining User Directories on page 92 for more information.
3 Associate a user or group with a policy in your security context. Example
username/passwords are
admin/secret and vlander/firewall. You can browse
the username/passwords in the Access database file.
The ODBC username/password requires the SmDsQuery.ini file, which is installed in
the
cfusion\bin directory. The file contains the SQL for the SmSampleUsers data
source:
[SmSampleUsers]
Query_Enumerate=select Name, ’User’ as Class from SmUser Union
select Name, ’Group’ as Class from SmGroup order by Class
Query_InitUser=select Name from SmUser where Name = ’%s’
Query_AuthenticateUser=select Name from SmUser where Name = ’%s’
and Password = ’%s’
Query_GetGroups=select SmGroup.Name from SmGroup, SmUser, SmUserGroup
where SmUser.Name = ’%s’ and SmUser.Id = SmUserGroup.UserId
and SmGroup.Id = SmUserGroup.GroupId
Query_GetUserProp=select %s from SmUser where Name = ’%s’
Query_SetUserProp=update SmUser set %s = %s where Name = ’%s
Query_GetObjInfo=select Name, ’User’ from SmUser where Name = ’%s’
Union select Name, ’Group’ from SmGroup where Name = ’%s’
Query_GetUserProps=Name, Id, FirstName, LastName,
TelephoneNumber, EmailAddress
Query_IsGroupMember=select Id from SmUserGroup
where UserId = (select Id from SmUser where Name = ’%s’)
and GroupId = (select Id from SmGroup where Name = ’%s’)
Each ODBC data source you use for authenticating users requires a section of the
same name in this INI file. The section must contain the appropriate SQL statements
to authenticate users. You can use the SmSampleUsers section as an example.