You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2023/09/04 12:54:14 UTC
[Bug 67198] New: AuthType not set if tomcatAuthentication is set to true or left empty
https://bz.apache.org/bugzilla/show_bug.cgi?id=67198
Bug ID: 67198
Summary: AuthType not set if tomcatAuthentication is set to
true or left empty
Product: Tomcat 9
Version: 9.0.79
Hardware: PC
OS: Linux
Status: NEW
Severity: minor
Priority: P2
Component: Connectors
Assignee: dev@tomcat.apache.org
Reporter: robert.rodewald@kopsis.com
Target Milestone: -----
We are using Tomcat behind an Apache HTTPD with mod_proxy_ajp.
The Apache HTTPD server is doing authentication by means of mod_auth_mellon and
the authentication is propagated to Tomcat by using tomcatAuthorization="true"
on the connector. This works perfectly.
The problem is that request.getAuthType() ("Mellon" in our case) does not get
propagated from Apache HTTPD if tomcatAuthentication is not explicitly set to
"false", which does not conform to the documentation.
The documentation of tomcatAuthentication says that:
"The default value is true. If tomcatAuthorization is set to true this
attribute has no effect."
It has the effect that the AuthType is not set if not set to "false".
In my opinion the propagation of this value should not be dependent on
tomcatAuthentication being set to "false".
The cause of this behavior is the following code snippet in AjpProcessor:
case Constants.SC_A_AUTH_TYPE:
if (protocol.getTomcatAuthentication()) {
// ignore server
requestHeaderMessage.getBytes(tmpMB);
} else {
requestHeaderMessage.getBytes(request.getAuthType());
}
break;
We could change the if condition to (protocol.getTomcatAuthentication() ||
protocaol.getTomcatAuthorization())? I would be willing to submit a pull
request, if this solution is accepted.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 67198] AuthType not set if tomcatAuthentication is set to true or left empty
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67198
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Mark Thomas <ma...@apache.org> ---
Thanks for the report and the analysis. I opted to align the auth_type code
with that for remote_user since they are doing broadly the same thing for the
same reason.
Fixed in:
- 11.0.x for 11.0.0-M12 onwards
- 10.1.x for 10.1.14 onwards
- 9.0.x for 9.0.81 onwards
- 8.5.x for 8.5.94 onwards
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 67198] AuthType not set if tomcatAuthentication is set to true or left empty
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67198
--- Comment #1 from Robert Rodewald <ro...@kopsis.com> ---
The if condition should probably be:
protocol.getTomcatAuthentication() && !protocol.getTomcatAuthorization()
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org