JAAS examples don't work in JBoss2.4.3-Catalina
patrickvankann Nov 26, 2001 1:22 PMHi, I have seen many posts to this effect but no resolution. Has anyone solved this? Details below.
I have built and deployed example1.ear from the example source. Everything seems fine, no errors on deployment or startup. However Catalina fails to try and authenticate when you access the http://localhost:8080/restricted/SecuredServlet. It simple shows a 403. The console tells me
[Default] Bad password for username=null
In the example, the jboss/conf/catalina/auth.conf for example 1 is
example1 {
org.jboss.security.auth.spi.UsersRolesLoginModule required
;
};
and my jboss.jcml in jboss/conf/catalina/
<!-- JAAS security manager and realm mapping -->
org.jboss.security.plugins.JaasSecurityManager
org.jboss.security.SubjectSecurityProxyFactory
Otherwise, I build the code exactly as is and followed the instructions.
This is what occurs at startup.... all looks very normal and healthy.
[AutoDeployer] Auto deploy of file:/C:/jboss/deploy/tutorial1.ear
[J2EE Deployer Default] Deploy J2EE application: file:/C:/jboss/deploy/tutorial1
.ear
[J2eeDeployer] Create application tutorial1.ear
[J2eeDeployer] inflate and install WEB module tutorial1.war
[J2eeDeployer] install EJB module ssbean1.jar
[J2eeDeployer] add all ejb jar files to the common classpath
[Container factory] Deploying:file:/C:/jboss/tmp/deploy/Default/tutorial1.ear
[Verifier] Verifying file:/C:/jboss/tmp/deploy/Default/tutorial1.ear/ejb1005.jar
[Container factory] Deploying StatelessSession
[Default] lookup securityDomain manager name: java:/jaas/example1
[JaasSecurityManagerService] Created securityMgr=org.jboss.security.plugins.Jaas
SecurityManager@759d12
[JaasSecurityManagerService] setCachePolicy, c=null
[JaasSecurityManagerService] Added example1, org.jboss.security.plugins.JaasSecu
rityManager@759d12 to map
[Container factory] Deploying StatefulSession
[Default] lookup securityDomain manager name: java:/jaas/example1
[Bean Cache] Cache policy scheduler started
[ContainerManagement] Initializing
[ContainerManagement] Initialized
[ContainerManagement] Starting
[ContainerManagement] Started
[ContainerManagement] Initializing
[ContainerManagement] Initialized
[ContainerManagement] Starting
[ContainerManagement] Started
[Container factory] Deployed application: file:/C:/jboss/tmp/deploy/Default/tuto
rial1.ear
[J2EE Deployer Default] Starting module tutorial1.war
[EmbeddedCatalinaServiceSX] deploy, ctxPath=/jaas-example1, warUrl=file:/C:/jbos
s/tmp/deploy/Default/tutorial1.ear/web1004/
[EmbeddedCatalinaServiceSX] WebappLoader[/jaas-example1]: Deploying class reposi
tories to work directory C:\catalina\work\localhost\jaas-example1
[EmbeddedCatalinaServiceSX] StandardManager[/jaas-example1]: Seeding random numb
er generator class java.security.SecureRandom
[EmbeddedCatalinaServiceSX] StandardManager[/jaas-example1]: Seeding of random n
umber generator has been completed
[EmbeddedCatalinaServiceSX] ContextConfig[/jaas-example1]: Added certificates ->
request attribute Valve
[EmbeddedCatalinaServiceSX] ContextConfig[/jaas-example1]: Configured an authent
icator for method BASIC
[EmbeddedCatalinaServiceSX] StandardWrapper[/jaas-example1:default]: Loading con
tainer servlet default
[EmbeddedCatalinaServiceSX] default: init
[EmbeddedCatalinaServiceSX] StandardWrapper[/jaas-example1:invoker]: Loading con
tainer servlet invoker
[EmbeddedCatalinaServiceSX] invoker: init
[EmbeddedCatalinaServiceSX] StandardWrapper[/jaas-example1:jsp]: Using Jasper cl
assloader for servlet jsp
[EmbeddedCatalinaServiceSX] jsp: init
[J2EE Deployer Default] J2EE application: file:/C:/jboss/deploy/tutorial1.ear is
deployed.