Installing LDS

first of all, when creating new LDS one must create new database in MSSQL server. Source code contains file L2DB.v05.sql with create script. The only thing that should be changed in script is  database location at the begin of this file. Database name can be changed to any valid db name.

Note: One database can contain multiple rootDSE entries, so all low level operations must specify which rootDSE to use.

Create script is maintained separately from table content so one extra step is necessary, either run:

insertVer.v05.sql

from sql folder or these commands:

use L2DB

INSERT [dbo].[_NFO] ([PropertyCode], [PropertyValue], [Description]) VALUES (N'DB_VERSION_MAJOR', N'0', N'Major database version related to structure compatibility')
INSERT [dbo].[_NFO] ([PropertyCode], [PropertyValue], [Description]) VALUES (N'DB_VERSION_MINOR', N'6', N'minor version number when compatibility is not broken')
INSERT [dbo].[_NFO] ([PropertyCode], [PropertyValue], [Description]) VALUES (N'DB_VERSION_PROG', N'8', N'Version of program equipment')
INSERT [dbo].[_NFO] ([PropertyCode], [PropertyValue], [Description]) VALUES (N'PURPOSE', N'db description', N'simple directory database implemented on MSSQL server 2008+')

INSERT [dbo].[LD_SCHEMA] ([ObjectName], [Description], [Order]) VALUES (N'ENTRIES', N'LD Object instance storage - directory entries', 20)
INSERT [dbo].[LD_SCHEMA] ([ObjectName], [Description], [Order]) VALUES (N'REF_RELATIONS', N'LD reference relation storage table', 30)
INSERT [dbo].[LD_SCHEMA] ([ObjectName], [Description], [Order]) VALUES (N'VAL_REL_DirectoryString', N'LD value relation storage table for DirectoryString types OID=1.3.6.1.4.1.1466.115.121.1.22', 30)
INSERT [dbo].[LD_SCHEMA] ([ObjectName], [Description], [Order]) VALUES (N'VAL_REL_sname', N'LD value relation storage table for name and uid, OID=1.3.6.1.4.1.1466.115.121.1.36', 30)
INSERT [dbo].[LD_SCHEMA] ([ObjectName], [Description], [Order]) VALUES (N'VAL_REL_Uuid', N'LD value relation storage table for Uuid(windows GUID), OID=1.3.6.1.1.16.4', 30)

After successful db create one must create new RootDSE in this database. This can be simply done using following sql command:

exec ld.sp_AddRoot 'IS_UHUL', N'My first directory tree', null

this command creates basic schema and structure including top, unit, user, group types and basic attributes such as o, uid, cn, c, dc,...

now database is ready to create custom types and store directory data.

Installing WCF service

Service uses its own configurationSection in web.config file called LdServiceConfiguration.

Using example web.config distributed with source code, can one get as simple guide what and how to configure. Use of service might require to create 2 extra objects securityTokenType and securityDescriptorType. These types distinguish user permissions for DS operations such as add, delete, update, etc. There is no strict requirement on structure for these types and its attributes. Configuration will asks for mandatory atributes explained in code.

Note: When service runs in SecurityModelNone there is no need for security descriptor, but anyone who knows service address can do anything with directory.

There is one more assembly in source cz.uhul.Web.Support which is not mandatory nor related to this project. It is token replacer used in global.asax, just remove it and continue.

Last edited Aug 20, 2013 at 9:14 AM by asida, version 7

Comments

No comments yet.