Quantcast

How to setup an JAAS file-realm

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to setup an JAAS file-realm

rsoika
Hi,

I am trying to  deploy a simple war file on WebSphere Community Edition V3. My web app needs a user authentication.
Therefor I have created a new FileRealm named 'imixsrealm' and added the geronimo-web.xml file into my war.
But this did not work. Can anybody help me what else is necessary to setup a JAAS configuration for a file realm?

geronimo-web.xml:


<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0"
             xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
         xmlns:cfg="http://geronimo.apache.org/xml/ns/deployment-1.2">


    <context-root>/workflow</context-root>

    <security-realm-name>imixsrealm</security-realm-name>

    <sec:security>
        <sec:role-mappings>
            <sec:role role-name="org.imixs.ACCESSLEVEL.MANAGERACCESS">
                <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
                               name="IMIXS-WORKFLOW-Manager" designated-run-as="true"/>
            </sec:role>
        </sec:role-mappings>
    </sec:security>

    </web-app>

This is the error message when I try to deploy my app on Websphere:

Fail to load servlet class
org.apache.geronimo.common.DeploymentException: Fail to load servlet class
at org.apache.geronimo.web25.deployment.merge.annotation.ServletSecurityAnnotationMergeHandler.postProcessWebXmlElement(ServletSecurityAnnotationMergeHandler.java:79)
at org.apache.geronimo.web25.deployment.merge.MergeHelper.processWebFragmentsAndAnnotations(MergeHelper.java:418)
at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.basicInitContext(AbstractWebModuleBuilder.java:491)
at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.initContext(AbstractWebModuleBuilder.java:434)
at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext(SwitchingModuleBuilder.java:168)
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:685)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)
at org.apache.geronimo.web25.deployment.merge.annotation.ServletSecurityAnnotationMergeHandler.postProcessWebXmlElement(ServletSecurityAnnotationMergeHandler.java:52)
... 18 more

The application deploys on GlassFish, so I did not think that there is something wrong in my web.xml

Thanks for any help

Ralph
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to setup an JAAS file-realm

rsoika
Hi,
can anybody help me in this problem?
thanks for any hints

=====
Ralph
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to setup an JAAS file-realm

Forrest Xia
You can download the was ce 3.0 sample[1] to find the file-realm-demo sample for reference.

BTW, this is mailing list for Apache Geronimo project, if you have questions about WebSphere Community Edition V3, you can post to the IBM forum[2]

[1] http://www.ibm.com/developerworks/downloads/ws/wasce/
[2] http://www.ibm.com/developerworks/forums/forum.jspa?forumID=541&start=0

On Thu, Feb 23, 2012 at 8:00 AM, rsoika <[hidden email]> wrote:
Hi,
can anybody help me in this problem?
thanks for any hints

=====
Ralph

--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/How-to-setup-an-JAAS-file-realm-tp3732548p3769601.html
Sent from the Users mailing list archive at Nabble.com.



--
Thanks!

Regards, Forrest

Loading...