Hi Guilaume,

Thanks a lot for the help and sample provided. With that the servicemix
server become securer. 

However, we got another problem in managing the servicemix with ant task
when the authentication is required. I found that it is because JbiTask does
not acquire the JMX connection with the username and password provided. I
have downloded the source code of JbiTask (Revision: 391950) and found that
the following method connecting to the JMX server with URL only. 

    public JMXConnector getJMXConnector (JMXServiceURL url) throws
IOException {
        return JMXConnectorFactory.connect(url);
    }

Should we modify it to something like: 

    public JMXConnector getJMXConnector (JMXServiceURL url) throws
IOException {
        String[] credentials = new String[]{getUsername(),getPassword()};
        Map environment = new HashMap();
        environment.put(JMXConnector.CREDENTIALS, credentials);
        return JMXConnectorFactory.connect(url,environment);
    }

Or modify the JbiTask interface to let it to accept a more generic
credential, e.g. password file? 

Thanks and regards,
William
--
View this message in context: 
http://www.nabble.com/How-to-security-JMX-Connection-without-deploying-ServiceMix-to-Geronimo-t1354635.html#a4113704
Sent from the ServiceMix - User forum at Nabble.com.

Reply via email to