Re: Repeatable builds

2022-03-23 Thread Christopher Schultz

Mark,

On 3/22/22 15:30, Mark Thomas wrote:

On 22/03/2022 19:06, Christopher Schultz wrote:

On 3/22/22 13:12, Mark Thomas wrote:




The JSign Ant task that adds the detached signature doesn't close the 
signed file. This causes problems for Ant. I've opened a JSign issue 
[2] for this. I have a locally build version with a hack that fixes 
the issue so I can continue testing.


Do you mean it doesn't call OutputStream.close()? Shouldn't that be 
cleaned up when the process exits?


Effectively, yes. The problem is that the Ant task runs in process so 
the file is still open when the next Ant target tries to work with the 
file. You won't notice the issue running JSign from the command line.


Can we run the jsign task with fork="true" or is there too much 
information in the ant process's memory that would need to be 
insecurely-sent to the jsign process to be prudent?


If it were just the full docs package, I don't think I'd worry too 
much about the Javadoc issue but the Windows installer is more of a 
problem. Therefore, I plan to work on a custom Ant task that will fix 
these zip files by setting the timestamps on the compressed files to 
be the same as the timestamp used by the rest of the build.


Can  not be used to do this?


No. The Javadoc task generates a file then zips it. We need to change 
the timestamp of the file(s) inside the created zip.


??
$ ant javadoc

Dumps everything into output/dist/webapps/docs/, no ZIP files. The 
"javadoc" target executes  tasks and that's it.


What am I missing?


- anyone can build a release from the tag and will get a build that
   includes a signed Windows installer


Oh, that last part is clever, which of course is the whole point of the
detached signatures.


When it is finally working it is going to be really nice. We'll 
effectively have a way for anyone to build from source and confirm that 
they have exactly the same bits as the official release. If provides a 
great way to demonstrate that the RM hasn't tampered with the binaries.


+1

Hopefully, anything Java 11 or later with e.g. "-actlike 1.7" will 
produce binary-identical artifacts. If not, merely stating that a 
particular build was done with some exact JDK version should be enough.


Hopefully we'll be able to find a way to be reasonably flexible on Java 
versions but we'll have to see.


As long as some other party who wishes to confirm the release hasn't 
been tampered-with will be able to use the same toolchain, assuming it's 
documented properly. This is what non-Java projects do for 
repeatability. You can't get the same bytes when using gcc versus clang, 
for example. Same with various versions of those things.


The release-build should probably auto-generate a report of the 
build-chain used to build the release.


Nice idea.

Other potential improvements to the build process I've been 
considering making:


1. $ ant prep-release
Generates a new build.properties file, build-release.properties which 
contains a few useful items:

ant.tstamp.now=[timestamp to be used for repeatable build]
version.suffix= (intentionally blank)
release.asfuser=[username of the user rolling the release]
release.jdk=[details of build environment, perhaps additional items]
release.os=[ibid]

Then modify the build script to include build-release.properties 
before any others and ignore the file if it's missing.


Also this will generate res/maven/build-release.properties which will 
include:

asf.ldap.username
maven.asf.release.deploy.version
gpg.exec

There's no reason these items can't be computed from the outer build 
process and used inside there. It eliminates a few steps for the 
person doing the release.


2. Re-name res/maven/mvn-pub.xml -> build.xml

This saves unnecessary typing during the release. I'll probably 
actually move the file, then create a new one in its place pointing to 
the new one, in case some other downstream process needs that file to 
be in-place.


I doubt that will be necessary. The file is very specific to how the ASF 
is set up.


3. Read build-release.properties in build.xml (nee mvn-pub.xml) as 
well as build.properties and build.properties.default. 
build.properties should be almost unnecessary at this point.


4. Document the mail build s in build.xml (nee mvn-pub.xml)

I'm sure there are other things I've been thinking of. These are the 
ones I have in the front of my mind.


Sounds good. Anything that makes the release process easier is a good 
thing (although compared to what it used to be like the current process 
is a breeze).


:)

Okay, I'll try to do those in advance of the next releases.

-chris

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



Re: Repeatable builds

2022-03-23 Thread Mark Thomas

On 23/03/2022 16:11, Christopher Schultz wrote:

Mark,

On 3/22/22 15:30, Mark Thomas wrote:

On 22/03/2022 19:06, Christopher Schultz wrote:

On 3/22/22 13:12, Mark Thomas wrote:




The JSign Ant task that adds the detached signature doesn't close 
the signed file. This causes problems for Ant. I've opened a JSign 
issue [2] for this. I have a locally build version with a hack that 
fixes the issue so I can continue testing.


Do you mean it doesn't call OutputStream.close()? Shouldn't that be 
cleaned up when the process exits?


Effectively, yes. The problem is that the Ant task runs in process so 
the file is still open when the next Ant target tries to work with the 
file. You won't notice the issue running JSign from the command line.


Can we run the jsign task with fork="true" or is there too much 
information in the ant process's memory that would need to be 
insecurely-sent to the jsign process to be prudent?


I don't think it supports it. If it did, that would be another workaround.

No. The Javadoc task generates a file then zips it. We need to change 
the timestamp of the file(s) inside the created zip.


??
$ ant javadoc

Dumps everything into output/dist/webapps/docs/, no ZIP files. The 
"javadoc" target executes  tasks and that's it.


What am I missing?


Look in the individual Javadoc directories. Each one has (I think) 3 zip 
files that contain various indexes.



Hopefully, anything Java 11 or later with e.g. "-actlike 1.7" will 
produce binary-identical artifacts. If not, merely stating that a 
particular build was done with some exact JDK version should be enough.


Hopefully we'll be able to find a way to be reasonably flexible on 
Java versions but we'll have to see.


