svn commit: r1626942 - /tomcat/maven-plugin/branches/tc8.x/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/MavenWebappClassLoader.java

2014-09-22 Thread olamy
Author: olamy
Date: Tue Sep 23 05:13:31 2014
New Revision: 1626942

URL: http://svn.apache.org/r1626942
Log:
class not needed

Removed:

tomcat/maven-plugin/branches/tc8.x/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/MavenWebappClassLoader.java


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1626941 - in /tomcat/maven-plugin/branches/tc8.x/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run: AbstractRunMojo.java RunMojo.java

2014-09-22 Thread olamy
Author: olamy
Date: Tue Sep 23 05:00:15 2014
New Revision: 1626941

URL: http://svn.apache.org/r1626941
Log:
get classloader resources from reactor modules as well second part

Modified:

tomcat/maven-plugin/branches/tc8.x/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractRunMojo.java

tomcat/maven-plugin/branches/tc8.x/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunMojo.java

Modified: 
tomcat/maven-plugin/branches/tc8.x/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractRunMojo.java
URL: 
http://svn.apache.org/viewvc/tomcat/maven-plugin/branches/tc8.x/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractRunMojo.java?rev=1626941&r1=1626940&r2=1626941&view=diff
==
--- 
tomcat/maven-plugin/branches/tc8.x/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractRunMojo.java
 (original)
+++ 
tomcat/maven-plugin/branches/tc8.x/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractRunMojo.java
 Tue Sep 23 05:00:15 2014
@@ -806,8 +806,6 @@ public abstract class AbstractRunMojo
 this.log = log;
 }
 
-
-
 @Override
 public WebResource getResource( String path )
 {
@@ -864,6 +862,8 @@ public abstract class AbstractRunMojo
 log.debug( "MyDirContext#getResourcesInternal: " + path );
 return super.getResourcesInternal( path, useClassLoaderResources );
 }
+
+
 }
 
 /**

Modified: 
tomcat/maven-plugin/branches/tc8.x/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunMojo.java
URL: 
http://svn.apache.org/viewvc/tomcat/maven-plugin/branches/tc8.x/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunMojo.java?rev=1626941&r1=1626940&r2=1626941&view=diff
==
--- 
tomcat/maven-plugin/branches/tc8.x/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunMojo.java
 (original)
+++ 
tomcat/maven-plugin/branches/tc8.x/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunMojo.java
 Tue Sep 23 05:00:15 2014
@@ -359,6 +359,16 @@ public class RunMojo
 url = pluginRealm.getResource( 
StringUtils.removeStart( path, "/" ) );
 }
 
+// try in reactors
+List webResources = 
findResourcesInDirectories( path, //
+   
  classLoaderEntriesCalculatorResult.getBuildDirectories() );
+
+// so we return the first one
+if ( !webResources.isEmpty() )
+{
+return webResources.get( 0 );
+}
+
 if ( url == null )
 {
 return new EmptyResource( this, getPath() );



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1626940 - in /tomcat/maven-plugin/branches/tc8.x: ./ common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/ tomcat8-maven-plugin/src/main/java/org/apache/tomcat/mave

2014-09-22 Thread olamy
Author: olamy
Date: Tue Sep 23 05:00:07 2014
New Revision: 1626940

URL: http://svn.apache.org/r1626940
Log:
get classloader resources from reactor modules as well

Modified:

tomcat/maven-plugin/branches/tc8.x/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/ClassLoaderEntriesCalculatorResult.java

tomcat/maven-plugin/branches/tc8.x/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
tomcat/maven-plugin/branches/tc8.x/pom.xml

tomcat/maven-plugin/branches/tc8.x/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractRunMojo.java

tomcat/maven-plugin/branches/tc8.x/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunMojo.java

Modified: 
tomcat/maven-plugin/branches/tc8.x/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/ClassLoaderEntriesCalculatorResult.java
URL: 
http://svn.apache.org/viewvc/tomcat/maven-plugin/branches/tc8.x/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/ClassLoaderEntriesCalculatorResult.java?rev=1626940&r1=1626939&r2=1626940&view=diff
==
--- 
tomcat/maven-plugin/branches/tc8.x/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/ClassLoaderEntriesCalculatorResult.java
 (original)
+++ 
tomcat/maven-plugin/branches/tc8.x/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/ClassLoaderEntriesCalculatorResult.java
 Tue Sep 23 05:00:07 2014
@@ -37,10 +37,23 @@ public class ClassLoaderEntriesCalculato
  */
 private List tmpDirectories;
 
-public ClassLoaderEntriesCalculatorResult( List classPathEntries, 
List tmpDirectories )
+
+/**
+ * directory part of webapp classpath (project.build.directory and reactor 
projects)
+ */
+private List buildDirectories;
+
+/**
+ * @param classPathEntries
+ * @param tmpDirectories
+ * @param buildDirectories
+ */
+public ClassLoaderEntriesCalculatorResult( List classPathEntries, 
List tmpDirectories,
+   List buildDirectories )
 {
 this.classPathEntries = classPathEntries;
 this.tmpDirectories = tmpDirectories;
+this.buildDirectories = buildDirectories;
 }
 
 public List getClassPathEntries()
@@ -62,4 +75,9 @@ public class ClassLoaderEntriesCalculato
 {
 this.tmpDirectories = tmpDirectories;
 }
+
+public List getBuildDirectories()
+{
+return buildDirectories;
+}
 }

Modified: 
tomcat/maven-plugin/branches/tc8.x/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
URL: 
http://svn.apache.org/viewvc/tomcat/maven-plugin/branches/tc8.x/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java?rev=1626940&r1=1626939&r2=1626940&view=diff
==
--- 
tomcat/maven-plugin/branches/tc8.x/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
 (original)
+++ 
tomcat/maven-plugin/branches/tc8.x/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
 Tue Sep 23 05:00:07 2014
@@ -45,7 +45,7 @@ import java.util.Set;
  * @author Olivier Lamy
  * @since 2.0
  */
-@Component (role = ClassLoaderEntriesCalculator.class)
+@Component( role = ClassLoaderEntriesCalculator.class )
 public class DefaultClassLoaderEntriesCalculator
 implements ClassLoaderEntriesCalculator
 {
@@ -63,10 +63,12 @@ public class DefaultClassLoaderEntriesCa
 
 List tmpDirectories = new ArrayList();
 
+List buildDirectories = new ArrayList();
+
 // add classes directories to loader
 try
 {
-@SuppressWarnings ("unchecked") List classPathElements = 
request.isUseTestClassPath()
+@SuppressWarnings( "unchecked" ) List classPathElements = 
request.isUseTestClassPath()
 ? request.getMavenProject().getTestClasspathElements()
 : request.getMavenProject().getRuntimeClasspathElements();
 if ( classPathElements != null )
@@ -79,6 +81,7 @@ public class DefaultClassLoaderEntriesCa
 request.getLog().debug(
 "adding classPathElementFile " + 
classPathElementFile.toURI().toString() );
 classLoaderEntries.add( 
classPathElementFile.toURI().toString() );
+buildDirectories.add( classPathElement );
 }
 }
 }
