cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs realm-howto.xml

2005-01-07 Thread markt
markt   2005/01/07 01:24:19

  Modified:catalina/src/share/org/apache/catalina/authenticator
FormAuthenticator.java
   catalina/src/share/org/apache/catalina/realm RealmBase.java
   webapps/tomcat-docs/config valve.xml
   webapps/tomcat-docs realm-howto.xml
  Log:
  Fix bug 31198. Support non-ASCII user names and passwords in FORM and
  DIGEST authentication.
  
  Revision  ChangesPath
  1.24  +28 -2 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java
  
  Index: FormAuthenticator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- FormAuthenticator.java26 Aug 2004 21:27:39 -  1.23
  +++ FormAuthenticator.java7 Jan 2005 09:24:19 -   1.24
  @@ -57,6 +57,13 @@
   org.apache.catalina.authenticator.FormAuthenticator/1.0;
   
   
  +/**
  + * Character encoding to use to read the username and password parameters
  + * from the request. If not set, the encoding of the request body will be
  + * used.
  + */
  +protected String characterEncoding = null;
  +
   // - 
Properties
   
   
  @@ -65,11 +72,27 @@
*/
   public String getInfo() {
   
  -return (this.info);
  +return (FormAuthenticator.info);
   
   }
   
   
  +/**
  + * Return the character encoding to use to read the username and 
password.
  + */
  +public String getCharacterEncoding() {
  +return characterEncoding;
  +}
  +
  +
  +/**
  + * Set the character encoding to be used to read the username and 
password. 
  + */
  +public void setCharacterEncoding(String encoding) {
  +characterEncoding = encoding;
  +}
  +
  +
   // - Public 
Methods
   
   
  @@ -220,6 +243,9 @@
   // Yes -- Validate the specified credentials and redirect
   // to the error page if they are not correct
   Realm realm = context.getRealm();
  +if (characterEncoding != null) {
  +hreq.setCharacterEncoding(characterEncoding);
  +}
   String username = hreq.getParameter(Constants.FORM_USERNAME);
   String password = hreq.getParameter(Constants.FORM_PASSWORD);
   if (debug = 1)
  
  
  
  1.16  +22 -8 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/RealmBase.java
  
  Index: RealmBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/RealmBase.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- RealmBase.java27 Nov 2004 18:29:44 -  1.15
  +++ RealmBase.java7 Jan 2005 09:24:19 -   1.16
  @@ -730,9 +730,11 @@
*
* @param credentials Password or other credentials to use in
*  authenticating this username
  - * @param algorithm Algorithm used to do th digest
  + * @param algorithm Algorithm used to do the digest
  + * @param encoding Character encoding of the string to digest 
