This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 241148fcd1582c79ea6866793f94f1752f1ce5fb Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri Jun 28 09:32:44 2019 +0100 Add debug logging for session ID change --- java/org/apache/catalina/authenticator/AuthenticatorBase.java | 8 ++++++++ java/org/apache/catalina/authenticator/LocalStrings.properties | 1 + java/org/apache/catalina/authenticator/LocalStrings_fr.properties | 1 + java/org/apache/catalina/authenticator/LocalStrings_ja.properties | 1 + 4 files changed, 11 insertions(+) diff --git a/java/org/apache/catalina/authenticator/AuthenticatorBase.java b/java/org/apache/catalina/authenticator/AuthenticatorBase.java index 1011bbb..0c6ff36 100644 --- a/java/org/apache/catalina/authenticator/AuthenticatorBase.java +++ b/java/org/apache/catalina/authenticator/AuthenticatorBase.java @@ -787,9 +787,17 @@ public abstract class AuthenticatorBase extends ValveBase // If the principal is null then this is a logout. No need to change // the session ID. See BZ 59043. if (changeSessionIdOnAuthentication && principal != null) { + String oldId = null; + if (log.isDebugEnabled()) { + oldId = session.getId(); + } Manager manager = request.getContext().getManager(); manager.changeSessionId(session); request.changeSessionId(session.getId()); + if (log.isDebugEnabled()) { + log.debug(sm.getString("authenticator.changeSessionId", + oldId, session.getId())); + } } } else if (alwaysUseSession) { session = request.getSessionInternal(true); diff --git a/java/org/apache/catalina/authenticator/LocalStrings.properties b/java/org/apache/catalina/authenticator/LocalStrings.properties index 62dee48..49cfa4e 100644 --- a/java/org/apache/catalina/authenticator/LocalStrings.properties +++ b/java/org/apache/catalina/authenticator/LocalStrings.properties @@ -14,6 +14,7 @@ # limitations under the License. authenticator.certificates=No client certificate chain in this request +authenticator.changeSessionId=Session ID changed on authentication from [{0}] to [{1}] authenticator.check.authorize=User name [{0}] obtained from the Connector and trusted to be valid. Obtaining roles for this user from the Tomcat Realm. authenticator.check.authorizeFail=Realm did not recognise user [{0}]. Creating a Principal with that name and no roles. authenticator.check.found=Already authenticated [{0}] diff --git a/java/org/apache/catalina/authenticator/LocalStrings_fr.properties b/java/org/apache/catalina/authenticator/LocalStrings_fr.properties index 58c8ae2..84a7843 100644 --- a/java/org/apache/catalina/authenticator/LocalStrings_fr.properties +++ b/java/org/apache/catalina/authenticator/LocalStrings_fr.properties @@ -14,6 +14,7 @@ # limitations under the License. authenticator.certificates=Aucune chaîne de certificat client (client certificate chain) dans cette requête +authenticator.changeSessionId=L''id de session a changé suite à l''authntification de [{0}] en [{1}] authenticator.check.authorize=Le nom d''utilisateur [{0}] obtenu à partir du connecteur est considéré comme de valide et de confiance, les rôles sont obtenus à partir du royaume authenticator.check.authorizeFail=Le royaume ne reconnait pas l''utilisateur [{0}], un principal a été crée avec ce nom mais sans rôles authenticator.check.found=Déjà authentifié [{0}] diff --git a/java/org/apache/catalina/authenticator/LocalStrings_ja.properties b/java/org/apache/catalina/authenticator/LocalStrings_ja.properties index 0726b01..5301f02 100644 --- a/java/org/apache/catalina/authenticator/LocalStrings_ja.properties +++ b/java/org/apache/catalina/authenticator/LocalStrings_ja.properties @@ -14,6 +14,7 @@ # limitations under the License. authenticator.certificates=このリクエストにはクライアント認証チェーンがありません +authenticator.changeSessionId=認証時に[{0}]から[{1}]にセッションIDが変更されました。 authenticator.check.authorize=Connector から取得したユーザー名 [{0}] を正当なものとして信頼します。ユーザーのロールは Tomcat Realmから取得します。 authenticator.check.authorizeFail=Realm がユーザー[{0}]を認識しませんでした。 その名前とロールのないプリンシパルを作成します。 authenticator.check.found=既に認証された[{0}] --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org