|
|
The Cisco Subscriber Registration Center (CSRC) Schema extensions allow you to extend CSRC without extensive programming.
You might extend the schema to do the following:
All of these cases share the same requirement, which is that there is only one authoritative source for data items relating to CSRC data.
This chapter explains how to create extensions to extend CSRC. For a complete description of the CSRC schema, see "CSRC Schema."
Schema extensions provide a way for you to tell CSRC about additional attribute items that are not already defined and to change the authoritative source for any data item. To do this, you must manipulate a data file, which describes new attributes associated with existing CSRC storage objects.
To extend the schema in the Netscape Directory Service (NDS) server, do the following:
1. Backup the NDS database and save the file. Use the database backup or ldap export. Note that using ldap export is preferred. For more information about using these commands see the NDS documentation.
2. Define the new data in the extended schema data file.
4. If you want to install the changes, answer yes when the csrc_schema_add.pl program asks the question, "Do you want to install files to a permanent directory?"
5. Check the csrc_schema_add.pl program's error messages to verify that the CSRC object layer could successfully install, and integrate the changes into the CSRC and NDS environments.
6. Perform the following steps when the program asks you to stop the Directory Service:
(a) Make sure that no one is running CSRC.
(b) Edit the CSRC Configuration File (csrc.cfg) and add the following line to the end of the file:
DataStore.ExtSchema-FileName = csrc_conf_dir/csrc_schema_ext.dat where csrc_conf_dir is the path to the CSRC Configuration directory.
(c) Stop the NDS.
(d) Stop the CSRC application.
(e) Restart NDS and CSRC.
You can also use the schema extensions with CSRC Customer Callout Modules (CCMs). The CSRC CCMs allow you to define extensions to the routines that retrieve data from persistent storage, as well as from routines that place attributes where they can be retrieved on demand.
The combined funtionality allows you to add new attributes, and to control the loading and storing of those attributes in the running CSRC application. For more information about CCMs, see "CSRC Callouts."
When you create a schema extension, CSRC does the following:
To accomplish these tasks, the CSRC object layer reads the data file created by the csrc_schema_add.pl program, and appends the extended attributes to its built-in object/attribute tables.
The csrc_schema_add.pl program is a Perl script that uses the following syntax:
(perl /opt/csrc/conf/csrc_schema_add.pl <Input_File> <NDS
Config_Directory> <csrc Config_Directory)
The program does the following:
The csrc_schema_add.pl program validates your changes to reduce the likelihood of failure in NDS. The validation confirms the uniqueness of both the new attributes across the CSRC schema and the standard entries in the LDAP RFC schema.
The format of the data file follows these rules:
The csrc_schema_add.pl program takes three arguments: Input File, NDS config directory, and CSRC config directory.
For example:
perl csrc_schema_add.pl schema.txt /users/admin/netscape/server4/slapd_unixws/config /opt/csrc/conf
Example 6-1 shows a sample object entry in the input file:
#Fields: 1-Application Schema Class, 2- Application Schema Attribute, # 3- Storage Schema Attribute 4- Storage Schema Attribute Type, 5- Unique Key, # 6- Required Attribute 7- Multi-valued 8- Attribute Source # #Account AccountNumber csrcaccountnumber STRING YES YES NO csrc #Account PIN csrcpin STRING NO YES NO csrc #Account LastName csrclastname STRING NO YES NO csrc #Account FirstName csrcfirstname STRING NO YES NO csrc #Account Dataset csrcdataset STRING NO NO NO csrc #Account Version csrcversion STRING NO NO NO csrc #Account MI csrcmi STRING NO NO NO csrc #Account Salutation csrcsalutation STRING NO NO NO csrc #Account Telephone csrctelephone STRING NO NO NO csrc #Account Address csrcaddress STRING NO NO csrc #Account City csrccity STRING NO NO NO csrc #Account State csrcstate STRING NO NO NO csrc #Account ZipCode csrczipcode STRING NO NO NO csrc #Subscriber Username csrcusername STRING YES YES NO csrc #Subscriber AccountNumber csrcaccountnumber STRING YES YES NO csrc #Subscriber IsDisabled csrcisdisabled BOOLEAN NO YES NO csrc #Subscriber Password csrcpassword STRING NO YES NO csrc #Subscriber Dataset csrcdataset STRING NO NO NO csrc #Subscriber Version csrcversion STRING NO NO NO csrc #Subscriber ModemList csrcmodemlist OBJID NO NO YES csrc #Subscriber DisabledReason csrcdisabledreason STRING NO NO NO csrc #Modem MACAddress csrcmacaddress MAC YES YES NO csrc #Modem AccountNumber csrcaccountnumber STRING NO YES NO csrc #Modem Dataset csrcdataset STRING NO NO NO csrc #Modem Version csrcversion STRING NO NO NO csrc #Modem Description csrcdescription STRING NO NO NO csrc #Modem ComputerList csrccomputerlist OBJID NO NO YES csrc #Modem ServiceList csrcservicelist OBJID NO NO YES csrc #Modem ServiceRuleList csrcservicerulelist OBJID NO NO YES csrc #Modem ClientClass csrcclientclass STRING NO NO NO csrc #Modem HostName csrchostname STRING NO NO NO csrc #Modem DomainName csrcdomainname STRING NO NO NO csrc #Modem PolicyName csrcpolicyname STRING NO NO NO csrc #Modem Action csrcaction STRING NO NO NO csrc #Modem AuthenticateUntil csrcauthenticateuntil STRING NO NO NO csrc #Modem UnauthenticatedClientClassName csrcunauthenticatedclientclassname STRING NO NO NO #csrc #Modem UserDefined csrcuserdefined STRING NO NO NO csrc #Modem EnvironmentDictionary csrcenvironmentdictionary STRING NO NO NO csrc #Modem SelectionCriteria csrcselectioncriteria STRING NO NO NO csrc #Modem SelectionCriteriaExcluded csrcselectioncriteriaexcluded STRING NO NO NO csrc #Modem LeaseVersion csrcleaseversion STRING NO NO NO csrc #Modem EmbeddedPolicy csrcembeddedpolicy STRING NO NO NO csrc #Modem PreviousServiceList csrcpreviousservicelist OBJID NO NO csrc #Modem ReadCommunityString csrcreadcommunitystring STRING NO NO NO csrc #Modem WriteCommunityString csrcwritecommunitystring STRING NO NO NO csrc #Computer AccountNumber csrcaccountnumber STRING NO YES NO csrc #Computer MACAddress csrcmacaddress MAC YES YES NO csrc #Computer Dataset csrcdataset STRING NO NO NO csrc #Computer Version csrcversion STRING NO NO NO csrc #Computer Description csrcdescription STRING NO NO NO csrc #Computer ClientClass csrcclientclass STRING NO NO NO csrc #Computer HostName csrchostname STRING NO NO NO csrc #Computer DomainName csrcdomainname STRING NO NO NO csrc #Computer PolicyName csrcpolicyname STRING NO NO NO csrc #Computer Action csrcaction STRING NO NO NO csrc #Computer AuthenticateUntil csrcauthenticateuntil STRING NO NO NO csrc #Computer UnauthenticatedClientClassName csrcunauthenticatedclientclassname STRING NO NO #NO csrc #Computer UserDefined csrcuserdefined STRING NO NO NO csrc #Computer EnvironmentDictionary csrcenvironmentdictionary STRING NO NO NO csrc #Computer SelectionCriteria csrcselectioncriteria STRING NO NO NO csrc #Computer SelectionCriteriaExcluded csrcselectioncriteriaexcluded STRING NO NO NO csrc #Computer LeaseVersion csrcleaseversion STRING NO NO NO csrc #Computer EmbeddedPolicy csrcembeddedpolicy STRING NO NO NO csrc # New Entries Here Subscriber Preferred1 desc1 STRING NO NO NO csrc Subscriber Preferred2 desc2 STRING NO NO YES mcd
Enter Yes in the Unique Key field if you want CSRC to ensure that only one instance of the indicated object (Subscriber above) contains an attribute with the given value. Do this for fields in which duplicates would cause serious consistency errors in the application.
CSRC uses the Attribute Source field to tell the CSRC object layer where the attribute permanently resides.
On a successful validation the script produces these files:
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Tue Sep 26 04:44:09 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.