Several days ago, I look into the source code and found the reason:
You should configure the Tomcat Engine name the same as the Geronimo
Security Realm name.
Tomcat Module deploy plan:
<gbean name="TomcatEngine" class="org.apache.geronimo.tomcat.EngineGBean">
<attribute
name="className">org.apache.geronimo.tomcat.TomcatEngine</attribute>
<attribute name="initParams">name=Geronimo</attribute>
...
</gbean>
Geronimo Security Realm deploy plan:
<module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
<environment>
<moduleId>
<groupId>console</groupId>
<artifactId>myrealm </artifactId>
<version>1.1.1</version>
<type>car</type>
</moduleId>
<dependencies>
<dependency>
<groupId>geronimo</groupId>
<artifactId>j2ee-security</artifactId>
<type>car</type>
</dependency>
<dependency>
<groupId>geronimo</groupId>
<artifactId>tomcat</artifactId>
<version>1.1.1</version>
<type>car</type>
</dependency>
</dependencies>
</environment>
<gbean name="mygbean"
class="org.apache.geronimo.security.realm.GenericSecurityRealm">
<attribute name="realmName">Geronimo</attribute>
<reference name="ServerInfo">
<name>ServerInfo</name>
</reference>
<reference name="LoginService">
<name>JaasLoginService</name>
</reference>
<xml-reference name="LoginModuleConfiguration">
<log:login-config
xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-1.1">
<log:login-module control-flag="REQUIRED" server-side="true"
wrap-principals="false">
<log:login-domain-name>mydomain</log:login-domain-name>
<log:login-module-class>org.company.CustomLoginModule</log:login-module-class>
</log:login-module>
</log:login-config>
</xml-reference>
</gbean>
</module>
Hope this help the guy who has met the same problem.
thanks,
carver
--
View this message in context:
http://www.nabble.com/JAASRealm-configuration-problem-tf4509058s134.html#a13055802
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.