As long as some other party who wishes to confirm the release hasn't 
been tampered-with will be able to use the same toolchain, assuming it's 
documented properly. This is what non-Java projects do for 
repeatability. You can't get the same bytes when using gcc versus clang, 
for example. Same with various versions of those things.


Same tool-chain should definitely work. But I'd still like to see how 
much flexibility - if any - we have in versions of Java and Ant.


Sounds good. Anything that makes the release process easier is a good 
thing (although compared to what it used to be like the current 
process is a breeze).


:)

Okay, I'll try to do those in advance of the next releases.


Cool.

Mark

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



Re: Repeatable builds

2022-03-23 Thread Christopher Schultz

Mark,

On 3/23/22 12:18, Mark Thomas wrote:

On 23/03/2022 16:11, Christopher Schultz wrote:

??
$ ant javadoc

Dumps everything into output/dist/webapps/docs/, no ZIP files. The 
"javadoc" target executes  tasks and that's it.


What am I missing?


Look in the individual Javadoc directories. Each one has (I think) 3 zip 
files that contain various indexes.


$ ant clean javascript
[...]
$ find output/dist/webapps/docs/ -name "*.zip" -o -name "*.jar"
$

I don't see those. Maybe it's my Java version?

$ java -version
openjdk version "16.0.2" 2021-07-20
OpenJDK Runtime Environment (build 16.0.2+7-67)
OpenJDK 64-Bit Server VM (build 16.0.2+7-67, mixed mode, sharing)

$ head output/dist/webapps/docs/servletapi/index.html





Overview (Servlet {servlet.spec.version} API Documentation - 
Apache Tomcat 10.1.0-M13-dev)






href="script-dir/jquery-ui.min.css" title="Style">
title="Style">


src="script-dir/jquery-3.5.1.min.js">




So it's definitely using the Java 16 javadoc engine.

Hopefully, anything Java 11 or later with e.g. "-actlike 1.7" will 
produce binary-identical artifacts. If not, merely stating that a 
particular build was done with some exact JDK version should be enough.


Hopefully we'll be able to find a way to be reasonably flexible on 
Java versions but we'll have to see.


As long as some other party who wishes to confirm the release hasn't 
been tampered-with will be able to use the same toolchain, assuming 
it's documented properly. This is what non-Java projects do for 
repeatability. You can't get the same bytes when using gcc versus 
clang, for example. Same with various versions of those things.


Same tool-chain should definitely work. But I'd still like to see how 
much flexibility - if any - we have in versions of Java and Ant.


Sounds good. Anything that makes the release process easier is a good 
thing (although compared to what it used to be like the current 
process is a breeze).


:)

Okay, I'll try to do those in advance of the next releases.


Cool.


I'm having some trouble getting  to give me 
current-timestamp-in-seconds. I can get the ISO date just fine.


This SO answer [https://stackoverflow.com/a/25535927/276232] doesn't 
seems to work out--of-the-box; I get an error about not being able to 
initialize the javascript engine.


I tried the obvious pattern="sss" but I just got a bunch of 
zeros followed by the seconds-in-the-current-minute. :/


I have it building the following build-release.properties file:

=== CUT ===
# These ant.tstamp properties specify the build-timestamp for repeatable 
builds.

ant.tstamp.now=41
ant.tstamp.now.iso=2022-03-23T16:48:41Z
# This is the ASF user who is the Release Manager for this release.
release.asfusername=schultz
# Set the version-suffix to "" (empty string) as this is not a 
development release.

version.suffix=
# Release build environment information:
release.java.version=16.0.2
release.java.vm.name=OpenJDK 64-Bit Server VM
release.java.vm.version=16.0.2+7-67
release.os=x86_64 Mac OS X 11.5
release.default.file.encoding=UTF-8
=== CUT ===

So... almost everything I want :)

Any ideas for the "time in seconds" thing? (I may be able to get ant 
working with javascript, but it requires a bunch of dependencies 
including GraalVM, etc. - !!!).


-chris

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



Re: Repeatable builds


Mark,

On 3/22/22 13:12, Mark Thomas wrote:
Finally, I have some minor modifications to buidl.xml that will enable 
repeatable builds. Once everything is in place the build process will 
look like:


- prepare for tagging as currently (update version in
   build.properties.default and edit changelog)
- run a release build to generate the detached signatures
- tag including:
   - modified build.properties.default
   - modified chnagelog.xml
   - 2x .sig files added to res/install-win


So this means we have to build *before* the tag, right? Or do we tag the 
repo, do the build, and then tag again with some other related name?


(If the former, it's nice because sometimes I forget to do a "test 
build" before the tag and then I have to fix something (e.g. checkstyle) 
to allow the build to proceed, and I need to re-tag.)


-chris

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



[GitHub] [tomcat] HoffmannTom opened a new pull request #487: Improved logging of unknown http2 settings



HoffmannTom opened a new pull request #487:
URL: https://github.com/apache/tomcat/pull/487


   The logging of unknown http2 settings should contain the key and the value 
of the setting.
   The key is currently converted into a setting object. Unknown keys are 
mapped to Integer.MAX_VALUE
   Thus the log currently contains the MAX_VALUE as key and the value of the 
settings. The original key got lost during the conversion to the setting object.
   
   Therefore the logging was moved to methods, which have access to the 
original key and the value.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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



[GitHub] [tomcat] rmaucher commented on pull request #487: Improved logging of unknown http2 settings



rmaucher commented on pull request #487:
URL: https://github.com/apache/tomcat/pull/487#issuecomment-1076761134


   Closing since the patch is wrong and I'm already about to commit it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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



[GitHub] [tomcat] rmaucher closed pull request #487: Improved logging of unknown http2 settings



rmaucher closed pull request #487:
URL: https://github.com/apache/tomcat/pull/487


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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



