You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2002/02/15 22:13:19 UTC

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4 Ajp13Connector.java Ajp13Request.java

remm        02/02/15 13:13:19

  Modified:    jk/java/org/apache/ajp/tomcat4 Ajp13Connector.java
                        Ajp13Request.java
  Log:
  - Add a 'tomcatAuthentication' flag, which defaults to true.
  - If the flag is true, Tomcat is 100% responsible of the authentication. If false,
    the user authenticated by the native webserver will be used.
  - This new flag will be added in the docs, after reviewing.
  - I didn't know I would end up contributing stuff to JK ;-)
  
  Revision  Changes    Path
  1.13      +31 -4     jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Connector.java
  
  Index: Ajp13Connector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Connector.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Ajp13Connector.java	7 Feb 2002 00:44:40 -0000	1.12
  +++ Ajp13Connector.java	15 Feb 2002 21:13:19 -0000	1.13
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Connector.java,v 1.12 2002/02/07 00:44:40 costin Exp $
  - * $Revision: 1.12 $
  - * $Date: 2002/02/07 00:44:40 $
  + * $Header: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Connector.java,v 1.13 2002/02/15 21:13:19 remm Exp $
  + * $Revision: 1.13 $
  + * $Date: 2002/02/15 21:13:19 $
    *
    * ====================================================================
    *
  @@ -93,7 +93,7 @@
    * Implementation of an Ajp13 connector.
    *
    * @author Kevin Seguin
  - * @version $Revision: 1.12 $ $Date: 2002/02/07 00:44:40 $
  + * @version $Revision: 1.13 $ $Date: 2002/02/15 21:13:19 $
    */
   
   
  @@ -273,6 +273,14 @@
   
       private String secret = null;
   
  +
  +    /**
  +     * Tomcat authentication flag. If true, the authnetication is done by
  +     * Tomcat, otherwise, it is done by the native webserver.
  +     */
  +    private boolean tomcatAuthentication = true;
  +
  +
       // ------------------------------------------------------------- Properties
   
   
  @@ -623,6 +631,7 @@
   
       }
   
  +
       /**
        * Returns the <code>Service</code> with which we are associated.
        */
  @@ -630,12 +639,30 @@
   	return service;
       }
   
  +
       /**
        * Set the <code>Service</code> with which we are associated.
        */
       public void setService(Service service) {
   	this.service = service;
       }
  +
  +
  +    /**
  +     * Get the value of the tomcatAuthentication flag.
  +     */
  +    public boolean getTomcatAuthentication() {
  +        return tomcatAuthentication;
  +    }
  +
  +
  +    /**
  +     * Set the value of the tomcatAuthentication flag.
  +     */
  +    public void setTomcatAuthentication(boolean tomcatAuthentication) {
  +        this.tomcatAuthentication = tomcatAuthentication;
  +    }
  +
   
       // --------------------------------------------------------- Public Methods
   
  
  
  
  1.8       +3 -3      jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Request.java
  
  Index: Ajp13Request.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Request.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Ajp13Request.java	15 Feb 2002 00:54:43 -0000	1.7
  +++ Ajp13Request.java	15 Feb 2002 21:13:19 -0000	1.8
  @@ -112,9 +112,9 @@
           setServerName(ajp.serverName().toString());
           setServerPort(ajp.getServerPort());
   
  -        String remoteUser = ajp.remoteUser().toString();
  -        if ((remoteUser != null) && (!(remoteUser.equals("")))) {
  -            setUserPrincipal(new Ajp13Principal(remoteUser));
  +        if ((!(((Ajp13Connector) connector).getTomcatAuthentication())) 
  +            && (ajp.remoteUser() != null)) {
  +            setUserPrincipal(new Ajp13Principal(ajp.remoteUser().toString()));
           } else {
               setUserPrincipal(null);
           }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4 Ajp13Connector.java Ajp13Request.java

Posted by co...@covalent.net.
On 15 Feb 2002 remm@apache.org wrote:

> remm        02/02/15 13:13:19
> 
>   Modified:    jk/java/org/apache/ajp/tomcat4 Ajp13Connector.java
>                         Ajp13Request.java
>   Log:
>   - Add a 'tomcatAuthentication' flag, which defaults to true.
>   - If the flag is true, Tomcat is 100% responsible of the authentication. If false,
>     the user authenticated by the native webserver will be used.
>   - This new flag will be added in the docs, after reviewing.
>   - I didn't know I would end up contributing stuff to JK ;-)

Now we just need to get you involved in jk2, and maybe in the native
 code :-)


Costin
 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>