Hello,
I configure *JAAS* for *cxfbc:consumer without ws-policy in WSDL* on
Servicemix 4.3 as OSGI bundle.
The WSDL contains no ws-security configuration.

The cxfbc:consumer refers *WSS4JInInterceptor* in the same beans.xml with
this entries:
                <entry
                    key="action"
                    value="UsernameToken" />
                <entry
                    key="passwordType"
                    value="PasswordText" />
                <entry key="passwordCallbackRef">
                    <ref bean="myPasswordCallback"/>
                </entry>

I have *JAAS* configured in separately stored blueprint configuration file
but in the same OSGI bundle:

    <jaas:config name="servicemix-domain">
        <jaas:module
className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
            flags="required">
            org.apache.activemq.jaas.properties.user = etc/users.properties
        </jaas:module>
    </jaas:config>

There *<Import-Package>* section contains the package
*org.apache.ws.security.processor*.

When I call the cxfbc service with username and password token in soap
header from my test client (soapUI), the login module will be found in the
jaas realm servicemix-domain.
But it appears this exception in Servicemix:

*java.lang.ClassNotFoundException:
org.apache.ws.security.processor.UsernameTokenProcessor*
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)[:1.6.0_24]
        at java.security.AccessController.doPrivileged(Native
Method)[:1.6.0_24]
        at
java.net.URLClassLoader.findClass(URLClassLoader.java:190)[:1.6.0_24]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)[:1.6.0_24]
        at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)[:1.6.0_24]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)[:1.6.0_24]
        at
org.apache.ws.security.util.Loader.loadClass(Loader.java:185)[113:org.apache.ws.security.wss4j:1.5.9]
        at
org.apache.ws.security.util.Loader.loadClass(Loader.java:177)[113:org.apache.ws.security.wss4j:1.5.9]
        at
org.apache.ws.security.WSSConfig.getProcessor(WSSConfig.java:561)[113:org.apache.ws.security.wss4j:1.5.9]
        at
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:321)[113:org.apache.ws.security.wss4j:1.5.9]
        at
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:245)[113:org.apache.ws.security.wss4j:1.5.9]
        at
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:215)[116:org.apache.cxf.bundle:2.3.2]

See the project in this *attachment* too:
http://servicemix.396122.n5.nabble.com/file/n4794258/gateway.zip gateway.zip 

*And second issue:* 
When I redeploy my bundle (delete it from and copy to deploy), there is this
exception after calling the service and it is needed to restart Servicemix:

Caused by: org.osgi.service.blueprint.container.ServiceUnavailableException:
Service is unavailable
        at
org.apache.aries.blueprint.container.ReferenceListRecipe$ServiceDispatcher.call(ReferenceListRecipe.java:201)
        at
org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe$CgLibProxyFactory$1.loadObject(AbstractServiceReferenceRecipe.java:652)
        at
org.apache.karaf.jaas.config.JaasRealm$$EnhancerByCGLIB$$57d60f75.getName(<generated>)
        at
org.apache.karaf.jaas.config.impl.OsgiConfiguration.getAppConfigurationEntry(OsgiConfiguration.java:54)
        at
javax.security.auth.login.LoginContext.init(LoginContext.java:243)
        at
javax.security.auth.login.LoginContext.<init>(LoginContext.java:367)
        at
javax.security.auth.login.LoginContext.<init>(LoginContext.java:444)
        at
org.apache.servicemix.nmr.core.security.JaasAuthenticationService.authenticate(JaasAuthenticationService.java:50)
        at
org.apache.servicemix.nmr.api.security.AuthenticationService$$EnhancerByCGLIB$$c9d6bc26.authenticate(<generated>)


Thank you for any tips, how to properly configure the JAAS authentization in
Servicemix 4.3. on a cxbc:consumer.
Radomir

--
View this message in context: 
http://servicemix.396122.n5.nabble.com/JAAS-configuration-ClassNotFoundException-UsernameTokenProcessor-tp4794258p4794258.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to