Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8101710135 for ; Mon, 28 Oct 2013 11:47:17 +0000 (UTC) Received: (qmail 38061 invoked by uid 500); 28 Oct 2013 11:47:13 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 37844 invoked by uid 500); 28 Oct 2013 11:47:12 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 37826 invoked by uid 99); 28 Oct 2013 11:47:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Oct 2013 11:47:11 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbrianhallphd@me.com designates 17.172.220.236 as permitted sender) Received: from [17.172.220.236] (HELO st11p02mm-asmtp001.mac.com) (17.172.220.236) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Oct 2013 11:47:06 +0000 Received: from jbrianhallPC (pool-108-28-176-253.washdc.fios.verizon.net [108.28.176.253]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7u4-27.08(7.0.4.27.7) 64bit (built Aug 22 2013)) with ESMTPSA id <0MVD002AIND47S00@st11p02mm-asmtp001.mac.com> for users@tomcat.apache.org; Mon, 28 Oct 2013 11:46:19 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8794,1.0.431,0.0.0000 definitions=2013-10-28_01:2013-10-28,2013-10-27,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=1 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1308280000 definitions=main-1310280058 From: "J. Brian Hall" To: users@tomcat.apache.org Subject: Configuring Combined Realm Date: Mon, 28 Oct 2013 07:46:25 -0400 Message-id: <007e01ced3d3$560d8590$022890b0$@me.com> MIME-version: 1.0 Content-type: multipart/alternative; boundary="----=_NextPart_000_007F_01CED3B1.CEFF6800" X-Mailer: Microsoft Outlook 14.0 Thread-index: Ac7TzLQ9scyMHuzATsGWw3an+K2yOQ== Content-language: en-us X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_007F_01CED3B1.CEFF6800 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit How can I configure CombinedRealm in order to: (1) use JDBCRealm for my webapp with form-based authentication while (2) also using the default UserDatabaseRealm for the Tomcat Web Application Manager? I can get one or the other to work, but not both. Here are the details of my setup: -OS: Windows 7 -Server: Tomcat 7.0.42 -Database: MySQL 5.6 Articles I have used up to this point: 1. Form-based authentication with Tomcat 7 and MySQL: http://www.thejavageek.com/2013/07/07/configure-jdbcrealm-jaas-for-mysql-and -tomcat-7-with-form-based-authentication/ 2. Configuring CombinedRealm: http://tomcat.apache.org/tomcat-7.0-doc/realm-howto.html#CombinedRealm 3. Lastly, note that my database, tables, and Connector/J are setup per instructions above and I am able to login to my webapp with form-based authentication when only using JDBCRealm, but I then can't login to the Tomcat Web Application Manager. I configured the file CATALINA_HOME/config/server.xml in two ways: 1. I've identified the following global resources: 2. I've nested Realms within CombinedRealm as follows: Lastly, I configured my CATALINA_HOME/webapps/[mywebapp]/WEB-INF/web.xml file as follows: webapp Form-Based Authentication with mySQL mySQL Database jdbc/authority javax.sql.DataSource Container Protected /* PUT GET POST webappuser NONE FORM /login.jsp /error.jsp ------=_NextPart_000_007F_01CED3B1.CEFF6800--