*/
  -public final static String Digest(String credentials, String algorithm) {
  +public final static String Digest(String credentials, String algorithm,
  +  String encoding) {
   
   try {
   // Obtain a new message digest with digest encryption
  @@ -741,7 +743,11 @@

   // encode the credentials
   // Should use the digestEncoding, but that's not a static field
  -md.update(credentials.getBytes());
  +if (encoding == null) {
  +md.update(credentials.getBytes());
  +} else {
  +md.update(credentials.getBytes(encoding));
  +}
   
   // Digest the credentials and return as hexadecimal
   return (HexUtils.convert(md.digest()));
  @@ -759,15 +765,23 @@
* If exception, the plain credentials string is returned
*/
   public static void main(String args[]) {
  + 
  +String encoding = null;
  +int firstCredentialArg = 2;
  +
  +if (args.length  4  args[2].equalsIgnoreCase(-e)) {
  +encoding = args[3];
  +firstCredentialArg = 4;
  +}
   
  -if(args.length  2  args[0].equalsIgnoreCase(-a)) {
  -for(int i=2; i  args.length ; i++){
  +if(args.length  firstCredentialArg  
args[0].equalsIgnoreCase(-a)) {
  +for(int i=firstCredentialArg; i  args.length ; i++){
 

cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs realm-howto.xml

2004-11-27 Thread markt
markt   2004/11/27 10:29:44

  Modified:catalina/src/share/org/apache/catalina/realm
DataSourceRealm.java JAASRealm.java JDBCRealm.java
LocalStrings.properties MemoryRealm.java
RealmBase.java UserDatabaseRealm.java
   webapps/tomcat-docs realm-howto.xml
  Log:
  Fix bug 19767.  Port support for digested passwords with DIGEST
authentication for JDBC and DataSource realms from TC5.
  
  Remove unused imports in o.a.c.realm package
  
  Revision  ChangesPath
  1.4   +135 -73   
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java
  
  Index: DataSourceRealm.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DataSourceRealm.java  26 Aug 2004 21:37:21 -  1.3
  +++ DataSourceRealm.java  27 Nov 2004 18:29:44 -  1.4
  @@ -18,36 +18,20 @@
   package org.apache.catalina.realm;
   
   
  -import java.io.File;
  -import java.security.MessageDigest;
   import java.security.Principal;
   import java.sql.Connection;
  -import java.sql.Driver;
   import java.sql.PreparedStatement;
   import java.sql.ResultSet;
   import java.sql.SQLException;
   import java.util.ArrayList;
  -import java.util.Properties;
   
  -import javax.naming.InitialContext;
   import javax.naming.Context;
  -import javax.naming.NamingException;
   import javax.sql.DataSource;
   
  -import org.apache.catalina.Container;
  -import org.apache.catalina.Lifecycle;
  -import org.apache.catalina.LifecycleEvent;
   import org.apache.catalina.LifecycleException;
  -import org.apache.catalina.LifecycleListener;
  -import org.apache.catalina.Logger;
  -import org.apache.catalina.Realm;
  -import org.apache.catalina.Server;
   import org.apache.catalina.ServerFactory;
   import org.apache.catalina.core.StandardServer;
  -import org.apache.catalina.util.HexUtils;
  -import org.apache.catalina.util.LifecycleSupport;
   import org.apache.catalina.util.StringManager;
  -import org.apache.catalina.util.Base64;
   
   /**
   *
  @@ -323,64 +307,37 @@
*/
   private Principal authenticate(Connection dbConnection,
  String username,
  -   String credentials)
  -throws SQLException {
  +   String credentials) {
   
  -ResultSet rs = null;
  -PreparedStatement stmt = null;
  -ArrayList list = null;
   
  -try {
  -// Look up the user's credentials
  -String dbCredentials = null;
  -stmt = credentials(dbConnection, username);
  -rs = stmt.executeQuery();
  -while (rs.next()) {
  -dbCredentials = rs.getString(1).trim();
  -}
  -rs.close();
  -rs = null;
  -stmt.close();
  -stmt = null;
  -if (dbCredentials == null) {
  -return (null);
  -}
  -
  -// Validate the user's credentials
  -boolean validated = false;
  -if (hasMessageDigest()) {
  -// Hex hashes should be compared case-insensitive
  -validated = 
(digest(credentials).equalsIgnoreCase(dbCredentials));
  -} else
  -validated = (digest(credentials).equals(dbCredentials));
  -
  -if (validated) {
  -if (debug = 2)
  -log(sm.getString(dataSourceRealm.authenticateSuccess,
  - username));
  -} else {
  -if (debug = 2)
  -log(sm.getString(dataSourceRealm.authenticateFailure,
  - username));
  -return (null);
  -}
  -
  -// Accumulate the user's roles
  -list = new ArrayList();
  -stmt = roles(dbConnection, username);
  -rs = stmt.executeQuery();
  -while (rs.next()) {
  -list.add(rs.getString(1).trim());
  -}
  -} finally {
  -if (rs != null) {
  -rs.close();
  -}
  -if (stmt != null) {
  -stmt.close();
  -}
  +// No user - can't possibly authenticate
  +if (username == null) {
  +return (null);
   }
   
  +String dbCredentials = getPassword(username);
  +
  +// Validate the user's credentials
  +boolean validated = false;
  +if (hasMessageDigest()) {
  +// Hex hashes should be compared case-insensitive
  +validated = 

cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs realm-howto.xml

2004-08-21 Thread markt
markt   2004/08/21 05:37:56

  Modified:webapps/tomcat-docs realm-howto.xml
  Log:
  Fix bug 12516. Clarify that the cached Principal is not retained across session 
serialisation.
  
  Revision  ChangesPath
  1.14  +14 -10jakarta-tomcat-4.0/webapps/tomcat-docs/realm-howto.xml
  
  Index: realm-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/realm-howto.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- realm-howto.xml   4 Sep 2003 19:59:47 -   1.13
  +++ realm-howto.xml   21 Aug 2004 12:37:56 -  1.14
  @@ -326,9 +326,10 @@
   roles) are cached within Tomcat for the duration of the user's login.
   (For FORM-based authentication, that means until the session times out or
   is invalidated; for BASIC authentication, that means until the user
  -closes their browser).  Any changes to the database information for an
  -already authenticated user will strongnot/strong be reflected until
  -the next time that user logs on again./li
  +closes their browser).  The cached user is strongnot/strong saved and
  +restored across sessions serialisations. Any changes to the database
  +information for an already authenticated user will strongnot/strong be
  +reflected until the next time that user logs on again./li
   liAdministering the information in the emusers/em and emuser roles/em
   table is the responsibility of your own applications.  Tomcat does not
   provide any built-in capabilities to maintain users and roles./li
  @@ -499,9 +500,10 @@
   roles) are cached within Tomcat for the duration of the user's login.
   (For FORM-based authentication, that means until the session times out or
   is invalidated; for BASIC authentication, that means until the user
  -closes their browser).  Any changes to the database information for an
  -already authenticated user will strongnot/strong be reflected until
  -the next time that user logs on again./li
  +closes their browser).  The cached user is strongnot/strong saved and
  +restored across sessions serialisations. Any changes to the database
  +information for an already authenticated user will strongnot/strong be
  +reflected until the next time that user logs on again./li
   liAdministering the information in the emusers/em and emuser roles/em
   table is the responsibility of your own applications.  Tomcat does not
   provide any built-in capabilities to maintain users and roles./li
  @@ -1088,9 +1090,10 @@
   roles) are cached within Tomcat for the duration of the user's login.
   (For FORM-based authentication, that means until the session times out or
   is invalidated; for BASIC authentication, that means until the user
  -closes their browser).  Any changes to the directory information for an
  -already authenticated user will strongnot/strong be reflected until
  -the next time that user logs on again./li
  +closes their browser).  The cached user is strongnot/strong saved and
  +restored across sessions serialisations. Any changes to the directory
  +information for an already authenticated user will strongnot/strong be
  +reflected until the next time that user logs on again./li
   liAdministering the information in the directory server
   is the responsibility of your own applications.  Tomcat does not
   provide any built-in capabilities to maintain users and roles./li
  @@ -1198,7 +1201,8 @@
   roles) are cached within Tomcat for the duration of the user's login.
   (For FORM-based authentication, that means until the session times out or
   is invalidated; for BASIC authentication, that means until the user
  -closes their browser)./li
  +closes their browser).  The cached user is strongnot/strong saved and
  +restored across sessions serialisations./li
   liAdministering the information in the users file is the responsibility
   of your application.  Tomcat does not
   provide any built-in capabilities to maintain users and roles./li
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs realm-howto.xml

2003-01-10 Thread glenn
glenn   2003/01/10 17:47:13

  Modified:.RELEASE-NOTES-4.1.txt
   catalina/src/share/org/apache/catalina/realm JNDIRealm.java
   webapps/tomcat-docs realm-howto.xml
  Log:
  Apply JNDIRealm patch to add alternateURL provided by Brad Handy
  
  Revision  ChangesPath
  1.45  +6 -1  jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt
  
  Index: RELEASE-NOTES-4.1.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- RELEASE-NOTES-4.1.txt 10 Jan 2003 15:52:17 -  1.44
  +++ RELEASE-NOTES-4.1.txt 11 Jan 2003 01:47:13 -  1.45
  @@ -111,6 +111,11 @@
A new Realm implementation which can use a JNDI named JDBC
DataSource has been added.
   
  +[4.1.19] JNDIRealm:
  + Added support for using an alternateURL if a socket connection
  + can not be made to the provider at the connectionURL.
  +
  +
   ---
   Jasper New Features:
   ---
  
  
  
  1.11  +115 -16   
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
  
  Index: JNDIRealm.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JNDIRealm.java19 Nov 2002 01:26:38 -  1.10
  +++ JNDIRealm.java11 Jan 2003 01:47:13 -  1.11
  @@ -70,6 +70,7 @@
   import java.util.Hashtable;
   import java.util.List;
   import javax.naming.Context;
  +import javax.naming.CommunicationException;
   import javax.naming.NameNotFoundException;
   import javax.naming.NamingEnumeration;
   import javax.naming.NamingException;
  @@ -98,6 +99,10 @@
* element in the top level codeDirContext/code that is accessed
* via the codeconnectionURL/code property./li
*
  + * liIf a socket connection can not be made to the codeconnectURL/code
  + * an attempt will be made to use the codealternateURL/code if it
  + * exists./li
  + *
* liEach user element has a distinguished name that can be formed by
* substituting the presented username into a pattern configured by the
* codeuserPattern/code property./li
  @@ -337,6 +342,16 @@
*/
   protected boolean roleSubtree = false;
   
  +/** 
  + * An alternate URL, to which, we should connect if connectionURL fails.
  + */
  +protected String alternateURL;  
  +
  +/**
  + * The number of connection attempts.  If greater than zero we use the
  + * alternate url.
  + */
  +protected int connectionAttempt = 0;
   
   // - Properties
   
  @@ -716,6 +731,28 @@
   
   }
   
  +/**
  + * Getter for property alternateURL.
  + *
  + * @return Value of property alternateURL.
  + */
  +public String getAlternateURL() {
  +
  +return this.alternateURL;
  +
  +}
  +
  +/**
  + * Setter for property alternateURL.
  + *
  + * @param alternateURL New value of property alternateURL.
  + */
  +public void setAlternateURL(String alternateURL) {
  +
  +this.alternateURL = alternateURL;
  +
  +}
  +
   
   // -- Realm Methods
   
  @@ -736,15 +773,41 @@
   public Principal authenticate(String username, String credentials) {
   
   DirContext context = null;
  +Principal principal = null;
   
   try {
   
   // Ensure that we have a directory context available
   context = open();
  -
  -// Authenticate the specified username if possible
  -Principal principal = authenticate(context,
  -   username, credentials);
  +
  +// Occassionally the directory context will timeout.  Try one more
  +// time before giving up.
  +try {
  +
  +// Authenticate the specified username if possible
  +principal = authenticate(context, username, credentials);
  +
  +} catch (CommunicationException e) {
  +
  +// If not a Socket closed. error then rethrow.
  +if (e.getMessage().indexOf(Socket closed)  0)
  +throw(e);
  +
  +// log the exception so we know it's there.
  +log(sm.getString(jndiRealm.exception), e);
  +
  +// close the connection so we know it will be reopened.
  +if (context 

cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs realm-howto.xml

2003-01-09 Thread glenn
glenn   2003/01/09 17:31:09

  Modified:webapps/tomcat-docs realm-howto.xml
  Log:
  Add TOC and add listing for DataSourceRealm
  
  Revision  ChangesPath
  1.9   +28 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/realm-howto.xml
  
  Index: realm-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/realm-howto.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- realm-howto.xml   28 Dec 2002 02:04:36 -  1.8
  +++ realm-howto.xml   10 Jan 2003 01:31:09 -  1.9
  @@ -13,6 +13,31 @@
   
   body
   
  +section name=Table of Contents
  +
  +p
  +a href=#Quick StartQuick Start/abr /
  +blockquote
  +a href=#What is a Realm?What is a Realm?/abr /
  +a href=#Configuring a RealmConfiguring a Realm/abr /
  +/blockquote
  +a href=#Standard Realm Implementations
  +Standard Realm Implementations/abr /
  +blockquote
  +a href=#JDBCRealmJDBCRealm/abr /
  +a href=#DataSourceRealmDataSourceRealm/abr /
  +a href=#JNDIRealmJNDIRealm/abr /
  +a href=#MemoryRealmMemoryRealm/abr /
  +/blockquote
  +a href=#Common FeaturesCommon Features/abr /
  +blockquote
  +a href=#Digested PasswordsDigested Passwords/abr /
  +a href=#Example ApplicationExample Application/abr /
  +a href=#Manager ApplicationManager Application/abr /
  +/blockquote
  +/p
  +
  +/section
   
   section name=Quick Start
   
  @@ -66,6 +91,9 @@
   Three standard plug-ins are provided, supporting connection to three different
   sources of authentication information:/p
   ul
  +lia href=#DataSourceRealmDataSourceRealm/a - Accesses authentication
  +information stored in a relational database, accessed via a named JNDI
  +JDBC DataSource./li
   lia href=#JDBCRealmJDBCRealm/a - Accesses authentication information
   stored in a relational database, accessed via a JDBC driver./li
   lia href=#JNDIRealmJNDIRealm/a - Accesses authentication information
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs realm-howto.xml

2002-12-27 Thread glenn
glenn   2002/12/27 18:04:36

  Modified:webapps/tomcat-docs realm-howto.xml
  Log:
  Fix DataSourceRealm docs, bug id 15544, patch submitted by Kevin HaleBoyes, Thanks
  
  Revision  ChangesPath
  1.8   +5 -19 jakarta-tomcat-4.0/webapps/tomcat-docs/realm-howto.xml
  
  Index: realm-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/realm-howto.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- realm-howto.xml   7 Dec 2002 17:42:11 -   1.7
  +++ realm-howto.xml   28 Dec 2002 02:04:36 -  1.8
  @@ -350,7 +350,7 @@
   
   h3Quick Start/h3
 
  -pTo set up Tomcat to use JDBCRealm, you will need to follow these steps:/p
  +pTo set up Tomcat to use DataSourceRealm, you will need to follow these steps:/p
   ol  
   liIf you have not yet done so, create tables and columns in your database
   that conform to the requirements described above./li
  @@ -367,7 +367,7 @@
   
   h3Realm Element Attributes/h3
   
  -pTo configure JDBCRealm, you will create a codelt;Realmgt;/code
  +pTo configure DataSourceRealm, you will create a codelt;Realmgt;/code
   element and nest it in your code$CATALINA_HOME/conf/server.xml/code file,
   as described a href=#Configuring a Realmabove/a.  The following
   attributes are supported by this implementation:/p
  @@ -377,21 +377,13 @@
 attribute name=className required=true
   pThe fully qualified Java class name of this Realm implementation.
   You strongMUST/strong specify the value
  -codeorg.apache.catalina.realm.JDBCRealm/code here./p
  +codeorg.apache.catalina.realm.DataSourceRealm/code here./p
 /attribute
   
  -  attribute name=connectionName required=true
  -pThe database username used to establish a JDBC connection./p
  +  attribute name=dataSourceName required=true
  +pThe JNDI named JDBC DataSource for your database./p
 /attribute
   
  -  attribute name=connectionPassword required=true
  -pThe database password used to establish a JDBC connection./p
  -  /attribute
  -
  -  attribute name=connectionURL required=true
  -pThe database URL used to establish a JDBC connection./p
  -  /attribute
  -
 attribute name=debug required=false
   pThe level of debugging detail logged by this Realm
   to the associated a href=config/logger.htmlLogger/a.  Higher numbers
  @@ -405,12 +397,6 @@
   codejava.security.MessageDigest/code class.  See
   a href=#Digested PasswordsDigested Passwords/a for more
   information.  If not specified, passwords are stored in clear text./p
  -  /attribute
  -
  -  attribute name=driverName required=true
  -pThe fully qualified Java class name of the JDBC driver to be used.
  -Consult the documentation for your JDBC driver for the appropriate
  -value./p
 /attribute
   
 attribute name=roleNameCol required=true
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs realm-howto.xml

2002-04-22 Thread remm

remm02/04/22 13:45:52

  Modified:webapps/tomcat-docs Tag: tomcat_40_branch realm-howto.xml
  Log:
  - Fix JDBC URL (bug 7580).
  - Patch submitted by Konrad JagodziƱski konrad at hansin.com.pl
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.2.2.2   +1 -1  jakarta-tomcat-4.0/webapps/tomcat-docs/realm-howto.xml
  
  Index: realm-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/realm-howto.xml,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- realm-howto.xml   26 Mar 2002 14:18:44 -  1.2.2.1
  +++ realm-howto.xml   22 Apr 2002 20:45:52 -  1.2.2.2
  @@ -280,7 +280,7 @@
   source
   lt;Realm className=org.apache.catalina.realm.JDBCRealm debug=99
 driverName=org.gjt.mm.mysql.Driver
  -   connectionURL=jdbc:mysql://localhost/authority?user=dbuser;password=dbpass
  +   connectionURL=jdbc:mysql://localhost/authority?user=dbuseramp;password=dbpass
  userTable=users userNameCol=user_name userCredCol=user_pass
  userRoleTable=user_roles roleNameCol=role_name/gt;
   /source
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs realm-howto.xml

2002-01-03 Thread remm

remm02/01/03 05:56:39

  Modified:webapps/tomcat-docs realm-howto.xml
  Log:
  - 5670: fix cut  paste bug.
  
  Revision  ChangesPath
  1.4   +1 -1  jakarta-tomcat-4.0/webapps/tomcat-docs/realm-howto.xml
  
  Index: realm-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/realm-howto.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- realm-howto.xml   12 Nov 2001 21:03:49 -  1.3
  +++ realm-howto.xml   3 Jan 2002 13:56:38 -   1.4
  @@ -399,7 +399,7 @@
 attribute name=className required=true
   pThe fully qualified Java class name of this Realm implementation.
   You strongMUST/strong specify the value
  -codeorg.apache.catalina.realm.JDBCRealm/code here./p
  +codeorg.apache.catalina.realm.JNDIRealm/code here./p
 /attribute
   
 attribute name=connectionName required=true
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs realm-howto.xml

2001-09-06 Thread ccain

ccain   01/09/06 16:06:43

  Modified:webapps/tomcat-docs realm-howto.xml
  Log:
  Typo correction.
  
  Revision  ChangesPath
  1.2   +1 -1  jakarta-tomcat-4.0/webapps/tomcat-docs/realm-howto.xml
  
  Index: realm-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/realm-howto.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- realm-howto.xml   2001/09/06 03:43:12 1.1
  +++ realm-howto.xml   2001/09/06 23:06:43 1.2
  @@ -129,7 +129,7 @@
   
   pstrongJDBCRealm/strong is an implementation of the Tomcat 4
   codeRealm/code interface that looks up users in a relational database
  -accessed via a JDBC driver.  There is substantial conviguration flexibility
  +accessed via a JDBC driver.  There is substantial configuration flexibility
   that lets you adapt to existing table and column names, as long as your
   database structure conforms to the following requirements:/p
   ul
  
  
  



cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs realm-howto.xml

2001-09-05 Thread craigmcc

craigmcc01/09/05 20:43:12

  Modified:.RELEASE-PLAN-4.0.txt
   catalina/src/share/org/apache/catalina/realm JDBCRealm.java
JNDIRealm.java RealmBase.java
  Added:   webapps/tomcat-docs realm-howto.xml
  Log:
  Add the initial version of the 'realm-howto.xml' document describing how
  to use all three of the standard Realm implementations (JDBCRealm,
  JNDIRealm, and MemoryRealm).
  
  Migrate the static Digest() method, and the convenience main() method,
  from JDBCRealm to RealmBase because it is useful in all of the standard
  implementations.
  
  Revision  ChangesPath
  1.5   +5 -1  jakarta-tomcat-4.0/RELEASE-PLAN-4.0.txt
  
  Index: RELEASE-PLAN-4.0.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/RELEASE-PLAN-4.0.txt,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RELEASE-PLAN-4.0.txt  2001/09/05 19:45:27 1.4
  +++ RELEASE-PLAN-4.0.txt  2001/09/06 03:43:11 1.5
  @@ -1,4 +1,4 @@
  -$Id: RELEASE-PLAN-4.0.txt,v 1.4 2001/09/05 19:45:27 craigmcc Exp $
  +$Id: RELEASE-PLAN-4.0.txt,v 1.5 2001/09/06 03:43:11 craigmcc Exp $
   
 Release Plan for Apache Tomcat 4.0
 ==
  @@ -52,6 +52,8 @@
   
   Catalina3292Class reloading fails (awaiting test case)
   
  +Catalina3443Class reloading fails for servlets that use JNI
  +
   Connectors  1788mod_webapp errors on Win2k
   
   Connectors  2997Webapp connector should recover when Tomcat is restarted
  @@ -98,6 +100,8 @@
   Catalina3285Tomcat 4.0-b5 class loader fails on IBM JDK
   
   Catalina3293Allow content lengths  2^31
  +
  +Catalina3434NT/2K Service installation on JDK 1.4 b2 fails 
   
   Jasper  3055jsp:plugin tag ignores the name attribute
   
  
  
  
  1.17  +1 -46 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java
  
  Index: JDBCRealm.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JDBCRealm.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- JDBCRealm.java2001/07/22 20:25:11 1.16
  +++ JDBCRealm.java2001/09/06 03:43:11 1.17
  @@ -95,7 +95,7 @@
   * @author Craig R. McClanahan
   * @author Carson McDonald
   * @author Ignacio Ortega
  -* @version $Revision: 1.16 $ $Date: 2001/07/22 20:25:11 $
  +* @version $Revision: 1.17 $ $Date: 2001/09/06 03:43:11 $
   */
   
   public class JDBCRealm
  @@ -587,9 +587,6 @@
   }
   
   
  -//  Private Methods
  -
  -
   // -- Lifecycle Methods
   
   
  @@ -634,47 +631,5 @@
   
   }
   
  -/**
  - * Digest password using the algorithm especificied and
  - * convert the result to a corresponding hex string.
  - * If exception, the plain credentials string is returned
  - *
  - * @param credentials Password or other credentials to use in
  - *  authenticating this username
  - * @param algorithm Algorithm used to do th digest
  - */
  -public final static String Digest(String credentials, String algorithm) {
  -try {
  -// Obtain a new message digest with digest encryption
  -MessageDigest md =
  -(MessageDigest)MessageDigest.getInstance(algorithm).clone();
  -// encode the credentials
  -md.update(credentials.getBytes());
   
  -// Digest the credentials and return as hexadecimal
  -return (HexUtils.convert(md.digest()));
  -} catch(Exception ex) {
  -ex.printStackTrace();
  -return credentials;
  -}
  -}
  -
  -/**
  - * Digest password using the algorithm especificied and
  - * convert the result to a corresponding hex string.
  - * If exception, the plain credentials string is returned
  - *
  - * @see JDBCRealm#Digest
  - */
  -public static void main(String args[]) {
  -if(args.length  2  args[0].equalsIgnoreCase(-a)) {
  -for(int i=2; i  args.length ; i++){
  -System.out.print(args[i]+:);
  -System.out.println(Digest(args[i], args[1]));
  -}
  -} else {
  -System.out.println(Usage: JDBCRealm -a algorithm credentials);
  -}
  -}
   }
  -
  
  
  
  1.3   +2 -2  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
  
  Index: JNDIRealm.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java,v
  retrieving revision 1.2