<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2) on Sat Sep 25 10:13:58 EDT 2004 -->
<TITLE>
org.apache.catalina.realm (Catalina Internal API Documentation)
</TITLE>

<META NAME="keywords" CONTENT="org.apache.catalina.realm package">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="org.apache.catalina.realm (Catalina Internal API Documentation)";
}
</SCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/catalina/net/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/catalina/servlets/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>

</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<H2>
Package org.apache.catalina.realm
</H2>
This package contains <code>Realm</code> implementations for the
various supported realm technologies for authenticating users and
identifying their associated roles.
<P>
<B>See:</B>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#package_description"><B>Description</B></A>
<P>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Class Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/catalina/realm/Constants.html" title="class in org.apache.catalina.realm">Constants</A></B></TD>
<TD>Manifest constants for this Java package.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/catalina/realm/DataSourceRealm.html" title="class in org.apache.catalina.realm">DataSourceRealm</A></B></TD>
<TD>Implmentation of <b>Realm</b> that works with any JDBC JNDI DataSource.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/catalina/realm/GenericPrincipal.html" title="class in org.apache.catalina.realm">GenericPrincipal</A></B></TD>
<TD>Generic implementation of <strong>java.security.Principal</strong> that
 is available for use by <code>Realm</code> implementations.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/catalina/realm/JAASCallbackHandler.html" title="class in org.apache.catalina.realm">JAASCallbackHandler</A></B></TD>
<TD>Implementation of the JAAS <strong>CallbackHandler</code> interface,
 used to negotiate delivery of the username and credentials that were
 specified to our constructor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/catalina/realm/JAASMemoryLoginModule.html" title="class in org.apache.catalina.realm">JAASMemoryLoginModule</A></B></TD>
<TD>Implementation of the JAAS <strong>LoginModule</strong> interface,
 primarily for use in testing <code>JAASRealm</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/catalina/realm/JAASRealm.html" title="class in org.apache.catalina.realm">JAASRealm</A></B></TD>
<TD>Implmentation of <b>Realm</b> that authenticates users via the <em>Java
 Authentication and Authorization Service</em> (JAAS).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/catalina/realm/JDBCRealm.html" title="class in org.apache.catalina.realm">JDBCRealm</A></B></TD>
<TD>Implmentation of <b>Realm</b> that works with any JDBC supported database.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/catalina/realm/JNDIRealm.html" title="class in org.apache.catalina.realm">JNDIRealm</A></B></TD>
<TD>Implementation of <strong>Realm</strong> that works with a directory
 server accessed via the Java Naming and Directory Interface (JNDI) APIs.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/catalina/realm/MemoryRealm.html" title="class in org.apache.catalina.realm">MemoryRealm</A></B></TD>
<TD>Simple implementation of <b>Realm</b> that reads an XML file to configure
 the valid users, passwords, and roles.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/catalina/realm/MemoryRuleSet.html" title="class in org.apache.catalina.realm">MemoryRuleSet</A></B></TD>
<TD><strong>RuleSet</strong> for recognizing the users defined in the
 XML file processed by <code>MemoryRealm</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/catalina/realm/RealmBase.html" title="class in org.apache.catalina.realm">RealmBase</A></B></TD>
<TD>Simple implementation of <b>Realm</b> that reads an XML file to configure
 the valid users, passwords, and roles.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/catalina/realm/UserDatabaseRealm.html" title="class in org.apache.catalina.realm">UserDatabaseRealm</A></B></TD>
<TD>Implementation of <CODE>Realm</CODE> that is based on an implementation of
 <A HREF="../../../../org/apache/catalina/UserDatabase.html" title="interface in org.apache.catalina"><CODE>UserDatabase</CODE></A> made available through the global JNDI resources
 configured for this instance of Catalina.</TD>
</TR>
</TABLE>
&nbsp;

<P>
<A NAME="package_description"><!-- --></A><H2>
Package org.apache.catalina.realm Description
</H2>

<P>
<p>This package contains <code>Realm</code> implementations for the
various supported realm technologies for authenticating users and
identifying their associated roles.  The <code>Realm</code> that is
associated with a web application's <code>Context</code> (or a hierarchically
superior Container) is used to resolve authentication and role presence
questions when a web application uses container managed security as described
in the Servlet API Specification, version 2.2.</p>

<p>The implementations share a common base class that supports basic
functionality for all of the standard <code>Realm</code> implementations,
and can be configured by setting the following properties (default values
are in square brackets):</p>
<ul>
<li><b>debug</b> - Debugging detail level for this component. [0]</li>
</ul>

<p>The standard <code>Realm</code> implementations that are currently
available include the following (with additional configuration properties
as specified):</p>
<ul>
<li><b>JDBCRealm</b> - Implementation of <code>Realm</code> that operates
    from data stored in a relational database that is accessed via a JDBC
    driver.  The name of the driver, database connection information, and
    the names of the relevant tables and columns are configured with the
    following additional properties:
    <ul>
    <li><b>connectionURL</b> - The URL to use when connecting to this database.
        [REQUIRED - NO DEFAULT]</li>
    <li><b>driverName</b> - Fully qualified Java class name of the JDBC driver
        to be used.  [REQUIRED - NO DEFAULT]</li>
    <li><b>roleNameCol</b> - Name of the database column that contains role
        names.  [REQUIRED - NO DEFAULT]</li>
    <li><b>userCredCol</b> - Name of the database column that contains the
        user's credentials (i.e. password) in cleartext.  [REQUIRED -
        NO DEFAULT]</li>
    <li><b>userNameCol</b> - Name of the database column that contains the
        user's logon username.  [REQUIRED - NO DEFAULT]</li>
    <li><b>userRoleTable</b> - Name of the database table containing user
        role information.  This table must include the columns specified by
        the <code>userNameCol</code> and <code>roleNameCol</code> properties.
        [REQUIRED - NO DEFAULT]</li>
    <li><b>userTable</b> - Name of the database table containing user
        information.  This table must include the columns specified by the
        <code>userNameCol</code> and <code>userCredCol</code> properties.
        [REQUIRED - NO DEFAULT]</li>
    </ul>
    </li>
<li><b>MemoryRealm</b> - Implementation of <code>Realm</code> that uses the
    contents of a simple XML file (<code>conf/tomcat-users.xml</code>) as the
    list of valid users and their roles.  This implementation is primarily to
    demonstrate that the authentication technology functions correctly, and is
    not anticipated as adequate for general purpose use.  This component
    supports the following additional properties:
    <ul>
    <li><b>pathname</b> - Pathname of the XML file containing our user and
        role information.  If a relative pathname is specified, it is resolved
        against the pathname specified by the "catalina.home" system property.
        [conf/tomcat-users.xml]</li>
    </ul>
</ul>
<P>

<P>
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/catalina/net/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/catalina/servlets/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>

</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright  2000-2002 Apache Software Foundation.  All Rights Reserved.
</BODY>
</HTML>