@@ -101,15 +104,15 @@ public class DefaultClassLoaderEntriesCa
 String scope = artifact.getScope();
 
 // skip prov

Re: Discussion of pluggable password-derivation in Realms [Bug 56403]

2014-09-22 Thread Gabriel E. Sánchez Martínez


On 09/17/2014 04:36 AM, Mark Thomas wrote:

On 16/09/2014 22:14, Christopher Schultz wrote:

Mark,

On 9/16/14 3:39 PM, Mark Thomas wrote:

Updated patch:
http://people.apache.org/~markt/patches/2014-09-16-bug56403-tc8-v2.patch

It's looking good!

Looks good, but its missing a configuration for the digester to actually
read the configuration and set-up the CredentialHandler objects at
runtime. Existing MessageDigest-based configs will work, but explicit
class references won't.

Ack. The docs need updating as well.


Speaking of which, I'd like to be able to nest CredentialHandler
instances. The use case is when switching from one type of
password-derivation method to another. We have done this at $work twice
and being able to handle more than one kind of valid credential in the
database is essential.

OK. That seems like a reasonable requirement.


Given that we are giving better options to users than standard
single-pass MessageDigest password-mutators, we should help them
migrate. The only way to do that would be something like
CombinedCredentialHandler analogous to the CombinedRealm: you will
accept either MessageDigestCredentiaHandler{SHA1} /or/, say, PBKDF,
bcrypt, etc., by checking one CredentialHandler and then the second (or
third?) if the first one fails.
This would be good.  One could have an array of CredentialHandler to 
check in order.  Is the idea that a password stored in an old format 
would be matched using the old CredentialHandler and (upon first match) 
stored in the upgraded format (the first CredentialHandler)? I assume 
the same idea goes for when the same CredentialHandler is used but the 
number of iterations has changed.


Use of a CombinedCredentialHandler might result in a lot of spurious
warnings in the log about invalid credentials. Maybe the
CombinedCredentialHandler could tell the individual child
CredentialHandlers that they should not log invalid credentials?

Yes, we'll need to make sure the logs don't fill up with false positives.

+1



I'd like to get some other opinions on the public mutate() interface. I
think we might not be able to convince each other ;)

You might be surprised. I was looking at using mutate() from match to
reduce code duplication but if you limit mutate() to just generating new
passwords then I agree there is no need for any other parameters. A
protected method used by both mutate() and match() should work. I'll
take another look.
Without giving an opinion about what method should be called when, I 
agree that salt size and iteration count should be taken from the stored 
credential when matching.  If the latest configuration asks for a 
different algorithm, salt size, or iteration count, then the supplied 
cleartext password should be re-hashed to the latest specs.


Regarding thread safety for the SecureRandom, we can do that now. It
doesn't cost us very much and it prevents it tripping us up in the future.

Mark


I saw that String.equals(String s) is being used.  I'm not familiar with 
the implementation but I imagine that if the string lengths differ or if 
the first characters don't match, for example, the method returns false 
without checking the rest of the characters. Perhaps that could lead to 
a small vulnerability in which through many attempts and timing an an 
attacker  can infer whether the password length, etc. is right.  I've 
seen some implementations use a SecureEquals that tries to take 
approximately the same time by comparing all characters of the strings 
even if the lengths or first characters don't match.  Is this a real 
concern, or only theory?


Gabriel

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1626908 - in /tomcat/tc7.0.x/trunk: ./ webapps/docs/windows-auth-howto.xml

2014-09-22 Thread kkolinko
Author: kkolinko
Date: Mon Sep 22 21:59:21 2014
New Revision: 1626908

URL: http://svn.apache.org/r1626908
Log:
Correct a typo

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1626905