[GitHub] [tomcat] rmaucher commented on pull request #487: Improved logging of unknown http2 settings



rmaucher commented on pull request #487:
URL: https://github.com/apache/tomcat/pull/487#issuecomment-1076764682


   Oh, actually, this has the key -> id change, but it should still do 
Integer.toString(id).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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



[tomcat] branch main updated: PR #487: Improve logging of unknown settings frames

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 23a92d7  PR #487: Improve logging of unknown settings frames
23a92d7 is described below

commit 23a92d7a55cffa58e604f5162403521da3ca5d25
Author: remm 
AuthorDate: Wed Mar 23 21:00:41 2022 +0100

PR #487: Improve logging of unknown settings frames

Pull request by Thomas Hoffmann.
---
 java/org/apache/coyote/http2/ConnectionSettingsBase.java | 2 --
 java/org/apache/coyote/http2/Http2Parser.java| 7 ++-
 java/org/apache/coyote/http2/Http2UpgradeHandler.java| 7 ++-
 webapps/docs/changelog.xml   | 4 
 4 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/http2/ConnectionSettingsBase.java 
b/java/org/apache/coyote/http2/ConnectionSettingsBase.java
index 042fb0c..ef4a200 100644
--- a/java/org/apache/coyote/http2/ConnectionSettingsBase.java
+++ b/java/org/apache/coyote/http2/ConnectionSettingsBase.java
@@ -88,8 +88,6 @@ abstract class ConnectionSettingsBase {
 break;
 case UNKNOWN:
 // Unrecognised. Ignore it.
-log.warn(sm.getString("connectionSettings.unknown",
-connectionId, setting, Long.toString(value)));
 return;
 }
 
diff --git a/java/org/apache/coyote/http2/Http2Parser.java 
b/java/org/apache/coyote/http2/Http2Parser.java
index 5875e28..8c67d84 100644
--- a/java/org/apache/coyote/http2/Http2Parser.java
+++ b/java/org/apache/coyote/http2/Http2Parser.java
@@ -337,7 +337,12 @@ class Http2Parser {
 }
 int id = ByteUtil.getTwoBytes(setting, 0);
 long value = ByteUtil.getFourBytes(setting, 2);
-output.setting(Setting.valueOf(id), value);
+Setting key = Setting.valueOf(id);
+if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+log.warn(sm.getString("connectionSettings.unknown",
+connectionId, Integer.toString(id), 
Long.toString(value)));
+}
+output.setting(key, value);
 }
 }
 output.settingsEnd(ack);
diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index a075c02..49427f5 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -233,7 +233,12 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 for (int i = 0; i < settings.length % 6; i++) {
 int id = ByteUtil.getTwoBytes(settings, i * 6);
 long value = ByteUtil.getFourBytes(settings, (i * 6) + 2);
-remoteSettings.set(Setting.valueOf(id), value);
+Setting key = Setting.valueOf(id);
+if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+log.warn(sm.getString("connectionSettings.unknown",
+connectionId, Integer.toString(id), 
Long.toString(value)));
+}
+remoteSettings.set(key, value);
 }
 } catch (Http2Exception e) {
 throw new ProtocolException(
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c1a69d6..1d55d26 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -125,6 +125,10 @@
 skipping setting it in some cases (for example, it does not make
 sense for OpenSSL TLS 1.3). (remm)
   
+  
+487: Improve logging of unknown settings frames. Pull request
+by Thomas Hoffmann. (remm)
+  
 
   
   

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



Re: Repeatable builds


On 23/03/2022 17:20, Christopher Schultz wrote:

Mark,

On 3/22/22 13:12, Mark Thomas wrote:
Finally, I have some minor modifications to buidl.xml that will enable 
repeatable builds. Once everything is in place the build process will 
look like:


- prepare for tagging as currently (update version in
   build.properties.default and edit changelog)
- run a release build to generate the detached signatures
- tag including:
   - modified build.properties.default
   - modified chnagelog.xml
   - 2x .sig files added to res/install-win


So this means we have to build *before* the tag, right? Or do we tag the 
repo, do the build, and then tag again with some other related name?


(If the former, it's nice because sometimes I forget to do a "test 
build" before the tag and then I have to fix something (e.g. checkstyle) 
to allow the build to proceed, and I need to re-tag.)


Yes, you need to build before the tag to generate the detached 
signatures and then do the actual release build so the source archives 
have the detached signatures.


In other news, I was wrong about the Javadoc issue affecting the Windows 
installer. However, I have fixed the Javadoc issue anyway. I'll be 
committing that shortly since I've spent the time to fix it and it is a 
nice to have.


I'm currently at the point where the build is 100% repeatable cross 
platform (Windows and Linux) if I don't sign the windows installer. 
Something isn't quite right when I sign the installer but I need to 
figure out what that is - probably configuration error on my part.


Mark

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



[GitHub] [tomcat] HoffmannTom commented on pull request #487: Improved logging of unknown http2 settings



HoffmannTom commented on pull request #487:
URL: https://github.com/apache/tomcat/pull/487#issuecomment-1076767607


   Thank you for the quick response and help!
   My second pull request in future will hopefully improve.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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



Re: [tomcat] branch main updated: PR #487: Improve logging of unknown settings frames


On 23/03/2022 20:01, r...@apache.org wrote:




diff --git a/java/org/apache/coyote/http2/Http2Parser.java 
b/java/org/apache/coyote/http2/Http2Parser.java
index 5875e28..8c67d84 100644
--- a/java/org/apache/coyote/http2/Http2Parser.java
+++ b/java/org/apache/coyote/http2/Http2Parser.java
@@ -337,7 +337,12 @@ class Http2Parser {
  }
  int id = ByteUtil.getTwoBytes(setting, 0);
  long value = ByteUtil.getFourBytes(setting, 2);
-output.setting(Setting.valueOf(id), value);
+Setting key = Setting.valueOf(id);
+if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+log.warn(sm.getString("connectionSettings.unknown",


The above two lines are inconsistent. The message is at WARN level so 
the isDebugEnabled() test is not appropriate.


Mark

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



Re: [tomcat] branch main updated: PR #487: Improve logging of unknown settings frames

On Wed, Mar 23, 2022 at 9:04 PM Mark Thomas  wrote:
>
> On 23/03/2022 20:01, r...@apache.org wrote:
>
> 
>
> > diff --git a/java/org/apache/coyote/http2/Http2Parser.java 
> > b/java/org/apache/coyote/http2/Http2Parser.java
> > index 5875e28..8c67d84 100644
> > --- a/java/org/apache/coyote/http2/Http2Parser.java
> > +++ b/java/org/apache/coyote/http2/Http2Parser.java
> > @@ -337,7 +337,12 @@ class Http2Parser {
> >   }
> >   int id = ByteUtil.getTwoBytes(setting, 0);
> >   long value = ByteUtil.getFourBytes(setting, 2);
> > -output.setting(Setting.valueOf(id), value);
> > +Setting key = Setting.valueOf(id);
> > +if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
> > +log.warn(sm.getString("connectionSettings.unknown",
>
> The above two lines are inconsistent. The message is at WARN level so
> the isDebugEnabled() test is not appropriate.

Yes, I already spotted it and changed it back.

That was likely intentional and a bit sneaky ...

Rémy

> 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



[tomcat] branch main updated: Remove check disabling logging

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 3bcbd5a  Remove check disabling logging
3bcbd5a is described below

commit 3bcbd5a9b7b6d52e1d6f85f2f421bb5021c12d66
Author: remm 
AuthorDate: Wed Mar 23 21:03:44 2022 +0100

Remove check disabling logging
---
 java/org/apache/coyote/http2/Http2Parser.java | 2 +-
 java/org/apache/coyote/http2/Http2UpgradeHandler.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2Parser.java 
b/java/org/apache/coyote/http2/Http2Parser.java
index 8c67d84..9a4bf0c 100644
--- a/java/org/apache/coyote/http2/Http2Parser.java
+++ b/java/org/apache/coyote/http2/Http2Parser.java
@@ -338,7 +338,7 @@ class Http2Parser {
 int id = ByteUtil.getTwoBytes(setting, 0);
 long value = ByteUtil.getFourBytes(setting, 2);
 Setting key = Setting.valueOf(id);
-if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+if (key == Setting.UNKNOWN) {
 log.warn(sm.getString("connectionSettings.unknown",
 connectionId, Integer.toString(id), 
Long.toString(value)));
 }
diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 49427f5..64ad129 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -234,7 +234,7 @@ class Http2UpgradeHandler extends AbstractStream implements 
InternalHttpUpgradeH
 int id = ByteUtil.getTwoBytes(settings, i * 6);
 long value = ByteUtil.getFourBytes(settings, (i * 6) + 2);
 Setting key = Setting.valueOf(id);
-if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+if (key == Setting.UNKNOWN) {
 log.warn(sm.getString("connectionSettings.unknown",
 connectionId, Integer.toString(id), 
Long.toString(value)));
 }

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



[tomcat] branch 10.0.x updated (5563753 -> e186391)

This is an automated email from the ASF dual-hosted git repository.

remm pushed a change to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 5563753  65959: Serialize Function as String[] rather Class[]
 new a82ddf0  PR #487: Improve logging of unknown settings frames
 new e186391  Remove check disabling logging

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/coyote/http2/ConnectionSettingsBase.java | 2 --
 java/org/apache/coyote/http2/Http2Parser.java| 7 ++-
 java/org/apache/coyote/http2/Http2UpgradeHandler.java| 7 ++-
 webapps/docs/changelog.xml   | 4 
 4 files changed, 16 insertions(+), 4 deletions(-)

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



[tomcat] 02/02: Remove check disabling logging

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit e186391dc9973e922424193baab46e0c520ac359
Author: remm 
AuthorDate: Wed Mar 23 21:03:44 2022 +0100

Remove check disabling logging
---
 java/org/apache/coyote/http2/Http2Parser.java | 2 +-
 java/org/apache/coyote/http2/Http2UpgradeHandler.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2Parser.java 
b/java/org/apache/coyote/http2/Http2Parser.java
index 8c67d84..9a4bf0c 100644
--- a/java/org/apache/coyote/http2/Http2Parser.java
+++ b/java/org/apache/coyote/http2/Http2Parser.java
@@ -338,7 +338,7 @@ class Http2Parser {
 int id = ByteUtil.getTwoBytes(setting, 0);
 long value = ByteUtil.getFourBytes(setting, 2);
 Setting key = Setting.valueOf(id);
-if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+if (key == Setting.UNKNOWN) {
 log.warn(sm.getString("connectionSettings.unknown",
 connectionId, Integer.toString(id), 
Long.toString(value)));
 }
diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 75bdac1..03dc48c 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -232,7 +232,7 @@ class Http2UpgradeHandler extends AbstractStream implements 
InternalHttpUpgradeH
 int id = ByteUtil.getTwoBytes(settings, i * 6);
 long value = ByteUtil.getFourBytes(settings, (i * 6) + 2);
 Setting key = Setting.valueOf(id);
-if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+if (key == Setting.UNKNOWN) {
 log.warn(sm.getString("connectionSettings.unknown",
 connectionId, Integer.toString(id), 
Long.toString(value)));
 }

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



[tomcat] 01/02: PR #487: Improve logging of unknown settings frames

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit a82ddf0fc42c960f224e7d23eaa90df272de3559
Author: remm 
AuthorDate: Wed Mar 23 21:00:41 2022 +0100

PR #487: Improve logging of unknown settings frames

Pull request by Thomas Hoffmann.
---
 java/org/apache/coyote/http2/ConnectionSettingsBase.java | 2 --
 java/org/apache/coyote/http2/Http2Parser.java| 7 ++-
 java/org/apache/coyote/http2/Http2UpgradeHandler.java| 7 ++-
 webapps/docs/changelog.xml   | 4 
 4 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/http2/ConnectionSettingsBase.java 
b/java/org/apache/coyote/http2/ConnectionSettingsBase.java
index 042fb0c..ef4a200 100644
--- a/java/org/apache/coyote/http2/ConnectionSettingsBase.java
+++ b/java/org/apache/coyote/http2/ConnectionSettingsBase.java
@@ -88,8 +88,6 @@ abstract class ConnectionSettingsBase {
 break;
 case UNKNOWN:
 // Unrecognised. Ignore it.
-log.warn(sm.getString("connectionSettings.unknown",
-connectionId, setting, Long.toString(value)));
 return;
 }
 
diff --git a/java/org/apache/coyote/http2/Http2Parser.java 
b/java/org/apache/coyote/http2/Http2Parser.java
index 5875e28..8c67d84 100644
--- a/java/org/apache/coyote/http2/Http2Parser.java
+++ b/java/org/apache/coyote/http2/Http2Parser.java
@@ -337,7 +337,12 @@ class Http2Parser {
 }
 int id = ByteUtil.getTwoBytes(setting, 0);
 long value = ByteUtil.getFourBytes(setting, 2);
-output.setting(Setting.valueOf(id), value);
+Setting key = Setting.valueOf(id);
+if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+log.warn(sm.getString("connectionSettings.unknown",
+connectionId, Integer.toString(id), 
Long.toString(value)));
+}
+output.setting(key, value);
 }
 }
 output.settingsEnd(ack);
diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 91abf18..75bdac1 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -231,7 +231,12 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 for (int i = 0; i < settings.length % 6; i++) {
 int id = ByteUtil.getTwoBytes(settings, i * 6);
 long value = ByteUtil.getFourBytes(settings, (i * 6) + 2);
-remoteSettings.set(Setting.valueOf(id), value);
+Setting key = Setting.valueOf(id);
+if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+log.warn(sm.getString("connectionSettings.unknown",
+connectionId, Integer.toString(id), 
Long.toString(value)));
+}
+remoteSettings.set(key, value);
 }
 } catch (Http2Exception e) {
 throw new ProtocolException(
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ef25e2d..90dde11 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -120,6 +120,10 @@
 skipping setting it in some cases (for example, it does not make
 sense for OpenSSL TLS 1.3). (remm)
   
+  
+487: Improve logging of unknown settings frames. Pull request
+by Thomas Hoffmann. (remm)
+  
 
   
   

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



[tomcat] branch 9.0.x updated (11ec974 -> cb070df)

This is an automated email from the ASF dual-hosted git repository.

remm pushed a change to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 11ec974  65959: Serialize Function as String[] rather Class[]
 new a3d0dc2  PR #487: Improve logging of unknown settings frames
 new cb070df  Remove check disabling logging

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/coyote/http2/ConnectionSettingsBase.java | 2 --
 java/org/apache/coyote/http2/Http2Parser.java| 7 ++-
 java/org/apache/coyote/http2/Http2UpgradeHandler.java| 7 ++-
 webapps/docs/changelog.xml   | 4 
 4 files changed, 16 insertions(+), 4 deletions(-)

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



[tomcat] 01/02: PR #487: Improve logging of unknown settings frames

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit a3d0dc2e33019bf94edb2992d178fe06b25b8d6a
Author: remm 
AuthorDate: Wed Mar 23 21:00:41 2022 +0100

PR #487: Improve logging of unknown settings frames

Pull request by Thomas Hoffmann.
---
 java/org/apache/coyote/http2/ConnectionSettingsBase.java | 2 --
 java/org/apache/coyote/http2/Http2Parser.java| 7 ++-
 java/org/apache/coyote/http2/Http2UpgradeHandler.java| 7 ++-
 webapps/docs/changelog.xml   | 4 
 4 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/http2/ConnectionSettingsBase.java 
b/java/org/apache/coyote/http2/ConnectionSettingsBase.java
index 042fb0c..ef4a200 100644
--- a/java/org/apache/coyote/http2/ConnectionSettingsBase.java
+++ b/java/org/apache/coyote/http2/ConnectionSettingsBase.java
@@ -88,8 +88,6 @@ abstract class ConnectionSettingsBase {
 break;
 case UNKNOWN:
 // Unrecognised. Ignore it.
-log.warn(sm.getString("connectionSettings.unknown",
-connectionId, setting, Long.toString(value)));
 return;
 }
 
diff --git a/java/org/apache/coyote/http2/Http2Parser.java 
b/java/org/apache/coyote/http2/Http2Parser.java
index edc48ac..485adae 100644
--- a/java/org/apache/coyote/http2/Http2Parser.java
+++ b/java/org/apache/coyote/http2/Http2Parser.java
@@ -337,7 +337,12 @@ class Http2Parser {
 }
 int id = ByteUtil.getTwoBytes(setting, 0);
 long value = ByteUtil.getFourBytes(setting, 2);
-output.setting(Setting.valueOf(id), value);
+Setting key = Setting.valueOf(id);
+if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+log.warn(sm.getString("connectionSettings.unknown",
+connectionId, Integer.toString(id), 
Long.toString(value)));
+}
+output.setting(key, value);
 }
 }
 output.settingsEnd(ack);
diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 2dd439a..7d4810f 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -231,7 +231,12 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 for (int i = 0; i < settings.length % 6; i++) {
 int id = ByteUtil.getTwoBytes(settings, i * 6);
 long value = ByteUtil.getFourBytes(settings, (i * 6) + 2);
-remoteSettings.set(Setting.valueOf(id), value);
+Setting key = Setting.valueOf(id);
+if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+log.warn(sm.getString("connectionSettings.unknown",
+connectionId, Integer.toString(id), 
Long.toString(value)));
+}
+remoteSettings.set(key, value);
 }
 } catch (Http2Exception e) {
 throw new ProtocolException(
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f80a030..d79481a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -120,6 +120,10 @@
 skipping setting it in some cases (for example, it does not make
 sense for OpenSSL TLS 1.3). (remm)
   
+  
+487: Improve logging of unknown settings frames. Pull request
+by Thomas Hoffmann. (remm)
+  
 
   
   

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



[tomcat] 02/02: Remove check disabling logging

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit cb070df1ed877cc2025a483c73a01c69d3c4b4f9
Author: remm 
AuthorDate: Wed Mar 23 21:03:44 2022 +0100

Remove check disabling logging
---
 java/org/apache/coyote/http2/Http2Parser.java | 2 +-
 java/org/apache/coyote/http2/Http2UpgradeHandler.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2Parser.java 
b/java/org/apache/coyote/http2/Http2Parser.java
index 485adae..0fd6acb 100644
--- a/java/org/apache/coyote/http2/Http2Parser.java
+++ b/java/org/apache/coyote/http2/Http2Parser.java
@@ -338,7 +338,7 @@ class Http2Parser {
 int id = ByteUtil.getTwoBytes(setting, 0);
 long value = ByteUtil.getFourBytes(setting, 2);
 Setting key = Setting.valueOf(id);
-if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+if (key == Setting.UNKNOWN) {
 log.warn(sm.getString("connectionSettings.unknown",
 connectionId, Integer.toString(id), 
Long.toString(value)));
 }
diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 7d4810f..258ce63 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -232,7 +232,7 @@ class Http2UpgradeHandler extends AbstractStream implements 
InternalHttpUpgradeH
 int id = ByteUtil.getTwoBytes(settings, i * 6);
 long value = ByteUtil.getFourBytes(settings, (i * 6) + 2);
 Setting key = Setting.valueOf(id);
-if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+if (key == Setting.UNKNOWN) {
 log.warn(sm.getString("connectionSettings.unknown",
 connectionId, Integer.toString(id), 
Long.toString(value)));
 }

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



[tomcat] branch 8.5.x updated (811e085 -> 07ba9a8)

This is an automated email from the ASF dual-hosted git repository.

remm pushed a change to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 811e085  65959: Serialize Function as String[] rather Class[]
 new 42b83ee  PR #487: Improve logging of unknown settings frames
 new 07ba9a8  Remove check disabling logging

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/coyote/http2/ConnectionSettingsBase.java | 2 --
 java/org/apache/coyote/http2/Http2Parser.java| 7 ++-
 java/org/apache/coyote/http2/Http2UpgradeHandler.java| 7 ++-
 webapps/docs/changelog.xml   | 8 
 4 files changed, 20 insertions(+), 4 deletions(-)

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



[tomcat] 01/02: PR #487: Improve logging of unknown settings frames

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 42b83ee1db5337ca6756681c90cfecad885a122f
Author: remm 
AuthorDate: Wed Mar 23 21:00:41 2022 +0100

PR #487: Improve logging of unknown settings frames

Pull request by Thomas Hoffmann.
---
 java/org/apache/coyote/http2/ConnectionSettingsBase.java | 2 --
 java/org/apache/coyote/http2/Http2Parser.java| 7 ++-
 java/org/apache/coyote/http2/Http2UpgradeHandler.java| 7 ++-
 webapps/docs/changelog.xml   | 8 
 4 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/http2/ConnectionSettingsBase.java 
b/java/org/apache/coyote/http2/ConnectionSettingsBase.java
index 2e67fbc..7ea44c2 100644
--- a/java/org/apache/coyote/http2/ConnectionSettingsBase.java
+++ b/java/org/apache/coyote/http2/ConnectionSettingsBase.java
@@ -88,8 +88,6 @@ abstract class ConnectionSettingsBase {
 break;
 case UNKNOWN:
 // Unrecognised. Ignore it.
-log.warn(sm.getString("connectionSettings.unknown",
-connectionId, setting, Long.toString(value)));
 return;
 }
 
diff --git a/java/org/apache/coyote/http2/Http2Parser.java 
b/java/org/apache/coyote/http2/Http2Parser.java
index df173e1..bd91cbd 100644
--- a/java/org/apache/coyote/http2/Http2Parser.java
+++ b/java/org/apache/coyote/http2/Http2Parser.java
@@ -309,7 +309,12 @@ class Http2Parser {
 input.fill(true, setting);
 int id = ByteUtil.getTwoBytes(setting, 0);
 long value = ByteUtil.getFourBytes(setting, 2);
-output.setting(Setting.valueOf(id), value);
+Setting key = Setting.valueOf(id);
+if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+log.warn(sm.getString("connectionSettings.unknown",
+connectionId, Integer.toString(id), 
Long.toString(value)));
+}
+output.setting(key, value);
 }
 }
 output.settingsEnd(ack);
diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 390463f..a0307e4 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -233,7 +233,12 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 for (int i = 0; i < settings.length % 6; i++) {
 int id = ByteUtil.getTwoBytes(settings, i * 6);
 long value = ByteUtil.getFourBytes(settings, (i * 6) + 2);
-remoteSettings.set(Setting.valueOf(id), value);
+Setting key = Setting.valueOf(id);
+if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+log.warn(sm.getString("connectionSettings.unknown",
+connectionId, Integer.toString(id), 
Long.toString(value)));
+}
+remoteSettings.set(key, value);
 }
 } catch (Http2Exception e) {
 throw new ProtocolException(
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 1e601e3..0eb5f60 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -118,6 +118,14 @@
   
 
   
+  
+
+  
+487: Improve logging of unknown settings frames. Pull request
+by Thomas Hoffmann. (remm)
+  
+
+  
   
 
   

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



[tomcat] 02/02: Remove check disabling logging

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 07ba9a8ed457598a3ef4e6bdb463248524abc419
Author: remm 
AuthorDate: Wed Mar 23 21:03:44 2022 +0100

Remove check disabling logging
---
 java/org/apache/coyote/http2/Http2Parser.java | 2 +-
 java/org/apache/coyote/http2/Http2UpgradeHandler.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2Parser.java 
b/java/org/apache/coyote/http2/Http2Parser.java
index bd91cbd..bab0ae1 100644
--- a/java/org/apache/coyote/http2/Http2Parser.java
+++ b/java/org/apache/coyote/http2/Http2Parser.java
@@ -310,7 +310,7 @@ class Http2Parser {
 int id = ByteUtil.getTwoBytes(setting, 0);
 long value = ByteUtil.getFourBytes(setting, 2);
 Setting key = Setting.valueOf(id);
-if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+if (key == Setting.UNKNOWN) {
 log.warn(sm.getString("connectionSettings.unknown",
 connectionId, Integer.toString(id), 
Long.toString(value)));
 }
diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index a0307e4..b1119a7 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -234,7 +234,7 @@ class Http2UpgradeHandler extends AbstractStream implements 
InternalHttpUpgradeH
 int id = ByteUtil.getTwoBytes(settings, i * 6);
 long value = ByteUtil.getFourBytes(settings, (i * 6) + 2);
 Setting key = Setting.valueOf(id);
-if (log.isDebugEnabled() && key == Setting.UNKNOWN) {
+if (key == Setting.UNKNOWN) {
 log.warn(sm.getString("connectionSettings.unknown",
 connectionId, Integer.toString(id), 
Long.toString(value)));
 }

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



Re: [tomcat] 01/02: PR #487: Improve logging of unknown settings frames


Rémy,

On 3/23/22 16:10, r...@apache.org wrote:

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit a82ddf0fc42c960f224e7d23eaa90df272de3559
Author: remm 
AuthorDate: Wed Mar 23 21:00:41 2022 +0100

 PR #487: Improve logging of unknown settings frames
 
 Pull request by Thomas Hoffmann.

---
  java/org/apache/coyote/http2/ConnectionSettingsBase.java | 2 --
  java/org/apache/coyote/http2/Http2Parser.java| 7 ++-
  java/org/apache/coyote/http2/Http2UpgradeHandler.java| 7 ++-
  webapps/docs/changelog.xml   | 4 
  4 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/http2/ConnectionSettingsBase.java 
b/java/org/apache/coyote/http2/ConnectionSettingsBase.java
index 042fb0c..ef4a200 100644
--- a/java/org/apache/coyote/http2/ConnectionSettingsBase.java
+++ b/java/org/apache/coyote/http2/ConnectionSettingsBase.java
@@ -88,8 +88,6 @@ abstract class ConnectionSettingsBase {
  break;
  case UNKNOWN:
  // Unrecognised. Ignore it.
-log.warn(sm.getString("connectionSettings.unknown",
-connectionId, setting, Long.toString(value)));
  return;
  }



Was it intended to remove this log completely?

-chris

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



Re: [tomcat] 01/02: PR #487: Improve logging of unknown settings frames

On Wed, Mar 23, 2022 at 10:01 PM Christopher Schultz
 wrote:
>
> Rémy,
>
> On 3/23/22 16:10, r...@apache.org wrote:
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > remm pushed a commit to branch 10.0.x
> > in repository https://gitbox.apache.org/repos/asf/tomcat.git
> >
> > commit a82ddf0fc42c960f224e7d23eaa90df272de3559
> > Author: remm 
> > AuthorDate: Wed Mar 23 21:00:41 2022 +0100
> >
> >  PR #487: Improve logging of unknown settings frames
> >
> >  Pull request by Thomas Hoffmann.
> > ---
> >   java/org/apache/coyote/http2/ConnectionSettingsBase.java | 2 --
> >   java/org/apache/coyote/http2/Http2Parser.java| 7 ++-
> >   java/org/apache/coyote/http2/Http2UpgradeHandler.java| 7 ++-
> >   webapps/docs/changelog.xml   | 4 
> >   4 files changed, 16 insertions(+), 4 deletions(-)
> >
> > diff --git a/java/org/apache/coyote/http2/ConnectionSettingsBase.java 
> > b/java/org/apache/coyote/http2/ConnectionSettingsBase.java
> > index 042fb0c..ef4a200 100644
> > --- a/java/org/apache/coyote/http2/ConnectionSettingsBase.java
> > +++ b/java/org/apache/coyote/http2/ConnectionSettingsBase.java
> > @@ -88,8 +88,6 @@ abstract class ConnectionSettingsBase > Throwable> {
> >   break;
> >   case UNKNOWN:
> >   // Unrecognised. Ignore it.
> > -log.warn(sm.getString("connectionSettings.unknown",
> > -connectionId, setting, Long.toString(value)));
> >   return;
> >   }
>
>
> Was it intended to remove this log completely?

Yes, there is not enough information to do the logging there.

Rémy

> -chris
>
> -
> 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 65975] New: CLIENT-CERT authentication does not request cert from client and always denies access (401)

https://bz.apache.org/bugzilla/show_bug.cgi?id=65975

Bug ID: 65975
   Summary: CLIENT-CERT authentication does not request cert from
client and always denies access (401)
   Product: Tomcat 9
   Version: 9.0.60
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
  Assignee: dev@tomcat.apache.org
  Reporter: martin.sta...@t-base.pro
  Target Milestone: -

Created attachment 38232
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38232&action=edit
ZIP file containing the adjusted default config as mentioned in the description

According to the documentation
https://tomcat.apache.org/tomcat-9.0-doc/config/http.html#SSL_Support_-_SSLHostConfig,
setting certificateVerification="none" should behave as follows: "A none value
(which is the default) will not require a certificate chain unless the client
requests a resource protected by a security constraint that uses CLIENT-CERT
authentication."

The problem encountered is that a resource protected by a security constraint
that uses CLIENT-CERT authentication does not cause Tomcat to request a
certificate chain. As a result all access is denied.

Reproduced in Apache Tomcat versions 9.0.60 and 8.5.77

Tested Java versions: OpenJDK Runtime Environment (build 17.0.2+8-86) Tomcat
9.0.60 and 8.5.77, Zulu 8.56.0.23-CA-win64 (build 1.8.0_302-b08) on Tomcat
9.0.60

Tested Tomcat Connector on Tomcat 9.0.60:
- org.apache.coyote.http11.Http11NioProtocol - JSSE
- org.apache.coyote.http11.Http11AprProtocol, UpgradeProtocol
org.apache.coyote.http2.Http2Protocol - JSSE and OpenSSL
Tested Tomcat Connector on Tomcat 8.5.77:
- org.apache.coyote.http11.Http11NioProtocol - JSSE

catalina.log excerpt of a failed authentication:
23-Mar-2022 21:15:11.270 FINE [https-openssl-apr-443-exec-2]
org.apache.catalina.authenticator.AuthenticatorBase.invoke Security checking
request GET /examples/jsp/security/protected/index.jsp
23-Mar-2022 21:15:11.270 FINE [https-openssl-apr-443-exec-2]
org.apache.catalina.realm.RealmBase.findSecurityConstraints   Checking
constraint 'SecurityConstraint[Protected Area]' against GET
/jsp/security/protected/index.jsp --> true
23-Mar-2022 21:15:11.271 FINE [https-openssl-apr-443-exec-2]
org.apache.catalina.realm.RealmBase.findSecurityConstraints   Checking
constraint 'SecurityConstraint[Protected Area]' against GET
/jsp/security/protected/index.jsp --> true
23-Mar-2022 21:15:11.277 FINE [https-openssl-apr-443-exec-2]
org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl.loadPersistentRegistrations
Loading persistent provider registrations from [C:\Program Files\Apache
Software Foundation\Tomcat 9.0\conf\jaspic-providers.xml]
23-Mar-2022 21:15:11.282 FINE [https-openssl-apr-443-exec-2]
org.apache.catalina.authenticator.AuthenticatorBase.invoke Calling
hasUserDataPermission()
23-Mar-2022 21:15:11.283 FINE [https-openssl-apr-443-exec-2]
org.apache.catalina.realm.RealmBase.hasUserDataPermission   User data
constraint already satisfied
23-Mar-2022 21:15:11.283 FINE [https-openssl-apr-443-exec-2]
org.apache.catalina.authenticator.AuthenticatorBase.invoke Calling
authenticate()
23-Mar-2022 21:15:11.284 FINE [https-openssl-apr-443-exec-2]
org.apache.catalina.authenticator.AuthenticatorBase.invoke Failed
authenticate() test

How to reproduce:

1. For changes made to the default condifuration see attachments:
- conf/server.xml: Connector port 8080 disabled, connector port 443 with SSL
configuration enabled and adjusted
- conf/tomcat-users.xml: Role "user" and one user added
- webapps/examples/WEB-INF/web.xml: Changed security-constraint, login-config
and security-role for CLIENT-CERT authentication

2. Open https:///examples/jsp/security/protected/index.jsp in a
browser

This should result in "HTTP Status 401 – Unautorisiert"

To check if the configuration works otherwhise:
1. Change certificateVerification to "required" in conf/server.xml
2. Restart Tomcat
3. Open https:///examples/jsp/security/protected/index.jsp in a
browser
This should return the example webpage showing the authenticated user.

-- 
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 65975] CLIENT-CERT authentication does not request cert from client and always denies access (401)

https://bz.apache.org/bugzilla/show_bug.cgi?id=65975

Martin Stangl  changed:

   What|Removed |Added

 OS||Windows 10

-- 
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 65975] CLIENT-CERT authentication does not request cert from client and always denies access (401)

https://bz.apache.org/bugzilla/show_bug.cgi?id=65975

Martin Stangl  changed:

   What|Removed |Added

 OS||All

--- Comment #1 from Martin Stangl  ---
Hardware: PC
OS: Windows 10

-- 
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



[GitHub] [tomcat] volosied opened a new pull request #488: Donating EL Translations



volosied opened a new pull request #488:
URL: https://github.com/apache/tomcat/pull/488


   Open Liberty uses Tomcat's EL API, but, since some of the property file 
translations were missing,  IBM completed them and created new files for other 
languages. We'd like to contribute these back to Tomcat. 
   
   See 
https://github.com/OpenLiberty/open-liberty/tree/integration/dev/io.openliberty.jakarta.expressionLanguage.4.0/resources/jakarta/el
   
   Thanks. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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



[Bug 65975] CLIENT-CERT authentication does not request cert from client and always denies access (401)

https://bz.apache.org/bugzilla/show_bug.cgi?id=65975

--- Comment #2 from Martin Stangl  ---
Tried some other things with the same result:
- Tested with Apache Tomcat 9 on Windows Server
- Removed LockOutRealm and used UserDatabaseRealm directly
- Used MemoryRealm instead of UserDatabaseRealm
- Used a different role name
- Used allRolesMode="authOnly" and checked for role "*"

-- 
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