2 OpenAFS Network Identity Provider Plug-in
4 OpenAFS Plug-in Extension Template
6 ------------------------------------------------------------------
11 2. COPYRIGHT AND LICENSE
12 3. ROADMAP OF THE TEMPLATE
15 6. RUNNING THE PLUG-IN
17 8. SUPPORT / BUG REPORTS
19 ------------------------------------------------------------------
23 This directory and subdirectories contain a plug-in template for
24 creating an extension for the OpenAFS Network Identity Manager
25 plug-in. Currently, such extensions are limited to providing
26 additional authentication methods.
28 This version of the template adheres to the following version
31 Network Identity Manager API version : 10 or later
32 OpenAFS Plug-in Version : 1 or later
34 The source files in this template can be used to build the plug-in
35 DLL and the US English resource DLL for the plug-in. In its
36 current form, the plug-in doesn't do much. However, the source
37 code contains a number of stub functions that can be used to
38 implement your extension.
40 Note that this template is based on the credentials provider
41 template in the Network Identity Manager SDK, and has numerous
42 references to credentials providers that are not applicable to
43 this particular type of plug-in.
45 ------------------------------------------------------------------
47 2. COPYRIGHT AND LICENSE
49 Copyright (c) 2008 Secure Endpoints Inc.
51 Permission is hereby granted, free of charge, to any person
52 obtaining a copy of this software and associated documentation
53 files (the "Software"), to deal in the Software without
54 restriction, including without limitation the rights to use, copy,
55 modify, merge, publish, distribute, sublicense, and/or sell copies
56 of the Software, and to permit persons to whom the Software is
57 furnished to do so, subject to the following conditions:
59 The above copyright notice and this permission notice shall be
60 included in all copies or substantial portions of the Software.
62 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
63 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
64 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
65 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
66 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
67 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
68 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
69 DEALINGS IN THE SOFTWARE.
71 ------------------------------------------------------------------
73 3. ROADMAP OF THE TEMPLATE
75 The files and directories included in the template are described
76 below. The files that you most likely want to change are
77 Makefile, afspext.c, version.rc and lang\en_us\langres.rc.
85 The primary (and only) Makefile used by 'nmake' to build the
86 plug-in. In addition to providing build directives, it also
87 contains a set of macros which defines the names and version
88 information that is used throughout the plug-in code.
90 Look for the 'Configuration Settings' section of the Makefile
91 for the macros. If you are basing a plug-in on this template,
92 you will want to change these macros. These macros will be
93 used to generate 'credacq_config.h', a header file included by
94 'credprov.h' so that the values of the macros can be used in C
99 The main header file for all the C source files in the
104 Provides the entry points for the module.
108 Provides the message processing functions and support routines
109 for implementing the plug-in. Note that some of the message
110 processing routines have been moved to other sources files
115 The message handler for AFS_MSG messages. The OpenAFS plug-in
116 uses these messages to communicate with its extensions. This
117 is probably the only C source file you would want to modify
118 when implementing an extension plug-in for the OpenAFS
123 Dialog procedures and support code for providing the general
124 configuration panel for this plug-in. Providing a
125 configuration panel isn't required for an extension plug-in.
129 Version information for the plug-in as well as all the
130 language resource DLLs.
134 Declarations for the language resources (see below). In its
135 current form, it was generated via Visual Studio while editing
136 the language resouces file.
140 A generic plug-in icon.
142 .\lang\en_us\langres.rc
144 US-English language resources. This will be used to create
145 the language resource DLL.
147 ------------------------------------------------------------------
149 4. BUILD REQUIREMENTS
151 Microsoft(R) Platform SDK (Windows Server 2003 or later)
153 (http://www.microsoft.com/msdownload/platformsdk/sdkupdate/)
155 Microsoft(R) Visual C++ (Visual Studio 2003 or later)
157 Although not tested, the template should build using the
158 Microsoft Visual C++ toolkit.
160 MIT Kerberos for Windows (version 3.2 or later) SDK
162 OpenAFS for Windows 1.5.x SDK or source
164 The only file that is needed for building an extension plug-in
167 ------------------------------------------------------------------
171 The build process is fairly straightforward. The source is set up
172 to build using 'nmake', a build tool distributed with the Platform
173 SDK as well as with Visual Studio.
175 1. Open a command prompt with a suitable build environment.
177 From a plain command prompt, you can set up a debug build
178 environment targeting Windows XP (32-bit) with:
180 > "%PROGRAMFILES%\Microsoft Platform SDK\SetEnv.Cmd" /XP32 /DEBUG
182 2. Set the environment variable KFWSDKDIR to point to the root of
183 the Kerberos for Windows 3.1 SDK. (i.e. %KFWSDKDIR%\inc
184 should be the include directory of the SDK)
186 > SET KFWSDKDIR=%PROGRAMFILES%\MIT\Kerberos
188 3. Set the environment variable AFSPLUGINDIR to the directory
189 that contains afspext.h. This could either be in the OpenAFS
190 SDK include directory or in the source tree at
191 src\WINNT\netidmgr_plugin.
193 > SET AFSPLUGINDIR=...
199 The build target 'all' builds the plug-in and the language
200 resources. There is an additional build target 'clean' which
201 removes the temporary files and the binaries generated during
204 Assuming everything goes well, the plug-in binaries should be
205 created under a subdirectory under 'dest'. The name of the
206 subdirectory reflects the target architecture and the build
207 type ('debug' or 'release').
209 ------------------------------------------------------------------
211 6. RUNNING THE PLUG-IN
213 Once the binaries for the plug-in have been built, you need to
214 register the plug-in with NetIDMgr by adding a registry value as
217 [HKEY_CURRENT_USER\Software\MIT\NetIDMgr\PluginManager\Modules\<Module name>]
220 The <path> should be the full path to the plug-in DLL.
222 <Module name> is the name of the module that you built. The
223 default value specified in the template is 'MyAFSExtModule'. This
224 is the value of the macro 'MODULENAME' defined in the 'Makefile'.
226 Once this is done, you need to restart NetIDMgr so that it will
227 pick up the new plug-in.
229 ------------------------------------------------------------------
233 ------------------------------------------------------------------
235 8. SUPPORT / BUG REPORTS
237 Problems should be sent to openafs@secure-endpoints.com
239 ------------------------------------------------------------------