Sample routine for generating a – Cisco 3.3 User Manual

Page 546

Advertising
background image

Chapter 13 User Databases

ODBC Database

13-62

User Guide for Cisco Secure ACS for Windows Server

78-16592-01

will default to case sensitive, whereas Microsoft SQL Server defaults to case
insensitive. However, in the case of CHAP/ARAP, the password is case sensitive
if the CHAP stored procedure is configured.

For example, with Telnet or PAP authentication, the passwords cisco or CISCO
or CiScO will all work if the SQL Server is configured to be case insensitive.

For CHAP/ARAP, the passwords cisco or CISCO or CiScO are not the same,
regardless of whether or not the SQL Server is configured for case-sensitive
passwords.

Sample Routine for Generating a PAP Authentication SQL
Procedure

The following example routine creates a procedure named CSNTAuthUserPap in
Microsoft SQL Server, the default procedure used by Cisco Secure ACS for PAP
authentication. Table and column names that could vary for your database schema
are presented in variable text. For your convenience, the Cisco Secure ACS
product CD includes a stub routine for creating a procedure in either SQL Server
or Oracle. For more information about data type definitions, procedure
parameters, and procedure results, see

ODBC Database, page 13-55

.

if exists (select * from sysobjects where id = object_id (`dbo.CSNTAuthUserPap’) and

sysstat & 0xf = 4)

drop procedure dbo.CSNTAuthUserPap

GO

CREATE PROCEDURE CSNTAuthUserPap

@username varchar(64), @pass varchar(255)

AS

SET NOCOUNT ON

IF EXISTS( SELECT

username

FROM

users

WHERE

username

= @username

AND

csntpassword

= @pass )

SELECT 0,

csntgroup

,

csntacctinfo

,"No Error"

FROM

users

WHERE

username

= @username

ELSE

SELECT 3,0,"odbc","ODBC Authen Error"

GO

Advertising