[This is preliminary documentation and subject to change.]
PolicyDesign.zip file to the CAZE Samples directory
(<CAZE Installation Directory>\Samples)
and extract the files with folder names. This should create the following
directory on your hard drive:
<CAZE Installation Directory>\Samples\PolicyDesign\2005\PolicyInDatabase. For simplicity, I'll call
this directory PolicyInDatabase directory from now on.
PolicyInDatabase\Scripts\PolicyDatabaseSetup.sql. The script
creates a table and a couple of views and stored procedures for storing and loading
authorization policies to / from the database (all the created database objects
have names with the lamarvin_pdb_ prefix - see the T-SQL script for more information).
PolicyInDatabase\VB\PolicyInDatabaseVB\PolicyInDatabaseVB.sln solution in
Visual Studio 2005 (please note that currently there is only Visual Studio 2005
version of the sample available). Open the PolicyInDatabaseVB project properties,
select the Debug tab and specify a correct path to the caze.exe executable to be
started as an external program when debugging. The caze.exe file is located
in the <CAZE Installation Directory>\bin folder. The solution has post-build
commands that will copy the PolicyInDatabaseVB sample outputs to the caze.exe directory
so that it will load the sample Policy Design extension allowing you to debug it in the
caze.exe process.
caze.exe.config file in the <CAZE Installation Directory>\bin
and specify the required .NET Framework version to be 2.0 (otherwise caze.exe won't
load your extension) and a connection string to the database you've setup in the
second step above. The configuration file should look like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="CazePolicyDatabaseConnectionString" value="server=localhost;database=cazedb;trusted_connection=true;" />
</appSettings>
<startup>
<supportedRuntime version="v2.0.50727" />
</startup>
</configuration>
Now when you run the solution, the caze.exe process should be launched with the
PolicyInDatabaseVB extension loaded. You can place a breakpoint in the
SqlServerPersistencePolicyDesignExtension.Initialize method, which is called
as first by the Policy Designer and see how the extension installs and handles
the custom commands.