Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 55133 invoked from network); 17 Jul 2005 22:30:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Jul 2005 22:30:34 -0000 Received: (qmail 10965 invoked by uid 500); 17 Jul 2005 16:49:44 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 10758 invoked by uid 500); 17 Jul 2005 16:49:42 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 10745 invoked by uid 99); 17 Jul 2005 16:49:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Jul 2005 09:49:42 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [195.92.195.173] (HELO cmailg3.svr.pol.co.uk) (195.92.195.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Jul 2005 09:49:39 -0700 Received: from user-7529.l1.c1.dsl.pol.co.uk ([81.77.93.105] helo=[127.0.0.1]) by cmailg3.svr.pol.co.uk with esmtp (Exim 4.41) id 1DuCKi-0005vV-VS for tomcat-user@jakarta.apache.org; Sun, 17 Jul 2005 17:49:41 +0100 Message-ID: <42DA8C24.20603@apache.org> Date: Sun, 17 Jul 2005 17:49:40 +0100 From: Mark Thomas User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Tomcat security realms question References: <1F78B75C252B574FBC551990AE8A8367023CECE0@exsymb02.aus.nsroot.net> In-Reply-To: <1F78B75C252B574FBC551990AE8A8367023CECE0@exsymb02.aus.nsroot.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N The problem you describe is true of any session tracking system running over http. The solution is to use https. However, here's a question to fire back at your security team: "If you are worried about an attacker physically looking at a session ID on a user's screen, what about if they decide to install a keyboard logger (physical or software) whilst they have access to the user's machine?" In fact, I can think of a whole bunch of other things I could do as well that would be equally or more damaging than hijacking a single session. Fundamentally, if an attacker has physical access to a machine it is game over - they have won. Your security team knows the threat model for you situation far better than I do but it sounds to me like they are trying too hard in one area and have missed a bunch of other threats. Mark Akoulov, Alexandre [IT] wrote: > Hi all > > I have a problem that's been raised by my security team to do with using Tomcat JDBCRealms. We're using such realms to protect restricted resources. We also have a custom login form. The steps Tomcat seems to follow when using such a setup is: > > 1. Check to see if the user is logged in with access to the restricted resource. > 2. If they aren't, forward them to the login page and create an HTTPSession to keep track of that user. > 3. Once they've logged in, add the authentication system to the HTTPSession created in step 2 to hold that info and forward them to the resource. > 4. Continue using the same HTTPSession to maintain state. > > The problem my security team has with this is that someone could potentially steal the users HTTPSession ID before they've logged in, as this is created in the login screen. e.g. the user is forwarded to the login screen, then goes to make themselves a cup of coffee. A hacker goes to their computer and writes down the session ID. The user comes back and logs in, and the hacker pretends to be them from another computer. > > My question is: how can I avoid this situation and keep the security guys happy? Is it possible to have the session ID held by the browser (in JSessionID) change post-login (ie make tomcat invalidate the current session and create a new session after the user has been successfully authenticated)? > > Thanks for your help. --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org