22.12.2012 Views

Front cover - IBM Redbooks

Front cover - IBM Redbooks

Front cover - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

302 Lotus Security Handbook<br />

A DSAPI filter is built as a shared library under UNIX and a DLL under Win32.<br />

DSAPI is supported on all Domino server platforms. Since the filter is written in<br />

C, you can use the Notes C API to access Domino data, or other C interfaces to<br />

access other systems. The details of compiling and linking a shared library differ<br />

from platform to platform. Note that the Lotus C API toolkit for Domino 6 is not<br />

backwards compatible, meaning programs developed with the 6.x toolkit will not<br />

run on pre-6 releases of Domino. If you have an R5 or mixed R5 and Domino 6<br />

environment, you should use the R5.x toolkit.<br />

A DSAPI filter is a server extension, so the filter has the privileges of the server<br />

ID when accessing Domino databases through the C API.<br />

Since filter notification functions may be called simultaneously from different<br />

server threads, all filter code must be thread-safe. When a Domino server thread<br />

receives an HTTP request, it allocates a new instance of the FilterContext<br />

structure. As the thread processes the request, it passes that instance to all filter<br />

functions it calls. FilterContext contains a pointer, privateContext, that you can<br />

use to store your own data structure. All thread-specific data that the filter needs<br />

to maintain from event to event should be stored in your privateContext structure.<br />

You should use the AllocMem callback function to allocate dynamic memory in<br />

your filter. All memory allocated by AllocMem is automatically freed when the<br />

server thread finishes processing the request. This simplifies your filter cleanup<br />

and ensures that the memory is freed even if the thread terminates abnormally.<br />

Install the filter by specifying the name of the filter in the Server record, in the<br />

field DSAPI filter file name in the Internet Protocols → HTTP table. You can<br />

specify just the name of the filter file if it is located in the Domino program or data<br />

directories; otherwise you must specify the fully-qualified path name. Make sure<br />

that all filter files are secured by adequate file permissions and physical security,<br />

to prevent unauthorized persons from tampering with the filter.<br />

A sample DSAPI filter that uses either the Windows password or the UNIX<br />

system passwords for Domino Web server authentication is provided in<br />

DSAPI and LTPA<br />

The Domino 6 C API toolkit provides two functions for dealing with LTPA tokens:<br />

► SECTokenValidate - Validate a Single Sign-On LTPA Token<br />

► SECTokenGenerate - Generate a Single Sign-On LTPA Token<br />

These two functions correspond to LTPA token decoding and encoding<br />

previously described in the section on LTPA.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!