06.05.2013 Views

User Guide for Cisco Secure Access Control Server - Stewing Home

User Guide for Cisco Secure Access Control Server - Stewing Home

User Guide for Cisco Secure Access Control Server - Stewing Home

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 12 <strong>User</strong> Databases<br />

OL-14386-02<br />

ODBC Database (ACS <strong>for</strong> Windows Only)<br />

Note For SQL database columns that hold user passwords, we recommend using varchar <strong>for</strong>mat.<br />

If you define password columns as char, password comparison might fail if the password<br />

does not use the full length of the field. For example, if a password column is 16 characters<br />

wide but the password is only ten characters long, the database might append six spaces. The<br />

value used <strong>for</strong> password comparison then grows to 16 characters, causing comparison to the<br />

actual password that the user submitted to fail.<br />

Microsoft SQL <strong>Server</strong> and Case-Sensitive Passwords<br />

If you want your passwords to be case sensitive and are using Microsoft SQL <strong>Server</strong> as your<br />

ODBC-compliant relational database, configure your SQL <strong>Server</strong> to accommodate this feature. If your<br />

users are authenticating by using PPP via PAP or Telnet login, the password might not be case sensitive,<br />

depending on how you set the case-sensitivity option on the SQL <strong>Server</strong>. For example, an Oracle<br />

database will default to case sensitive, whereas Microsoft SQL <strong>Server</strong> defaults to case insensitive.<br />

However, in the case of CHAP/ARAP, the password is case sensitive if you configured the CHAP stored<br />

procedure.<br />

For example, with Telnet or PAP authentication, the passwords cisco or CISCO or CiScO will all work<br />

if you configure the SQL <strong>Server</strong> to be case insensitive.<br />

For CHAP/ARAP, the passwords cisco or CISCO or CiScO are not the same, regardless of whether the<br />

SQL <strong>Server</strong> is configured <strong>for</strong> case-sensitive passwords.<br />

Sample Routine <strong>for</strong> Generating a PAP Authentication SQL Procedure<br />

The following example routine creates a procedure named CSNTAuth<strong>User</strong>Pap in Microsoft SQL<br />

<strong>Server</strong>, the default procedure that ACS uses <strong>for</strong> PAP authentication. Table and column names that could<br />

vary <strong>for</strong> your database schema appear in variable text. For your convenience, the ACS product CD<br />

includes a stub routine <strong>for</strong> creating a procedure in SQL <strong>Server</strong> or Oracle. For more in<strong>for</strong>mation about<br />

data type definitions, procedure parameters, and procedure results, see ODBC Database (ACS <strong>for</strong><br />

Windows Only), page 12-35.<br />

if exists (select * from sysobjects where id = object_id (`dbo.CSNTAuth<strong>User</strong>Pap’) and<br />

sysstat & 0xf = 4)drop procedure dbo.CSNTAuth<strong>User</strong>Pap<br />

GO<br />

CREATE PROCEDURE CSNTAuth<strong>User</strong>Pap<br />

@username varchar(64), @pass varchar(255)<br />

AS<br />

SET NOCOUNT ON<br />

IF EXISTS( SELECT username<br />

FROM users<br />

WHERE username = @username<br />

AND csntpassword = @pass )<br />

SELECT 0,csntgroup,csntacctinfo,"No Error"<br />

FROM users<br />

WHERE username = @username<br />

ELSE<br />

SELECT 3,0,"odbc","ODBC Authen Error"<br />

GO<br />

GRANT EXECUTE ON dbo.CSNTAuth<strong>User</strong>Pap TO ciscosecure<br />

GO<br />

<strong>User</strong> <strong>Guide</strong> <strong>for</strong> <strong>Cisco</strong> <strong>Secure</strong> <strong>Access</strong> <strong>Control</strong> <strong>Server</strong> 4.2<br />

12-39

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!