Starting Adaptive Server under Kerberos  Configuring Adaptive Server for LDAP User Authenticaiton

Chapter 16: External Authentication

Configuring Kerberos

The configuration process is similar, regardless of which variety of Kerberos is used. To configure Kerberos:

  1. Set up Kerberos third-party software and create a Kerberos administrative user. To do this, you must:

    Note Execute the remainder of these steps on the Kerberos client machine.

  2. Add Kerberos principal for Adaptive Server ase120srv or ase120srv@MYREALM.

  3. Extract the keytab file for principal ase120srv@MYREALM and store it as a file:

    /krb5/v5srvtab
    

    The following UNIX examples use the command line tool kadmin, available with CyberSafe or MIT Kerberos.There are also GUI tools available to aid in administration of Kerberos and users:

    CyberSafe Kadmin:
    % kadmin aseadmin 
    Principal - aseadmin@MYREALM 
    Enter password: 
    Connected to csfA5v01 in realm ASE. 
    Command: add ase120srv 
    Enter password: 
    Re-enter password for verification: 
    Principal added. 
    Command: ext -n ase120srv 
    Service Key Table File Name (/krb5/v5srvtab): 
    Key extracted. 
    Command: quit 
    Disconnected. 
    

    In a production environment, you must control the access to the keytab file. If a user can read the keytab file, he or she can create a server that impersonates your server.

    Use chmod and chgrp so that /krb5/v5srvtab is:

    -rw-r----- 1 root sybase 45 Feb 27 15:42 /krb5/v5srvtab
    

    When using Active Directory as the KDC, log in to the Domain Controller to add users and Adaptive Server principals. Use the Active Directory Users and Computers wizard to guide you through the creation of users and principals.

    Extracting the keytab file for use with Adaptive Server requires an optional tool called ktpass, which is included in the Microsoft Support Tools package.

    With Active Directory, extracting the keytab with ktpass is done as a separate step from creating the principal. The keytab file on Windows for Adaptive Server is located with the CyberSafe program files. For example, c:\Program Files\CyberSafe\v5srvtab is the expected location of Adaptive Server’s keytab file when CyberSafe software is installed on the C: drive.

  4. Add a Kerberos principal for the user “sybuser1” as “sybuser1@MYREALM”.

  5. Start Adaptive Server and use isql to log in as “sa”. The following steps configure Adaptive Server parameters to use Kerberos security services, and create the user login account. These are the same on both Windows or UNIX machines:

  6. Shut down Adaptive Server and modify administrative files and connectivity configuration files.

  7. You can use environment variables to override default locations of keytab files, Kerberos configuration, and realm configuration files. This is Kerberos-specific behavior and may not work consistently on all platforms.

    For example, the CSFC5KTNAME environment variable can be used on CyberSafe UNIX platforms to specify the keytab file:

    % setenv CSFC5KTNAME /krb5/v5srvtab
    

    For MIT Kerberos, the equivalent environment variable is KRB5_KTNAME.

    See the vendor documentation for information about these environment variables.

    Your application may also need to modify the environment variable for dynamic library search paths. On UNIX, the most commonly used environment variable is LD_LIBRARY_PATH; on Windows, PATH is typically set to include DLL locations. You may need to modify these environment variables to enable applications to load the third-party objects correctly. For example this command adds the location of CyberSafe 32-bit libgss.so shared object to the search path in a C-Shell environment:

    % set path = ( /krb5/lib $path )
    
  8. Restart Adaptive Server. You should see the following log message during start-up:

    00:00000:00000:2001/07/25 11:43:09.91 server
    Successfully initialized the security mechanism
    'csfkrb5'. The SQL Server will support use of this
    security mechanism. 
    
  9. Use isql as UNIX user “sybuser1” (without the -U and -P arguments) to connect:

    % $SYBASE/$SYBASE_OCS/bin/isql -Sase120srv -V 
    1>	...
    

    You can also use the encryption option:

    $SYBASE/$SYBASE_OCS/bin/isql -Sase120srv –Vc
    




Copyright © 2005. Sybase Inc. All rights reserved. Configuring Adaptive Server for LDAP User Authenticaiton

View this book as PDF