1 Reply Latest reply on Feb 11, 2011 10:26 AM by simone.mori

    Please help with JBoss AS 5.1.0 Ntlm Proxy Authentication

    simone.mori

      Hello,

       

      I've this problem:

       

      I have a jboss server running on a ubuntu 10.10. From a lots of ejb running on this server, I need to connect to an internet web server.

       

      Now the problem is that the JBoss server hosting machine is behind an ISA proxy Server, that requires an NTLM authentication.

      I've defined the proxy server and the proxy port through the -Dhttp.proxyHost and -Dhttp.proxyPort JVM define and the domain name through the -Dhttp.auth.ntlm.domain.

       

      Now I need to set up an authenticator to send the username and the password to the proxy.

       

      How can I do this and where should I put the code Authenticator.setDefault(...), I would not like to put it in every EJB.

       

      Thank in advance.

       

      Simone Mori

        • 1. Please help with JBoss AS 5.1.0 Ntlm Proxy Authentication
          simone.mori

          I've found a working solution, but I don't know if it could be considered right.

           

          I've coded an MBean and deployed it as a jmx service.

           

          When this service starts it reads from a property files the desired proxy settings and issues all the System.getProperties().put(...) values needed to set up the use of a proxy.

           

          Also it call the Authenticator.setDefault() to provide a way to send username and password to the proxy.

           

          Hope this idea could help someone.

           

          Feel free to contact me if you have any idea or suggestion.

           

          Simone Mori