Bugs item #575967, was opened at 2002-07-01 16:00
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=575967&group_id=22866
Category: JBossServer
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Bruno Lowagie (blowagie)
Assigned to: Nobody/Anonymous (nobody)
Summary: JRMPInvoker / RMISSLServerSocketFactory
Initial Comment:
JRMPInvoker has a method private void
loadCustomSocketFactories()
If you defined a custom serverSocketFactory, an
instance of this factory is made
and the BindAddress is set:
if( serverSocketFactoryName != null )
{
Class ssfClass =
loader.loadClass(serverSocketFactoryName);
serverSocketFactory =
(RMIServerSocketFactory) ssfClass.newInstance();
if( serverAddress != null )
{
// See if the server socket supports
setBindAddress(String)
try
{
Class[] parameterTypes = {String.class};
Method m =
ssfClass.getMethod("setBindAddress", parameterTypes);
Object[] args = {serverAddress};
m.invoke(serverSocketFactory, args);
}
catch (NoSuchMethodException e)
{
log.warn("Socket factory does not
support setBindAddress(String)");
// Go with default address
}
catch (Exception e)
{
log.warn("Failed to
setBindAddress="+serverAddress+" on socket factory", e);
// Go with default address
}
}
}
So far, so good.
But if you use
org.jboss.security.ssl.RMISSLServerSocketFactory
you also have to invoke the setSecurityDomain-method.
Otherwise the RMISSLServerSocketFactory is constructed
WITHOUT
a securityDomain. As a result, a
DomainServerSocketFactory is constructed:
domainFactory = new DomainServerSocketFactory();
Instead of using for instance:
domainFactory = DomainServerSocketFactory.getDefault();
So the securityDomain always remains null and you get a
NullPointerException
upon startup of jBoss.
In other words: it is impossible to use the provided
classes to have
RMI working over SSL.
A quick patch would be to use
DomainServerSocketFactory.getDefault()
in class RMISSLServerSocketFactory.
A more elegant solution would be to check for a
SecurityDomain in the
JRMPInvoker class and to set this variable. This way
people could chose
there own domain instead of using java:/jaas/other.
I hope I have given you enough info to solve this bug,
Bruno
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=575967&group_id=22866
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development