MSSQL Advanced Driver for Native Security
Novell Cool Solutions: Cool Tool
An enhanced version of the JDBC 1.6.2 driver for MSSQL.
|Posted:||18 Feb 2004|
Please read the note from our friends in legal before using this file.
This driver is based on the example coming with JDBC 1.6.2 driver for MSSQL, which uses some MSSQL side tables(EMP, EVENTLOG, etc). It takes care of users and roles, and memberships, and syncs the password on the Sub channel (eDir to MSSQL). It works with Nsure Identity Manager 2.0 aka DirXML 2.0. I did not test it yet against MSSQL 7 but it should work. I have tested it with the Microsoft third party JDBC driver.
It is required to obtain msbase.jar, mssqlserver.jar and msutil.jar from SQL Server 2000 Driver for JDBC Service Pack 2 http://www.microsoft.com/downloads/details.aspx?FamilyID=9f1874b6-f8e1-4bd6-947c-0fc5bf05bf71&DisplayLang=en. The files are extracted on the computer where Setup.exe is executed.
The example included with the driver comes with some limited capabilities regarding the integration of MSSQL security: The Subscriber Channel encapsulates JDBC statements in XSL in order to CREATE/DROP logins and GRANT privileges. However, the example does not integrates ROLES and ROLES memberships. This advanced connector has been designed in order to handle USERS, ROLES, and memberships (USERS to ROLES, ROLES to ROLES). It also synchronizes the password for the Subscriber(eDir to MSSQL) channel.
The use of Active Directory security would very likely render this driver not necessary, but since some MSSQL customers have dozens of applications and many more instances, AD enablement of all their MSSQL applications instances/applications is still something planned for the future. Meanwhile, this driver would allow a more comprehensive integration of MSSQL and eDirectory security, especially interesting for customers with many MSSQL developers needing privileges and access on many MSSQL instances.
Schema extensions (CASE IGNORE STRING, SINGLE VALUE, SYNC IMMEDIATE):
User: mssqlUser, mssqlPubRole, mssqlPubRoleOp
Dynamic Group: mssqlRole, mssqlPubRole, mssqlPubRoleOp
N.B. Dynamic Group has been selected since it can be nested.
N.B. While Users with a MSSQL account(mssqlUser) can be anywhere in the tree, MSSQL roles(dynamicGroup) must be located in one context per MSSQL driver(flat).
What the connector does.
- USER CREATE EVENT: Updates dirxml.emp and sp_addlogin, sp_grantdbaccess(JDBC SQL in XSL) Required attribute = mssqlUser
- USER DELETE EVENT: Updates dirxml.emp and sp_dropuser, sp_droplogin(JDBC SQL in XSL)
- USER Modify EVENT: Updates dirxml.emp
- ROLE CREATE EVENT: Updates dirxml.role and sp_addrole(JDBC SQL in XSL) Required attribute = mssqlRole
- ROLE DELETE EVENT: Updates dirxml.role and sp_droprole(JDBC SQL in XSL)
- ADD ROLE TO USER EVENT: sp_addrolemember(JDBC SQL in XSL).
- DELETE ROLE FROM USER EVENT: sp_droprolemember(JDBC SQL in XSL).
- ADD ROLE TO ROLE EVENT: sp_addrolemember(JDBC SQL in XSL).
- DELETE ROLE FROM ROLE EVENT: sp_droprolemember(JDBC SQL in XSL).
- CREATE/DROP USER EVENT: A MSSQL Job Polls dirxml.dbo.sysusers with Stored Procedure sp_dirxml_pub_ae/sp_dirxml_pub_der which updates dirxml.emp(which updates dirxml.eventlog)
- CREATE/DROP ROLE EVENT: A MSSQL Job Polls dirxml.dbo.sysusers with Stored Procedure sp_dirxml_pub_ar/sp_dirxml_pub_der which updates dirxml.role(which updates dirxml.eventlog)
- GRANT/REVOKE ROLE EVENT: A MSSQL Job Polls dirxml.dbo.sysmembers with Stored Procedure sp_dirxml_pub_add_member/sp_dirxml_pub_del_member which updates dirxml.member, dirxml.emp and dirxml.role (which update dirxml.eventlog)
- Extend the schema for User and Dynamic Group
- Import the driver into eDirectory, SQL2000-adv-JDBC-Driver-NIM2.xml for DirXML 2.0/Apollo/Nsure Identity Management 2.0. Enter the selected password for dirxml account(dirxml), IP address for MSSQL server, and database name (e.g. dirxml).
- Login as sa against MSSQL with Query Analyzer. Run SQL script INSTALL_INDIRECT_1.sql.
- Logout from Query Analyzer and login as dirxml. Run SQL scripts EMP.sql, ROLE.sql, PUB_Poll_for_EMP_ROLE.sql and PUB_Poll_membership.sql.
- Create MSSQL jobs for sp_dirxml_pub_ae, sp_dirxml_pub_der ,sp_dirxml_pub_ae, sp_dirxml_pub_ar, sp_dirxml_pub_der. You can schedule them to run every five minutes. You can run them manually for testing purposes. Make sure the jobs are run as a user other than dirxml, for example sa. Otherwise the loopback prevention feature for the driver would discard the Publisher events(perpetrator = dirxml).
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com