Modified: tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml?rev=1626908&r1=1626907&r2=1626908&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml Mon Sep 22 
21:59:21 2014
@@ -146,7 +146,7 @@ DEV.LOCAL = {
 dev.local= DEV.LOCAL
 .dev.local= DEV.LOCAL
   The location of this file can be changed by setting the
-  java.security.krb5.conf systm property.
+  java.security.krb5.conf system property.
   Create the JAAS login configuration file
   $CATALINA_BASE/conf/jaas.conf. The file used in this how-to
   contained:com.sun.security.jgss.krb5.initiate {



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1626905 - /tomcat/trunk/webapps/docs/windows-auth-howto.xml

2014-09-22 Thread kkolinko
Author: kkolinko
Date: Mon Sep 22 21:58:08 2014
New Revision: 1626905

URL: http://svn.apache.org/r1626905
Log:
Correct a typo

Modified:
tomcat/trunk/webapps/docs/windows-auth-howto.xml

Modified: tomcat/trunk/webapps/docs/windows-auth-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/windows-auth-howto.xml?rev=1626905&r1=1626904&r2=1626905&view=diff
==
--- tomcat/trunk/webapps/docs/windows-auth-howto.xml (original)
+++ tomcat/trunk/webapps/docs/windows-auth-howto.xml Mon Sep 22 21:58:08 2014
@@ -146,7 +146,7 @@ DEV.LOCAL = {
 dev.local= DEV.LOCAL
 .dev.local= DEV.LOCAL
   The location of this file can be changed by setting the
-  java.security.krb5.conf systm property.
+  java.security.krb5.conf system property.
   Create the JAAS login configuration file
   $CATALINA_BASE/conf/jaas.conf. The file used in this how-to
   contained:com.sun.security.jgss.krb5.initiate {



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[jira] [Created] (MTOMCAT-280) Allow running deploy-only and redeploy-only goals without pom file

2014-09-22 Thread Lauri Lehtinen (JIRA)
Lauri Lehtinen created MTOMCAT-280:
--

 Summary: Allow running deploy-only and redeploy-only goals without 
pom file
 Key: MTOMCAT-280
 URL: https://issues.apache.org/jira/browse/MTOMCAT-280
 Project: Apache Tomcat Maven Plugin
  Issue Type: Improvement
  Components: tomcat7
Reporter: Lauri Lehtinen
Assignee: Olivier Lamy (*$^¨%`£)


Use case is as follows:

0. A 2-step CI build exists for the sole purpose of deploying any artifact to a 
remote tomcat server
1. Run mvn dependency:get -D... -D... to download a war file from Nexus.
2. Run mvn tomcat7:deploy -D... -D... to deploy the war file.

I would prefer to not involve a pom file in this. However, if the plugin 
doesn't find one, it fail.s

Also, it appears that all the properties I need, except warFile, can be 
overriden with -D's. The only way I'm able to make this work is create a dummy 
pom file with tomcat7 plugin defined in the build section, and a 
${warFile} in its configuration section.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1626894 - in /tomcat/tc7.0.x/trunk: ./ webapps/docs/changelog.xml webapps/docs/windows-auth-howto.xml

2014-09-22 Thread markt
Author: markt
Date: Mon Sep 22 21:04:42 2014
New Revision: 1626894

URL: http://svn.apache.org/r1626894
Log:
Update the Windows authentication documentation after some additional testing 
to answer the remaining questions.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1626893

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1626894&r1=1626893&r2=1626894&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Sep 22 21:04:42 2014
@@ -273,6 +273,10 @@
 represents the idle time immediately below the maximum permitted idle
 time when using the expire command of the Manager application. (markt) 
   
+  
+Update the Windows authentication documentation after some additional
+testing to answer the remaining questions. (markt)
+  
 
   
   

Modified: tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml?rev=1626894&r1=1626893&r2=1626894&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/windows-auth-howto.xml Mon Sep 22 
21:04:42 2014
@@ -53,27 +53,25 @@ sections.
 
 Kerberos (the basis for integrated Windows authentication) requires careful
 configuration. If the steps in this guide are followed exactly, then a working
-configuration will result. There may be some flexibility in some of the steps
-below but further testing is required to explore this. From the testing to date
-it is known that:
+configuration will result. It is important that the steps below are followed
+exactly. There is very little scope for flexibility in the configuration. From
+the testing to date it is known that:
 
-The host name of the Tomcat server must match the host name in the SPN
-exactly else authentication will fail. A checksum error may be reported in the
-debug logs in this case.
+The host name used to access the Tomcat server must match the host name in
+the SPN exactly else authentication will fail. A checksum error may be reported
+in the debug logs in this case.
 The client must be of the view that the server is part of the local trusted
 intranet.
-The SPN does not have to start with HTTP but the SPN must be the same in 
all
-the files it is used.
+The SPN must be HTTP/ and it must be exactly the same in 
all
+the places it is used.
+The port number must not be included in the SPN.
 No more than one SPN may be mapped to a domain user.
-
-The areas where further testing is required include:
-
-Does the domain name have to be in upper case?
-Can a port number be appended to the end of the host in the SPN?
-Can the domain be left off the user in the ktpass command?
-What are the limitations on the account that Tomcat can run as? SPN
-associated account works, domain admin works, local admin doesn't
-work
+Tomcat must run as the domain account with which the SPN has been 
associated
+or as domain admin. It is NOT recommended to run Tomcat under 
a
+domain admin user.
+The domain name (DEV.LOCAL) is not case sensitive when used in
+the ktpass command, nor when used in jaas.conf
+The domain must be specified when using the ktpass command
 
 There are four components to the configuration of the built-in Tomcat
 support for Windows authentication. The domain controller, the server hosting



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1626893 - in /tomcat/trunk/webapps/docs: changelog.xml windows-auth-howto.xml

2014-09-22 Thread markt
Author: markt
Date: Mon Sep 22 21:03:37 2014
New Revision: 1626893

URL: http://svn.apache.org/r1626893
Log:
Update the Windows authentication documentation after some additional testing 
to answer the remaining questions.

Modified:
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/windows-auth-howto.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1626893&r1=1626892&r2=1626893&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Sep 22 21:03:37 2014
@@ -222,6 +222,10 @@
 Add JarScanner to the nested components listed for a
 Context. (markt)
   
+  
+Update the Windows authentication documentation after some additional
+testing to answer the remaining questions. (markt)
+  
 
   
   

Modified: tomcat/trunk/webapps/docs/windows-auth-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/windows-auth-howto.xml?rev=1626893&r1=1626892&r2=1626893&view=diff
==
--- tomcat/trunk/webapps/docs/windows-auth-howto.xml (original)
+++ tomcat/trunk/webapps/docs/windows-auth-howto.xml Mon Sep 22 21:03:37 2014
@@ -53,27 +53,25 @@ sections.
 
 Kerberos (the basis for integrated Windows authentication) requires careful
 configuration. If the steps in this guide are followed exactly, then a working
-configuration will result. There may be some flexibility in some of the steps
-below but further testing is required to explore this. From the testing to date
-it is known that:
+configuration will result. It is important that the steps below are followed
+exactly. There is very little scope for flexibility in the configuration. From
+the testing to date it is known that:
 
-The host name of the Tomcat server must match the host name in the SPN
-exactly else authentication will fail. A checksum error may be reported in the
-debug logs in this case.
+The host name used to access the Tomcat server must match the host name in
+the SPN exactly else authentication will fail. A checksum error may be reported
+in the debug logs in this case.
 The client must be of the view that the server is part of the local trusted
 intranet.
-The SPN does not have to start with HTTP but the SPN must be the same in 
all
-the files it is used.
+The SPN must be HTTP/ and it must be exactly the same in 
all
+the places it is used.
+The port number must not be included in the SPN.
 No more than one SPN may be mapped to a domain user.
-
-The areas where further testing is required include:
-
-Does the domain name have to be in upper case?
-Can a port number be appended to the end of the host in the SPN?
-Can the domain be left off the user in the ktpass command?
-What are the limitations on the account that Tomcat can run as? SPN
-associated account works, domain admin works, local admin doesn't
-work
+Tomcat must run as the domain account with which the SPN has been 
associated
+or as domain admin. It is NOT recommended to run Tomcat under 
a
+domain admin user.
+The domain name (DEV.LOCAL) is not case sensitive when used in
+the ktpass command, nor when used in jaas.conf
+The domain must be specified when using the ktpass command
 
 There are four components to the configuration of the built-in Tomcat
 support for Windows authentication. The domain controller, the server hosting



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 57004] New: Get number of stuck threads from StuckThreadDetectionValve through jmx

2014-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57004

Bug ID: 57004
   Summary: Get number of stuck threads from
StuckThreadDetectionValve through jmx
   Product: Tomcat 8
   Version: trunk
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: jiri.pejc...@gmail.com

It would be nice if the number of stuck threads reported by
StuckThreadDetectionValve was available through jmx (e.g. stuckThreadCount).

The number of stuck threads is stored in the stuckCount variable. However there
is no jmx attribute for it, there is only getter for stuckThreadIds which is
long[].


I usually use tool like jmxtrans to get the value and plot a graph with
graphite.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1625854 - /tomcat/trunk/webapps/docs/windows-auth-howto.xml

2014-09-22 Thread Mark Thomas
On 22/09/2014 20:48, Mark Thomas wrote:
> On 22/09/2014 20:44, Felix Schumacher wrote:



>> I am still wondering how it should work with anything other than HTTP/... 
>> since the client is requesting a ticket for HTTP/... before it is getting 
>> any information about the spn from the server and the server should be able 
>> to decrypt the service ticket with an appropiate spn ticket only.
> 
> Is it though? I wonder. If I get a few minutes, I'll fire the VMs back
> up and start up Wireshark to see exactly what is going on.
> 
>> Starting the server with any ticket will work of course. The fun starts, 
>> when requests arrive. 
>>
>> But if it works for you, I will not say anything more on this. 
> 
> ACK.

Interesting...

The more I dig into this, the more I wish I hadn't. Trying to figure out
what is actually going on based on observed behaviour is non-trivial to
say the least.

It appears that the domain user has to have the "correct" SPN set. i.e.
"HTTP/fqdn". The SPN used in the keytab file and the jass.conf have to
agree with each other but they do not have to be the same as the SPN
associated with the domain user. There are obvious advantages (for
figuring out what on earth is going on) if they are the same. I don't
think I am even going to document this possibility.

The reason this appeared to be working before was that I had multiple
SPNs set on the domain user and didn't realise.

As I have the VMs up and running I'll answer a few more of the questions
on the Windows auth page and then update it.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1625854 - /tomcat/trunk/webapps/docs/windows-auth-howto.xml

2014-09-22 Thread Mark Thomas
On 22/09/2014 20:44, Felix Schumacher wrote:
> 
> 
> On 22. September 2014 21:12:39 MESZ, Mark Thomas  wrote:
>> On 22/09/2014 18:07, Felix Schumacher wrote:
>>> Am 21.09.2014 um 20:41 schrieb Mark Thomas:
 On 21/09/2014 14:05, Felix Schumacher wrote:
> Hi Mark,
>
> Am 18.09.2014 um 01:40 schrieb ma...@apache.org:
>> Author: markt
>> Date: Wed Sep 17 23:40:48 2014
>> New Revision: 1625854
>>
>> URL: http://svn.apache.org/r1625854
>> Log:
>> After double-checking SPN to domain user is a one to one mapping
>>
>> Modified:
>>   tomcat/trunk/webapps/docs/windows-auth-howto.xml
>>
>> Modified: tomcat/trunk/webapps/docs/windows-auth-howto.xml
>> URL:
>>
>> http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/windows-auth-howto.xml?rev=1625854&r1=1625853&r2=1625854&view=diff
>>
>>
>>
>> ==
>>
>>
>> --- tomcat/trunk/webapps/docs/windows-auth-howto.xml (original)
>> +++ tomcat/trunk/webapps/docs/windows-auth-howto.xml Wed Sep 17
>> 23:40:48 2014
>> @@ -64,9 +64,7 @@ debug logs in this case.
>>intranet.
>>The SPN does not have to start with HTTP but the SPN must
>> be the
>> same in all
>>the files it is used.
> I thought that the browser will always prepend HTTP/ to the
>> hostname,
> which it connects. That is what I read from the last paragraph in
>> 4.1 of
> rfc 4559.
>
> Can you tell me where you got the information, that it could be
> anything?
 I tested it.
>>> How did you test it?
>>
>> By following the instructions at:
>> http://tomcat.apache.org/tomcat-8.0-doc/windows-auth-howto.html#Built-in_Tomcat_support
>>
>> but replacing "HTTP/win-tc01.dev.local" first with
>> "HTTPA/win-tc01.dev.local" and then with "XYZ/win-tc01.dev.local"
>>
>> It worked in all cases.
> Which client did you use?

Internet explorer.

>>> It didn't work for me.
>>
>> Given my tests are using Windows AD and your test wasn't that isn;t a
>> huge surprise.
> 
> It should work the same.

In an ideal world, yes. But this is Microsoft software...

>>> I set up my kerberos server (apacheds running on
>>> kerberos.example.com:60088) and inserted an object with a SPN
>>> XYZ/www.example.com.
>>> Then I created a keytab with only one entry, namely
>> XYZ/www.example.com.
>>> After that I edited jaas.conf and krb5.ini (both in
>> $CATALINA_BASE/conf)
>>> to use XYZ/www.example.com instead of HTTP/www.example.com and
>> changed
>>> the keytab entries to the new keytab.
>>> Now I started jmeter to do a request to a secured page and...it
>> didn't
>>> authenticate.
>>>
>>> Before I tested the setup with HTTP/www.example.com and it did work.
>>> After the failed test, I changed the entries back to
>>> HTTP/www.example.com and the original keytab and it worked again.
>>
>> I'd double check you got all those changes right but I am not entirely
>> surprised.
>>
>> If you confirm your results that this doesn't work with apache DS then
>> I'll update the docs with some suitable words.
> 
> I am still wondering how it should work with anything other than HTTP/... 
> since the client is requesting a ticket for HTTP/... before it is getting any 
> information about the spn from the server and the server should be able to 
> decrypt the service ticket with an appropiate spn ticket only.

Is it though? I wonder. If I get a few minutes, I'll fire the VMs back
up and start up Wireshark to see exactly what is going on.

> Starting the server with any ticket will work of course. The fun starts, when 
> requests arrive. 
> 
> But if it works for you, I will not say anything more on this. 

ACK.

Mark


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1625854 - /tomcat/trunk/webapps/docs/windows-auth-howto.xml

2014-09-22 Thread Felix Schumacher


On 22. September 2014 21:12:39 MESZ, Mark Thomas  wrote:
>On 22/09/2014 18:07, Felix Schumacher wrote:
>> Am 21.09.2014 um 20:41 schrieb Mark Thomas:
>>> On 21/09/2014 14:05, Felix Schumacher wrote:
 Hi Mark,

 Am 18.09.2014 um 01:40 schrieb ma...@apache.org:
> Author: markt
> Date: Wed Sep 17 23:40:48 2014
> New Revision: 1625854
>
> URL: http://svn.apache.org/r1625854
> Log:
> After double-checking SPN to domain user is a one to one mapping
>
> Modified:
>   tomcat/trunk/webapps/docs/windows-auth-howto.xml
>
> Modified: tomcat/trunk/webapps/docs/windows-auth-howto.xml
> URL:
>
>http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/windows-auth-howto.xml?rev=1625854&r1=1625853&r2=1625854&view=diff
>
>
>
>==
>
>
> --- tomcat/trunk/webapps/docs/windows-auth-howto.xml (original)
> +++ tomcat/trunk/webapps/docs/windows-auth-howto.xml Wed Sep 17
> 23:40:48 2014
> @@ -64,9 +64,7 @@ debug logs in this case.
>intranet.
>The SPN does not have to start with HTTP but the SPN must
>be the
> same in all
>the files it is used.
 I thought that the browser will always prepend HTTP/ to the
>hostname,
 which it connects. That is what I read from the last paragraph in
>4.1 of
 rfc 4559.

 Can you tell me where you got the information, that it could be
 anything?
>>> I tested it.
>> How did you test it?
>
>By following the instructions at:
>http://tomcat.apache.org/tomcat-8.0-doc/windows-auth-howto.html#Built-in_Tomcat_support
>
>but replacing "HTTP/win-tc01.dev.local" first with
>"HTTPA/win-tc01.dev.local" and then with "XYZ/win-tc01.dev.local"
>
>It worked in all cases.
Which client did you use?

>
>> It didn't work for me.
>
>Given my tests are using Windows AD and your test wasn't that isn;t a
>huge surprise.

It should work the same. 

>
>> I set up my kerberos server (apacheds running on
>> kerberos.example.com:60088) and inserted an object with a SPN
>> XYZ/www.example.com.
>> Then I created a keytab with only one entry, namely
>XYZ/www.example.com.
>> After that I edited jaas.conf and krb5.ini (both in
>$CATALINA_BASE/conf)
>> to use XYZ/www.example.com instead of HTTP/www.example.com and
>changed
>> the keytab entries to the new keytab.
>> Now I started jmeter to do a request to a secured page and...it
>didn't
>> authenticate.
>> 
>> Before I tested the setup with HTTP/www.example.com and it did work.
>> After the failed test, I changed the entries back to
>> HTTP/www.example.com and the original keytab and it worked again.
>
>I'd double check you got all those changes right but I am not entirely
>surprised.
>
>If you confirm your results that this doesn't work with apache DS then
>I'll update the docs with some suitable words.

I am still wondering how it should work with anything other than HTTP/... since 
the client is requesting a ticket for HTTP/... before it is getting any 
information about the spn from the server and the server should be able to 
decrypt the service ticket with an appropiate spn ticket only.

Starting the server with any ticket will work of course. The fun starts, when 
requests arrive. 

But if it works for you, I will not say anything more on this. 

Felix
>
>Mark
>
>
>-
>To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
>For additional commands, e-mail: dev-h...@tomcat.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1625854 - /tomcat/trunk/webapps/docs/windows-auth-howto.xml

2014-09-22 Thread Mark Thomas
On 22/09/2014 18:07, Felix Schumacher wrote:
> Am 21.09.2014 um 20:41 schrieb Mark Thomas:
>> On 21/09/2014 14:05, Felix Schumacher wrote:
>>> Hi Mark,
>>>
>>> Am 18.09.2014 um 01:40 schrieb ma...@apache.org:
 Author: markt
 Date: Wed Sep 17 23:40:48 2014
 New Revision: 1625854

 URL: http://svn.apache.org/r1625854
 Log:
 After double-checking SPN to domain user is a one to one mapping

 Modified:
   tomcat/trunk/webapps/docs/windows-auth-howto.xml

 Modified: tomcat/trunk/webapps/docs/windows-auth-howto.xml
 URL:
 http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/windows-auth-howto.xml?rev=1625854&r1=1625853&r2=1625854&view=diff


 ==


 --- tomcat/trunk/webapps/docs/windows-auth-howto.xml (original)
 +++ tomcat/trunk/webapps/docs/windows-auth-howto.xml Wed Sep 17
 23:40:48 2014
 @@ -64,9 +64,7 @@ debug logs in this case.
intranet.
The SPN does not have to start with HTTP but the SPN must be the
 same in all
the files it is used.
>>> I thought that the browser will always prepend HTTP/ to the hostname,
>>> which it connects. That is what I read from the last paragraph in 4.1 of
>>> rfc 4559.
>>>
>>> Can you tell me where you got the information, that it could be
>>> anything?
>> I tested it.
> How did you test it?

By following the instructions at:
http://tomcat.apache.org/tomcat-8.0-doc/windows-auth-howto.html#Built-in_Tomcat_support

but replacing "HTTP/win-tc01.dev.local" first with
"HTTPA/win-tc01.dev.local" and then with "XYZ/win-tc01.dev.local"

It worked in all cases.

> It didn't work for me.

Given my tests are using Windows AD and your test wasn't that isn;t a
huge surprise.

> I set up my kerberos server (apacheds running on
> kerberos.example.com:60088) and inserted an object with a SPN
> XYZ/www.example.com.
> Then I created a keytab with only one entry, namely XYZ/www.example.com.
> After that I edited jaas.conf and krb5.ini (both in $CATALINA_BASE/conf)
> to use XYZ/www.example.com instead of HTTP/www.example.com and changed
> the keytab entries to the new keytab.
> Now I started jmeter to do a request to a secured page and...it didn't
> authenticate.
> 
> Before I tested the setup with HTTP/www.example.com and it did work.
> After the failed test, I changed the entries back to
> HTTP/www.example.com and the original keytab and it worked again.

I'd double check you got all those changes right but I am not entirely
surprised.

If you confirm your results that this doesn't work with apache DS then
I'll update the docs with some suitable words.

Mark


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 56871] Apparent corruption of Servlet InputStreams

2014-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56871

--- Comment #8 from Mark Thomas  ---
I also can't repeat this on:

- Physical Server 2008 R2, 64-bit Java 1.7.0_67

- Virtual (VMware Fusion) Ubuntu 14.04.1 LTS, 3.13.0-15, 64-bit Java 1.7.0_60

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1625854 - /tomcat/trunk/webapps/docs/windows-auth-howto.xml

2014-09-22 Thread Felix Schumacher

Am 21.09.2014 um 20:41 schrieb Mark Thomas:

On 21/09/2014 14:05, Felix Schumacher wrote:

Hi Mark,

Am 18.09.2014 um 01:40 schrieb ma...@apache.org:

Author: markt
Date: Wed Sep 17 23:40:48 2014
New Revision: 1625854

URL: http://svn.apache.org/r1625854
Log:
After double-checking SPN to domain user is a one to one mapping

Modified:
  tomcat/trunk/webapps/docs/windows-auth-howto.xml

Modified: tomcat/trunk/webapps/docs/windows-auth-howto.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/windows-auth-howto.xml?rev=1625854&r1=1625853&r2=1625854&view=diff

==

--- tomcat/trunk/webapps/docs/windows-auth-howto.xml (original)
+++ tomcat/trunk/webapps/docs/windows-auth-howto.xml Wed Sep 17
23:40:48 2014
@@ -64,9 +64,7 @@ debug logs in this case.
   intranet.
   The SPN does not have to start with HTTP but the SPN must be the
same in all
   the files it is used.

I thought that the browser will always prepend HTTP/ to the hostname,
which it connects. That is what I read from the last paragraph in 4.1 of
rfc 4559.

Can you tell me where you got the information, that it could be anything?

I tested it.

How did you test it?

It didn't work for me.

I set up my kerberos server (apacheds running on 
kerberos.example.com:60088) and inserted an object with a SPN 
XYZ/www.example.com.

Then I created a keytab with only one entry, namely XYZ/www.example.com.
After that I edited jaas.conf and krb5.ini (both in $CATALINA_BASE/conf) 
to use XYZ/www.example.com instead of HTTP/www.example.com and changed 
the keytab entries to the new keytab.
Now I started jmeter to do a request to a secured page and...it didn't 
authenticate.


Before I tested the setup with HTTP/www.example.com and it did work. 
After the failed test, I changed the entries back to 
HTTP/www.example.com and the original keytab and it worked again.


Regards
 Felix


Mark


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org




-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 56990] ant ide-eclipse target shall download easymock library

2014-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56990

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
 OS||All

--- Comment #1 from Mark Thomas  ---
Fixed in 8.0.x for 8.0.13 onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1626779 - in /tomcat/trunk: build.xml webapps/docs/changelog.xml

2014-09-22 Thread markt
Author: markt
Date: Mon Sep 22 14:01:19 2014
New Revision: 1626779

URL: http://svn.apache.org/r1626779
Log:
Ensure that the ide-eclipse build target downloads all the libraries required 
by the default Eclipse configuration files.
Also, avoid triggering targets that are not necessary to create a working 
Eclipse project.

Modified:
tomcat/trunk/build.xml
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1626779&r1=1626778&r2=1626779&view=diff
==
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Mon Sep 22 14:01:19 2014
@@ -2888,7 +2888,8 @@ Apache Tomcat ${version} native binaries
 
   
 
-  
 
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1626779&r1=1626778&r2=1626779&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Sep 22 14:01:19 2014
@@ -235,6 +235,10 @@
 56988: Allow to use relative path in base.path
 setting when building Tomcat. (kkolinko)
   
+  
+Ensure that the ide-eclipse build target downloads 
all
+the libraries required by the default Eclipse configuration 
files.
+  
 
   
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1626765 - in /tomcat/trunk: java/javax/websocket/Session.java java/org/apache/tomcat/websocket/Util.java java/org/apache/tomcat/websocket/WsSession.java res/META-INF/websocket-api.jar.man

2014-09-22 Thread markt
Author: markt
Date: Mon Sep 22 13:09:57 2014
New Revision: 1626765

URL: http://svn.apache.org/r1626765
Log:
Update WebSocket implementation to version 1.1 of the spec

Modified:
tomcat/trunk/java/javax/websocket/Session.java
tomcat/trunk/java/org/apache/tomcat/websocket/Util.java
tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java
tomcat/trunk/res/META-INF/websocket-api.jar.manifest
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/javax/websocket/Session.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/Session.java?rev=1626765&r1=1626764&r2=1626765&view=diff
==
--- tomcat/trunk/java/javax/websocket/Session.java (original)
+++ tomcat/trunk/java/javax/websocket/Session.java Mon Sep 22 13:09:57 2014
@@ -31,8 +31,22 @@ public interface Session extends Closeab
  */
 WebSocketContainer getContainer();
 
-void addMessageHandler(MessageHandler listener)
-throws IllegalStateException;
+/**
+ * Registers a {@link MessageHandler} for incoming messages. Only one
+ * {@link MessageHandler} may be registered for each message type (text,
+ * binary, pong). The message type will be derived at runtime from the
+ * provided {@link MessageHandler} instance. It is not always possible to 
do
+ * this so it is better to use
+ * {@link #addMessageHandler(Class, 
javax.websocket.MessageHandler.Partial)}
+ * or
+ * {@link #addMessageHandler(Class, javax.websocket.MessageHandler.Whole)}.
+ *
+ * @param listener  The message handler for a incoming message
+ *
+ * @throws IllegalStateException  If a message handler has already been
+ *registered for the associated message 
type
+ */
+void addMessageHandler(MessageHandler listener) throws 
IllegalStateException;
 
 Set getMessageHandlers();
 
@@ -126,4 +140,34 @@ public interface Session extends Closeab
  * this session is associated with.
  */
 Set getOpenSessions();
+
+/**
+ * Registers a {@link MessageHandler} for partial incoming messages. Only
+ * one {@link MessageHandler} may be registered for each message type (text
+ * or binary, pong messages are never presented as partial messages).
+ *
+ * @param clazz The type of message that the given handler is intended
+ *  for
+ * @param listener  The message handler for a incoming message
+ *
+ * @throws IllegalStateException  If a message handler has already been
+ *registered for the associated message 
type
+ */
+ void addMessageHandler(Class clazz, MessageHandler.Partial 
handler)
+throws IllegalStateException;
+
+/**
+ * Registers a {@link MessageHandler} for whole incoming messages. Only
+ * one {@link MessageHandler} may be registered for each message type 
(text,
+ * binary, pong).
+ *
+ * @param clazz The type of message that the given handler is intended
+ *  for
+ * @param listener  The message handler for a incoming message
+ *
+ * @throws IllegalStateException  If a message handler has already been
+ *registered for the associated message 
type
+ */
+ void addMessageHandler(Class clazz, MessageHandler.Whole handler)
+throws IllegalStateException;
 }

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/Util.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/Util.java?rev=1626765&r1=1626764&r2=1626765&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/Util.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/Util.java Mon Sep 22 13:09:57 
2014
@@ -353,12 +353,10 @@ public class Util {
 }
 
 
-static Set getMessageHandlers(
+static Set getMessageHandlers(Class target,
 MessageHandler listener, EndpointConfig endpointConfig,
 Session session) {
 
-Class target = Util.getMessageType(listener);
-
 // Will never be more than 2 types
 Set results = new HashSet<>(2);
 

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java?rev=1626765&r1=1626764&r2=1626765&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java Mon Sep 22 
13:09:57 2014
@@ -37,6 +37,8 @@ import javax.websocket.Endpoint;
 import javax.websocket.EndpointConfig;
 import javax.websocket.Extension;
 import javax.websocket.MessageHandler;
+import javax.websocket.MessageHandler.Parti

svn commit: r1626764 - /tomcat/trunk/java/org/apache/tomcat/websocket/Util.java

2014-09-22 Thread markt
Author: markt
Date: Mon Sep 22 13:00:59 2014
New Revision: 1626764

URL: http://svn.apache.org/r1626764
Log:
Reduce visibility for some methods.
No API issues since this class is clearly documented to be for internal use 
only.

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/Util.java

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/Util.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/Util.java?rev=1626764&r1=1626763&r2=1626764&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/Util.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/Util.java Mon Sep 22 13:00:59 
2014
@@ -172,7 +172,7 @@ public class Util {
 }
 
 
-public static Class getDecoderType(Class decoder) {
+private static Class getDecoderType(Class decoder) {
 return Util.getGenericType(Decoder.class, decoder).getClazz();
 }
 
@@ -353,7 +353,7 @@ public class Util {
 }
 
 
-public static Set getMessageHandlers(
+static Set getMessageHandlers(
 MessageHandler listener, EndpointConfig endpointConfig,
 Session session) {
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1626748 - /tomcat/trunk/res/META-INF/websocket-api.jar.manifest

2014-09-22 Thread markt
Author: markt
Date: Mon Sep 22 12:10:19 2014
New Revision: 1626748

URL: http://svn.apache.org/r1626748
Log:
Correct package (it was changed during the development of 1.0)

Modified:
tomcat/trunk/res/META-INF/websocket-api.jar.manifest

Modified: tomcat/trunk/res/META-INF/websocket-api.jar.manifest
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/META-INF/websocket-api.jar.manifest?rev=1626748&r1=1626747&r2=1626748&view=diff
==
--- tomcat/trunk/res/META-INF/websocket-api.jar.manifest (original)
+++ tomcat/trunk/res/META-INF/websocket-api.jar.manifest Mon Sep 22 12:10:19 
2014
@@ -6,6 +6,6 @@ Name: javax/websocket/
 Specification-Title: WebSocket
 Specification-Version: 1.0
 Specification-Vendor: Oracle, Inc.
-Implementation-Title: javax.net.websocket
+Implementation-Title: javax.websocket
 Implementation-Version: 1.0.@websocket.revision@
 Implementation-Vendor: Apache Software Foundation



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1626747 - /tomcat/trunk/res/META-INF/websocket-api.jar.manifest

2014-09-22 Thread markt
Author: markt
Date: Mon Sep 22 12:09:36 2014
New Revision: 1626747

URL: http://svn.apache.org/r1626747
Log:
Fix copy/paste error

Modified:
tomcat/trunk/res/META-INF/websocket-api.jar.manifest

Modified: tomcat/trunk/res/META-INF/websocket-api.jar.manifest
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/META-INF/websocket-api.jar.manifest?rev=1626747&r1=1626746&r2=1626747&view=diff
==
--- tomcat/trunk/res/META-INF/websocket-api.jar.manifest (original)
+++ tomcat/trunk/res/META-INF/websocket-api.jar.manifest Mon Sep 22 12:09:36 
2014
@@ -2,7 +2,7 @@ Manifest-version: 1.0
 X-Compile-Source-JDK: @source.jdk@
 X-Compile-Target-JDK: @target.jdk@
 
-Name: javax/el/
+Name: javax/websocket/
 Specification-Title: WebSocket
 Specification-Version: 1.0
 Specification-Vendor: Oracle, Inc.



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 56991] Request attribute org.apache.catalina.jsp_file needs to be nulled out after single use

2014-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56991

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Mark Thomas  ---
This has been fixed in 8.0.x and 8.0.13 onwards and in 7.0.x for 7.0.56
onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1626742 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/Constants.java java/org/apache/jasper/servlet/JspServlet.java webapps/docs/changelog.xml webapps/docs/config/systemprops.xml

2014-09-22 Thread markt
Author: markt
Date: Mon Sep 22 11:44:15 2014
New Revision: 1626742

URL: http://svn.apache.org/r1626742
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56991
Deprecate the use of a request attribute to pass a  declaration to 
Jasper and prevent an infinite loop if this technique is used in conjunction 
with an include.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/jasper/Constants.java
tomcat/tc7.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/config/systemprops.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1626741

Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/Constants.java?rev=1626742&r1=1626741&r2=1626742&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/jasper/Constants.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/Constants.java Mon Sep 22 
11:44:15 2014
@@ -74,8 +74,11 @@ public class Constants {
  * servlet definition.  If present on a request, this overrides the
  * value returned by request.getServletPath() to select
  * the JSP page to be executed.
+ * @deprecated  This will be removed in Tomcat 9.0.x onwards. It is 
replaced
+ *  by the use of the jspFile servlet initialisation parameter
  */
-public static final String JSP_FILE = 
+@Deprecated
+public static final String JSP_FILE =
 System.getProperty("org.apache.jasper.Constants.JSP_FILE", 
"org.apache.catalina.jsp_file");
 
 

Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java?rev=1626742&r1=1626741&r2=1626742&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java Mon Sep 
22 11:44:15 2014
@@ -276,6 +276,7 @@ public class JspServlet extends HttpServ
 }
 
 
+@SuppressWarnings("deprecation") // Use of JSP_FILE to be removed in 9.0.x
 @Override
 public void service (HttpServletRequest request, 
  HttpServletResponse response)
@@ -284,9 +285,13 @@ public class JspServlet extends HttpServ
 String jspUri = jspFile;
 
 if (jspUri == null) {
-// JSP specified via  in  declaration and 
supplied through
-//custom servlet container code
-jspUri = (String) request.getAttribute(Constants.JSP_FILE);
+// JSP specified via  in  declaration and
+// supplied through custom servlet container code
+String jspFile = (String) request.getAttribute(Constants.JSP_FILE);
+if (jspFile != null) {
+jspUri = jspFile;
+request.removeAttribute(Constants.JSP_FILE);
+}
 }
 if (jspUri == null) {
 /*

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1626742&r1=1626741&r2=1626742&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Sep 22 11:44:15 2014
@@ -215,6 +215,11 @@
 files. Reported by Coverity Scan. Based on patch provided by Felix
 Schumacher. (violetagg)
   
+  
+56991: Deprecate the use of a request attribute to pass a
+ declaration to Jasper and prevent an infinite loop
+if this technique is used in conjunction with an include. (markt)
+  
 
   
   

Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/systemprops.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/systemprops.xml?rev=1626742&r1=1626741&r2=1626742&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/config/systemprops.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/config/systemprops.xml Mon Sep 22 
11:44:15 2014
@@ -194,6 +194,9 @@
   JSP page to be executed.
   If not specified, the default value of
   org.apache.catalina.jsp_file will be used.
+  Deprecated: This will be removed in Tomcat 9.0.x
+  onwards. It is replaced by the use of the jspFile servlet initialisation
+  parameter
 
 
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.or

svn commit: r1626741 - in /tomcat/trunk: java/org/apache/jasper/Constants.java java/org/apache/jasper/servlet/JspServlet.java webapps/docs/changelog.xml webapps/docs/config/systemprops.xml

2014-09-22 Thread markt
Author: markt
Date: Mon Sep 22 11:41:06 2014
New Revision: 1626741

URL: http://svn.apache.org/r1626741
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56991
Deprecate the use of a request attribute to pass a  declaration to 
Jasper and prevent an infinite loop if this technique is used in conjunction 
with an include.

Modified:
tomcat/trunk/java/org/apache/jasper/Constants.java
tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/systemprops.xml

Modified: tomcat/trunk/java/org/apache/jasper/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/Constants.java?rev=1626741&r1=1626740&r2=1626741&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/Constants.java (original)
+++ tomcat/trunk/java/org/apache/jasper/Constants.java Mon Sep 22 11:41:06 2014
@@ -69,7 +69,10 @@ public class Constants {
  * servlet definition.  If present on a request, this overrides the
  * value returned by request.getServletPath() to select
  * the JSP page to be executed.
+ * @deprecated  This will be removed in Tomcat 9.0.x onwards. It is 
replaced
+ *  by the use of the jspFile servlet initialisation parameter
  */
+@Deprecated
 public static final String JSP_FILE =
 System.getProperty("org.apache.jasper.Constants.JSP_FILE", 
"org.apache.catalina.jsp_file");
 

Modified: tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java?rev=1626741&r1=1626740&r2=1626741&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java (original)
+++ tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java Mon Sep 22 
11:41:06 2014
@@ -276,6 +276,7 @@ public class JspServlet extends HttpServ
 }
 
 
+@SuppressWarnings("deprecation") // Use of JSP_FILE to be removed in 9.0.x
 @Override
 public void service (HttpServletRequest request,
  HttpServletResponse response)
@@ -285,9 +286,13 @@ public class JspServlet extends HttpServ
 String jspUri = jspFile;
 
 if (jspUri == null) {
-// JSP specified via  in  declaration and 
supplied through
-//custom servlet container code
-jspUri = (String) request.getAttribute(Constants.JSP_FILE);
+// JSP specified via  in  declaration and
+// supplied through custom servlet container code
+String jspFile = (String) request.getAttribute(Constants.JSP_FILE);
+if (jspFile != null) {
+jspUri = jspFile;
+request.removeAttribute(Constants.JSP_FILE);
+}
 }
 if (jspUri == null) {
 /*

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1626741&r1=1626740&r2=1626741&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Sep 22 11:41:06 2014
@@ -189,6 +189,11 @@
 Fix a potential resource leak in JDTCompiler when checking wether
 a resource is a package. Reported by Coverity Scan. (fschumacher)
   
+  
+56991: Deprecate the use of a request attribute to pass a
+ declaration to Jasper and prevent an infinite loop
+if this technique is used in conjunction with an include. (markt)
+  
 
   
   

Modified: tomcat/trunk/webapps/docs/config/systemprops.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/systemprops.xml?rev=1626741&r1=1626740&r2=1626741&view=diff
==
--- tomcat/trunk/webapps/docs/config/systemprops.xml (original)
+++ tomcat/trunk/webapps/docs/config/systemprops.xml Mon Sep 22 11:41:06 2014
@@ -198,6 +198,9 @@
   JSP page to be executed.
   If not specified, the default value of
   org.apache.catalina.jsp_file will be used.
+  Deprecated: This will be removed in Tomcat 9.0.x
+  onwards. It is replaced by the use of the jspFile servlet initialisation
+  parameter
 
 
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 56991] Request attribute org.apache.catalina.jsp_file needs to be nulled out after single use

2014-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56991

--- Comment #1 from Mark Thomas  ---
A little svn archeology discovered r1003589 where the use of this attribute was
removed.

I'll apply the suggested fix and deprecate this attribute so it can be removed
in 9.0.x.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 56995] Errors from servlet writer flush() causing threads in BLOCK state

2014-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56995

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Mark Thomas  ---
You have two threads trying to write to the socket at the same time. That is
not permitted.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 57001] test

2014-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57001

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID
 OS||All

--- Comment #1 from Mark Thomas  ---
Another day, another idiot blocked.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1626726 - /tomcat/tc6.0.x/trunk/STATUS.txt

2014-09-22 Thread kkolinko
Author: kkolinko
Date: Mon Sep 22 10:45:59 2014
New Revision: 1626726

URL: http://svn.apache.org/r1626726
Log:
proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1626726&r1=1626725&r2=1626726&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Sep 22 10:45:59 2014
@@ -117,6 +117,20 @@ PATCHES PROPOSED TO BACKPORT:
   +1: kkolinko
   -1:
 
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56988
+  Allow to use relative path in base.path setting when
+  building Tomcat.
+
+  Tested with Ant 1.8.0.
+
+  Motivation: Allow to simplify configuration of automated CI tools that
+  may run in different environments, e.g. Buildbot.
+
+  https://issues.apache.org/bugzilla/attachment.cgi?id=32041
+  +1: kkolinko
+  -1:
+
+
 
 PATCHES/ISSUES THAT ARE STALLED:
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 56988] Allow to use relative paths in base.path setting when building Tomcat, e.g. "base.path=../libraries"

2014-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56988

--- Comment #2 from Konstantin Kolinko  ---
Created attachment 32041
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=32041&action=edit
2014-09-22_tc6_56988.patch

Patch for Tomcat 6
Tested with Ant 1.8.0

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 57001] New: test

2014-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57001

Bug ID: 57001
   Summary: test
   Product: Tomcat 8
   Version: 8.0.8
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Cluster
  Assignee: dev@tomcat.apache.org
  Reporter: tester333.test...@gmail.com

test

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 56397] Establish parallel Maven-based build process

2014-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56397

--- Comment #19 from Mark Thomas  ---
(In reply to Pierre Viret from comment #18)
> Would it be possible for me to commit to the sandbox/trunk-maven-layout
> repository?

Not until the dev community decides to offer you committership ;)

> I don't know how I can try & test the svn externals without
> being able to commit to the repository. This is due to the fact that one has
> to update the svn:external property, commit then perform an update to get
> the files checked out through the externals.
> What do you think? Do you have a solution for this?

Yes. The restriction is that the directory on which the external is defined
must be in svn. The property does not need to be checked in for the external to
work. I suggest you create a patch that adds all the necessary empty
directories to the existing structure. I (or another committer) can then commit
it. With that in place you can experiment with externals.

> Maybe an alternative would be to create my own local svn repository so that
> I can commit there and import the head of trunk of the
> sandbox/tomcat-maven-layout directory there. But I fear that it would get
> messy and very difficult to synchronize my changes back to the official
> repository...

Agreed.

On the subject of IDEs and POM level filters, most IDEs allow you to filter out
unwanted sources so we could provide sample IDE configs - like we do for the
main Tomcat build - in a suitable location.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1626707 - /tomcat/tc6.0.x/trunk/STATUS.txt

2014-09-22 Thread kkolinko
Author: kkolinko
Date: Mon Sep 22 09:16:53 2014
New Revision: 1626707

URL: http://svn.apache.org/r1626707
Log:
proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1626707&r1=1626706&r2=1626707&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Sep 22 09:16:53 2014
@@ -95,6 +95,29 @@ PATCHES PROPOSED TO BACKPORT:
   +1: kkolinko
   -1:
 
+* Update documented minimum Ant version to use at build time to be 1.8.0
+
+  Motivation: Align documentation with code.
+
+  - Compatibility with Ant 1.6.5 was broken 6 years ago by r673614,
+as "osfamily" attribute of  task is since Ant 1.7.0.
+Running `ant -f dist.xml` with Ant 1.6.5 fails with
+.../dist.xml:403: The  type doesn't support the "osfamily" attribute.
+  
+  - Compatibility with Ant 1.7.x was broken 8 months ago by r1557724
+as  task supports arbitrary collections such as 
+since Ant 1.8.
+Running `ant -f dist.xml` with Ant 1.7.0, 1.7.1 fails with
+.../dist.xml:239: The following error occurred while executing this line:
+.../dist.xml:258: replace doesn't support the nested "restrict" element.
+
+  - Builds successfully with Ant 1.8.0.
+
+  https://people.apache.org/~kkolinko/patches/2014-09-22_tc6_Ant180.patch
+  +1: kkolinko
+  -1:
+
+
 PATCHES/ISSUES THAT ARE STALLED:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44312



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Early Access builds for JDK 9 b31 and JDK 8u40 b06 are available on java.net

2014-09-22 Thread Rory O'Donnell Oracle, Dublin Ireland

Hi Mladen/Mark,

Early Access build for JDK 9 b31   is 
available on java.net, summary of changes are listed here 



Early Access build for JDK 8u40 b06  
is available on java.net, summary of changes are listed here. 



Rgds,Rory

--
Rgds,Rory O'Donnell
Quality Engineering Manager
Oracle EMEA , Dublin, Ireland