users@glassfish.java.net

UnsupportedCallback exception when securing EJB webservice client

From: <glassfish_at_javadesktop.org>
Date: Wed, 14 Feb 2007 02:09:06 PST

Hi.

I've got a problem while calling a secure webservice that is [b]not WSIT enabled[/b]
out of a EJB session bean! The webservice client has been generated with
netbeans-5.5.1 using wsimport. I installed JAX-WS 2.1 and JAXB-2.1 to work with JDK 6.

I configured the bindings in sun-ejb-jar.xml and included USERNAME_PROPERY and
PASSWORD_PROPERTY in the port properties.

On the application server (glassfish V2M4 = b33) I configured a soap security provider of
type com.sun.xml.wss.provider.ClientSecurityAuthModule with the properties as shown in
the log excerpt below.

When trying to call a webservice action I get the error:
[i]JMAC: UnsupportedCallback : javax.security.auth.callback.NameCallback[/i]
when the security classes try to get the username and password for the UsernameToken.

The same problem occurs when calling the service from a web application (servlet).

Please help, I'm hanging for weeks now.

Alexander.

[code]
[#|2007-02-14T10:41:50.170+0100|FINE|sun-appserver9.1|javax.enterprise.system.
core.security|_ThreadID=33;_ThreadName=httpSSLWorkerThread-8080-2;ClassName
=com.sun.enterprise.security.jmac.config.GFServerConfigProvider;MethodName=
getEntry;_RequestID=e97f0168-e669-44df-8d5e-303fc55e1348;|getEntry for:
SOAP -- AKTClientProvider
    module class: com.sun.xml.wss.provider.ClientSecurityAuthModule
    options: {debug=true, dynamic.username.password=false,
security.config=/opt/glassfish/domains/domain1/config/akt-client-security-config.xml}
    request policy: javax.security.auth.message.MessagePolicy_at_103c27a
    response policy: javax.security.auth.message.MessagePolicy_at_1d50958|#]

[#|2007-02-14T10:41:50.203+0100|FINE|sun-appserver9.1|javax.enterprise.system.
core.security|_ThreadID=33;_ThreadName=httpSSLWorkerThread-8080-2;ClassName
=com.sun.enterprise.security.jmac.callback.BaseContainerCallbackHandler;MethodName
=handle;_RequestID=e97f0168-e669-44df-8d5e-303fc55e1348;|
JMAC: UnsupportedCallback : javax.security.auth.callback.NameCallback|#]

[#|2007-02-14T10:41:50.204+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.
core.security|_ThreadID=33;_ThreadName=httpSSLWorkerThread-8080-2;_RequestID
=e97f0168-e669-44df-8d5e-303fc55e1348;|SEC2004: Container-auth: wss: Error
securing request
javax.security.auth.message.AuthException
        at com.sun.enterprise.security.jmac.config.GFServerConfigProvider.createModule(GFServerConfigProvider.java:266)
        at com.sun.enterprise.security.jmac.config.GFServerConfigProvider$GFAuthConfig.getModule(GFServerConfigProvider.java:960)
        at com.sun.enterprise.security.jmac.config.GFServerConfigProvider$GFClientAuthConfig.getAuthContext(GFServerConfigProvider.ja
va:1024)
        at com.sun.enterprise.security.jmac.config.PipeHelper.getClientAuthContext(PipeHelper.java:102)
        at com.sun.enterprise.webservice.ClientSecurityPipe.process(ClientSecurityPipe.java:143)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:79)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
        at com.sun.xml.ws.client.Stub.process(Stub.java:228)
        at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:120)
        at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:226)
        at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:206)
        at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
[/code]
[Message sent by forum member 'sahlix' (sahlix)]

http://forums.java.net/jive/thread.jspa?messageID=203730