java - JMX-RMI/T3 connection causes CallbackHandler to throw exception with ContextHandlerCallback present -
i have custom authenticator in weblogic 10.3 i'm using , having problems.
when user connects , authenticates on http functions fine. if connection jmx-rmi/t3 connection call javax.security.auth.callback.callbackhandler.handle
exception thrown. contexthandlercallback
default constructor being used , passed in array of callbacks username , password callback. below code callbackhandler javax.security.auth.callback.callbackhandler
callbacks = new callback[2]; callbacks[0] = new namecallback("username: "); callbacks[1] = new passwordcallback("password: ", false); callbacks[2] = new contexthandlercallback(); callbackhandler.handle(callbacks);
here top of excetption being thrown point of callbackhandler.handle(callbacks)
above:
javax.security.auth.callback.unsupportedcallbackexception: [security:090175]unrecognized callback @ weblogic.security.simplecallbackhandler.handle(simplecallbackhandler.java:71) @ com.bea.common.security.internal.service.callbackhandlerwrapper.handle(callbackhandlerwrapper.java:76) @ weblogic.security.service.internal.wlsjaasloginserviceimpl$callbackhandlerwrapper.handle(wlsjaasloginserviceimpl.java:156) @ javax.security.auth.login.logincontext$securecallbackhandler$1.run(logincontext.java:955) @ javax.security.auth.login.logincontext$securecallbackhandler.handle(logincontext.java:951)
and here exception trace we're seeing well:
javax.security.auth.callback.unsupportedcallbackexception: unrecognized callback @ weblogic.management.mbeanservers.internal.jmxauthenticator$jmxcallbackhandler.handle(jmxauthenticator.java:130) @ com.bea.common.security.internal.service.callbackhandlerwrapper.handle(callbackhandlerwrapper.java:76) @ weblogic.security.service.internal.wlsjaasloginserviceimpl$callbackhandlerwrapper.handle(wlsjaasloginserviceimpl.java:156) @ javax.security.auth.login.logincontext$securecallbackhandler$1.run(logincontext.java:955) @ javax.security.auth.login.logincontext$securecallbackhandler.handle(logincontext.java:951)
it's worth noting exception thrown if users authenticating on jmx/t3 connection http works fine.
part of we're trying achieve capturing information authentication, such ip address request originated from, why need contexthandlercallback
. can see trying retrieve httpservletrequest
jmx-rmi/t3 connection cause problems, exception being thrown during javax.security.auth.callback.callbackhandler.handle().
some other information may or may not relevant, why not include can?
- application using form based authentication, ws calls jmx-rmi/t3 call may not.
- unsure if it's possible define implementation use callbackhandler when authenticating. we've defined custom loginmodule not custom callbackhandler.
- if there way outside of contexthandlercallback access caller's ip address inside of loginmodule, provide suitable workaround.
i'm confused why work via 1 protocol , not other. else seen sort of behavior or know of way handle this?
thanks, todd
in weblogic, contexthandlercallback defined http servlets requests.
you can access ip address of caller on protocols (http, rmi-iiop, ...) implementing connectionfilter/connectionevent interfaces. can use them log or reject requests based on ip address.
Comments
Post a Comment