Walkthroughs: How Kabel .NET works
Open
this document in seperate window
In this document:
Kabel .NET: An HTTP Module for ASP.NET
Implementing Your Authentication Code
The Authentication Cache
A Common Event Model
Configuration Options
Kabel .NET: An HTTP Module for ASP.NET
As an extension to ASP.NET, Kabel .NET is designed as a modular component to allow for the easy implementation of your own custom authentication code and mechanism. It is implemented as an HTTP Module that intercepts client requests and performs the necessary security checks before they reach the core of your web application for actual further processing.

Implementing Your Authentication Code
Kabel .NET offers two ways for implementing your custom authentication code:
Click below to see sample code:
... or browse the implementation walkthroughs:
|
Code Requirements
When a request comes in, Kabel .NET will call your custom code according to the following procedure:
This basic design aspect is crucial due to the basic nature of HTTP Digest communication. Because the Server cannot decrypt the credentials passed by the Client but can only verify them by applying the same irreversible algorithm to the credentials it has stored for the known username, your implementation must return a clear-text password for a given username. Whether or not the password passed by the Client was in fact valid can only be determined by Kabel .NET’s internal processing, as it involves the strict adherence to the HTTP Digest specification in combination with cryptographic hash calculations.
Overriding Base Functionality
As explained above, you can freely derive from the Kabel .NET HTTP Module to extend and customize its functionality while relying on its core logic for standardized HTTP Digest processing. For example, you could easily overwrite its ticket generation and validation functions to implement your own scheme of security checking.
The Helper Classes
The Kabel .NET implementation also contains a special Helper Class (DigestHelper), which you can use from your code for common tasks related to Digest User authentication – such as the encoding/decoding and signing/verifying of custom tickets, the calculation of MD5 and server-keyed SHA1 hashes, and many other such support functions. As a developer, you also have access to an info structure DigestHeader that contains all the specific HTTP Digest parameters for each client request.
Because your code needs to return the valid password for each
client request (even if the Client has been authenticated in previous requests),
the processing burden for the necessary lookups (database for example) may be
quite high.
Here, Kabel .NET offers a simple but effective solution by implementing a password
cache. Kabel .NET can thus be easily configured to cache a verified
password together with the associated username after the first time it has been
successfully authenticated. When the Client makes subsequent requests, Kabel
.NET can short-cut the processing pipeline and retrieve the password from the
cache without calling your code again until the cache expires (the expiration
time is freely configurable). This saves repeated lookups and can provide significant
performance and scalability gains.
Rejected Username Cache
Additionally, the Module can be set to maintain a cache of rejected usernames that your code has explicitly returned as invalid (possibly because the usernames do not exist in your database or because the accounts are disabled). If a request comes in with a matching username in the cache, Kabel .NET can immediately reject the request and prevent resources from being spent on unnecessary processing.
Both of these Caches internally rely on the underlying ASP.NET caching architecture and are thus light-weight and scalable.
Besides calling your code for authentication, the Module exposes two additional global events AuthenticationSuceeded and AuthenticationFailed. They can be captured in the global.asax file your application and you can use them to further customize security processing.
Kabel .NET offers several advanced configuration options which you can specify
according to your security needs.
See About HTTP Digest, Tickets in Kabel
.NET for more information on 'tickets.'
Feedback
on Help
Copyright © 2002, uthentic.net
All Rights Reserved