This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.0.x by this push:
new ec8390a Improve robustness for expired credentials
ec8390a is described below
commit ec8390a5fb4bad147c2fba45e6cc6b34f7fa5593
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Nov 22 17:38:53 2021 +0000
Improve robustness for expired credentials
---
java/org/apache/catalina/connector/Request.java | 6 ++++--
webapps/docs/changelog.xml | 8 ++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/catalina/connector/Request.java
b/java/org/apache/catalina/connector/Request.java
index 82f4a5a..da40d08 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -2625,11 +2625,13 @@ public class Request implements HttpServletRequest {
int left = -1;
try {
left = gssCredential.getRemainingLifetime();
- } catch (GSSException e) {
+ } catch (GSSException | IllegalStateException e) {
log.warn(sm.getString("coyoteRequest.gssLifetimeFail",
userPrincipal.getName()), e);
}
- if (left == 0) {
+ // zero is expired.
+ // Should never be less than zero but handle those values too
+ if (left <= 0) {
// GSS credential has expired. Need to re-authenticate.
try {
logout();
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 13dd293..4b8ad00 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,14 @@
issues do not "pop up" wrt. others).
-->
<section name="Tomcat 10.0.14 (markt)" rtext="in development">
+ <subsection name="Catalina">
+ <changelog>
+ <fix>
+ Make SPNEGO authentication more robust for the case where the provided
+ credential has expired. (markt)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Coyote">
<changelog>
<fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]