From jira-events at lists.jboss.org Mon Dec 3 17:25:52 2007 Content-Type: multipart/mixed; boundary="===============0178558782574299871==" MIME-Version: 1.0 From: Faisal Azizullah (JIRA) To: esb-issues at lists.jboss.org Subject: [esb-issues] [JBoss JIRA] Created: (JBESB-1391) NTLMConfigurator Date: Mon, 03 Dec 2007 17:25:52 -0500 Message-ID: <3848297.1196720752242.JavaMail.jira@cloud.prod.atl2.jboss.com> --===============0178558782574299871== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable NTLMConfigurator ---------------- Key: JBESB-1391 URL: http://jira.jboss.com/jira/browse/JBESB-1391 Project: JBoss ESB Issue Type: Feature Request Security Level: Public (Everyone can see) Components: Rosetta Affects Versions: 4.2.1 Environment: JBOSS ESB 4.2.1 GA Reporter: Faisal Azizullah Fix For: 4.2.1 package org.jboss.soa.esb.http.configurators; /* * *@ author: Faisal Azizullah *@ company : Lewisville ISD * */ import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.NTCredentials; import org.apache.commons.httpclient.auth.AuthScope; import org.jboss.soa.esb.ConfigurationException; import org.jboss.soa.esb.http.Configurator; import java.util.Properties; /** * HTTP NTLM Authentication Configurator. *

* Properties: *

*

* See HttpClient Authentication Guide. * = * = */ public class AuthNTLM extends Configurator { public void configure(HttpClient httpClient, Properties properties) throws= ConfigurationException { String username =3D properties.getProperty("ntauth-username"); String password =3D properties.getProperty("ntauth-password"); String authScopeHost =3D properties.getProperty("ntauthscope-host"); String authScopePort =3D properties.getProperty("ntauthscope-port"); String authScopeRealm =3D properties.getProperty("ntauthscope-realm= "); String authScopeDomain =3D properties.getProperty("ntauthscope-doma= in"); = = = assertPropertySetAndNotBlank(username, "ntauth-username"); assertPropertySetAndNotBlank(password, "ntauth-password"); assertPropertySetAndNotBlank(authScopeHost, "ntauthscope-host"); assertPropertyIsInteger(authScopePort, "ntauthscope-port"); assertPropertySetAndNotBlank(authScopeDomain, "ntauthscope-domain"); Credentials creds =3D new NTCredentials(username, password,authScop= eHost,authScopeDomain); AuthScope authScope; if(authScopeRealm !=3D null && !authScopeRealm.trim().equals("")) { authScope =3D new AuthScope(authScopeHost, Integer.parseInt(aut= hScopePort), authScopeRealm); } else { authScope =3D new AuthScope(authScopeHost, Integer.parseInt(aut= hScopePort)); } httpClient.getState().setCredentials(authScope, creds); } } -- = This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= p://jira.jboss.com/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============0178558782574299871==-- From jira-events at lists.jboss.org Mon Dec 3 17:31:52 2007 Content-Type: multipart/mixed; boundary="===============6216967932091437558==" MIME-Version: 1.0 From: Tom Fennelly (JIRA) To: esb-issues at lists.jboss.org Subject: [esb-issues] [JBoss JIRA] Updated: (JBESB-1391) NTLMConfigurator Date: Mon, 03 Dec 2007 17:31:51 -0500 Message-ID: <2805341.1196721111772.JavaMail.jira@cloud.prod.atl2.jboss.com> In-Reply-To: 3848297.1196720752242.JavaMail.jira@cloud.prod.atl2.jboss.com --===============6216967932091437558== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ http://jira.jboss.com/jira/browse/JBESB-1391?page=3Dall ] Tom Fennelly updated JBESB-1391: -------------------------------- Fix Version/s: 4.3 (was: 4.2.1) > NTLMConfigurator > ---------------- > > Key: JBESB-1391 > URL: http://jira.jboss.com/jira/browse/JBESB-1391 > Project: JBoss ESB > Issue Type: Feature Request > Security Level: Public(Everyone can see) = > Components: Rosetta > Affects Versions: 4.2.1 > Environment: JBOSS ESB 4.2.1 GA > Reporter: Faisal Azizullah > Fix For: 4.3 > > Original Estimate: 0 minutes > Remaining Estimate: 0 minutes > > package org.jboss.soa.esb.http.configurators; > /* > * > *@ author: Faisal Azizullah > *@ company : Lewisville ISD > * > */ > import org.apache.commons.httpclient.HttpClient; > import org.apache.commons.httpclient.Credentials; > import org.apache.commons.httpclient.NTCredentials; > import org.apache.commons.httpclient.auth.AuthScope; > import org.jboss.soa.esb.ConfigurationException; > import org.jboss.soa.esb.http.Configurator; > import java.util.Properties; > /** > * HTTP NTLM Authentication Configurator. > *

> * Properties: > *

> *

> * See HttpClient Authentication Guide. > * = > * = > */ > public class AuthNTLM extends Configurator > { > public void configure(HttpClient httpClient, Properties properties) thro= ws ConfigurationException { > String username =3D properties.getProperty("ntauth-username"); > String password =3D properties.getProperty("ntauth-password"); > String authScopeHost =3D properties.getProperty("ntauthscope-host= "); > String authScopePort =3D properties.getProperty("ntauthscope-port= "); > String authScopeRealm =3D properties.getProperty("ntauthscope-rea= lm"); > String authScopeDomain =3D properties.getProperty("ntauthscope-do= main"); > = > = > = > assertPropertySetAndNotBlank(username, "ntauth-username"); > assertPropertySetAndNotBlank(password, "ntauth-password"); > assertPropertySetAndNotBlank(authScopeHost, "ntauthscope-host"); > assertPropertyIsInteger(authScopePort, "ntauthscope-port"); > assertPropertySetAndNotBlank(authScopeDomain, "ntauthscope-domain= "); > Credentials creds =3D new NTCredentials(username, password,authSc= opeHost,authScopeDomain); > AuthScope authScope; > if(authScopeRealm !=3D null && !authScopeRealm.trim().equals(""))= { > authScope =3D new AuthScope(authScopeHost, Integer.parseInt(a= uthScopePort), authScopeRealm); > } else { > authScope =3D new AuthScope(authScopeHost, Integer.parseInt(a= uthScopePort)); > } > httpClient.getState().setCredentials(authScope, creds); > } > } -- = This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= p://jira.jboss.com/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============6216967932091437558==-- From jira-events at lists.jboss.org Mon Dec 3 17:40:51 2007 Content-Type: multipart/mixed; boundary="===============8717798818297882492==" MIME-Version: 1.0 From: Faisal Azizullah (JIRA) To: esb-issues at lists.jboss.org Subject: [esb-issues] [JBoss JIRA] Commented: (JBESB-1391) NTLMConfigurator Date: Mon, 03 Dec 2007 17:40:51 -0500 Message-ID: <9361047.1196721651734.JavaMail.jira@cloud.prod.atl2.jboss.com> In-Reply-To: 3848297.1196720752242.JavaMail.jira@cloud.prod.atl2.jboss.com --===============8717798818297882492== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ http://jira.jboss.com/jira/browse/JBESB-1391?page=3Dcomments#action_1= 2390361 ] = = Faisal Azizullah commented on JBESB-1391: ----------------------------------------- the Junit test case is as follows package net.lisd.test; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Properties; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.methods.FileRequestEntity; import org.apache.commons.httpclient.methods.PostMethod; import org.apache.commons.httpclient.methods.RequestEntity; import org.jboss.soa.esb.ConfigurationException; import org.jboss.soa.esb.http.configurators.AuthNTLM; import junit.framework.Assert; import junit.framework.TestCase; public class NTLMAuthTest extends TestCase = { public void testNTLMAUTH() { String strURL =3D "http://xxxxxx.lisd.net/InterfaceServices"; String strXMLFilename =3D "c:/testNTLM/Pcard.soap"; //soap message to be = send File input =3D new File(strXMLFilename); Properties props =3D null; // Prepare HTTP post PostMethod post =3D new PostMethod(strURL); AuthNTLM myAuth =3D new AuthNTLM(); //Properties try = { File pro =3D new File("c:/testNTLM/NTLM.properties"); //properties file FileInputStream propertiesF =3D new FileInputStream(pro); = props =3Dnew Properties(); props.load(propertiesF); } catch (IOException e) = { // TODO Auto-generated catch block e.printStackTrace(); } = //Request content will be retrieved directly from the input stream RequestEntity entity =3D new FileRequestEntity(input, "text/xml; charset= =3DISO-8859-1"); post.setRequestEntity(entity); = HttpClient httpclient =3D new HttpClient(); = try { myAuth.configure(httpclient, props); } catch (ConfigurationException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } = = // Execute request try { int result =3D httpclient.executeMethod(post); String aResult =3D post.getResponseBodyAsString(); System.out.println(aResult); = } catch( Exception e) { e.printStackTrace(); Assert.assertTrue(false); } finally { // Release current connection to the connection pool once you a= re done post.releaseConnection(); } } } > NTLMConfigurator > ---------------- > > Key: JBESB-1391 > URL: http://jira.jboss.com/jira/browse/JBESB-1391 > Project: JBoss ESB > Issue Type: Feature Request > Security Level: Public(Everyone can see) = > Components: Rosetta > Affects Versions: 4.2.1 > Environment: JBOSS ESB 4.2.1 GA > Reporter: Faisal Azizullah > Fix For: 4.3 > > Original Estimate: 0 minutes > Remaining Estimate: 0 minutes > > package org.jboss.soa.esb.http.configurators; > /* > * > *@ author: Faisal Azizullah > *@ company : Lewisville ISD > * > */ > import org.apache.commons.httpclient.HttpClient; > import org.apache.commons.httpclient.Credentials; > import org.apache.commons.httpclient.NTCredentials; > import org.apache.commons.httpclient.auth.AuthScope; > import org.jboss.soa.esb.ConfigurationException; > import org.jboss.soa.esb.http.Configurator; > import java.util.Properties; > /** > * HTTP NTLM Authentication Configurator. > *

> * Properties: > *

> *

> * See HttpClient Authentication Guide. > * = > * = > */ > public class AuthNTLM extends Configurator > { > public void configure(HttpClient httpClient, Properties properties) thro= ws ConfigurationException { > String username =3D properties.getProperty("ntauth-username"); > String password =3D properties.getProperty("ntauth-password"); > String authScopeHost =3D properties.getProperty("ntauthscope-host= "); > String authScopePort =3D properties.getProperty("ntauthscope-port= "); > String authScopeRealm =3D properties.getProperty("ntauthscope-rea= lm"); > String authScopeDomain =3D properties.getProperty("ntauthscope-do= main"); > = > = > = > assertPropertySetAndNotBlank(username, "ntauth-username"); > assertPropertySetAndNotBlank(password, "ntauth-password"); > assertPropertySetAndNotBlank(authScopeHost, "ntauthscope-host"); > assertPropertyIsInteger(authScopePort, "ntauthscope-port"); > assertPropertySetAndNotBlank(authScopeDomain, "ntauthscope-domain= "); > Credentials creds =3D new NTCredentials(username, password,authSc= opeHost,authScopeDomain); > AuthScope authScope; > if(authScopeRealm !=3D null && !authScopeRealm.trim().equals(""))= { > authScope =3D new AuthScope(authScopeHost, Integer.parseInt(a= uthScopePort), authScopeRealm); > } else { > authScope =3D new AuthScope(authScopeHost, Integer.parseInt(a= uthScopePort)); > } > httpClient.getState().setCredentials(authScope, creds); > } > } -- = This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= p://jira.jboss.com/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============8717798818297882492==-- From jira-events at lists.jboss.org Fri Apr 18 14:47:47 2008 Content-Type: multipart/mixed; boundary="===============0148518593231425766==" MIME-Version: 1.0 From: Mark Little (JIRA) To: esb-issues at lists.jboss.org Subject: [esb-issues] [JBoss JIRA] Resolved: (JBESB-1391) NTLMConfigurator Date: Fri, 18 Apr 2008 14:47:47 -0400 Message-ID: <4957010.1208544467535.JavaMail.jira@cloud.prod.atl2.jboss.com> In-Reply-To: 3848297.1196720752242.JavaMail.jira@cloud.prod.atl2.jboss.com --===============0148518593231425766== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ http://jira.jboss.com/jira/browse/JBESB-1391?page=3Dall ] Mark Little resolved JBESB-1391. -------------------------------- Resolution: Done Assignee: Mark Little > NTLMConfigurator > ---------------- > > Key: JBESB-1391 > URL: http://jira.jboss.com/jira/browse/JBESB-1391 > Project: JBoss ESB > Issue Type: Feature Request > Security Level: Public(Everyone can see) = > Components: Rosetta > Affects Versions: 4.2.1 > Environment: JBOSS ESB 4.2.1 GA > Reporter: Faisal Azizullah > Assigned To: Mark Little > Fix For: 4.3 > > Original Estimate: 0 minutes > Remaining Estimate: 0 minutes > > package org.jboss.soa.esb.http.configurators; > /* > * > *@ author: Faisal Azizullah > *@ company : Lewisville ISD > * > */ > import org.apache.commons.httpclient.HttpClient; > import org.apache.commons.httpclient.Credentials; > import org.apache.commons.httpclient.NTCredentials; > import org.apache.commons.httpclient.auth.AuthScope; > import org.jboss.soa.esb.ConfigurationException; > import org.jboss.soa.esb.http.Configurator; > import java.util.Properties; > /** > * HTTP NTLM Authentication Configurator. > *

> * Properties: > *

> *

> * See HttpClient Authentication Guide. > * = > * = > */ > public class AuthNTLM extends Configurator > { > public void configure(HttpClient httpClient, Properties properties) thro= ws ConfigurationException { > String username =3D properties.getProperty("ntauth-username"); > String password =3D properties.getProperty("ntauth-password"); > String authScopeHost =3D properties.getProperty("ntauthscope-host= "); > String authScopePort =3D properties.getProperty("ntauthscope-port= "); > String authScopeRealm =3D properties.getProperty("ntauthscope-rea= lm"); > String authScopeDomain =3D properties.getProperty("ntauthscope-do= main"); > = > = > = > assertPropertySetAndNotBlank(username, "ntauth-username"); > assertPropertySetAndNotBlank(password, "ntauth-password"); > assertPropertySetAndNotBlank(authScopeHost, "ntauthscope-host"); > assertPropertyIsInteger(authScopePort, "ntauthscope-port"); > assertPropertySetAndNotBlank(authScopeDomain, "ntauthscope-domain= "); > Credentials creds =3D new NTCredentials(username, password,authSc= opeHost,authScopeDomain); > AuthScope authScope; > if(authScopeRealm !=3D null && !authScopeRealm.trim().equals(""))= { > authScope =3D new AuthScope(authScopeHost, Integer.parseInt(a= uthScopePort), authScopeRealm); > } else { > authScope =3D new AuthScope(authScopeHost, Integer.parseInt(a= uthScopePort)); > } > httpClient.getState().setCredentials(authScope, creds); > } > } -- = This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= p://jira.jboss.com/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============0148518593231425766==-- From jira-events at lists.jboss.org Fri Apr 18 17:53:44 2008 Content-Type: multipart/mixed; boundary="===============3734358838647363227==" MIME-Version: 1.0 From: Mark Little (JIRA) To: esb-issues at lists.jboss.org Subject: [esb-issues] [JBoss JIRA] Closed: (JBESB-1391) NTLMConfigurator Date: Fri, 18 Apr 2008 17:53:44 -0400 Message-ID: <24471176.1208555624664.JavaMail.jira@cloud.prod.atl2.jboss.com> In-Reply-To: 3848297.1196720752242.JavaMail.jira@cloud.prod.atl2.jboss.com --===============3734358838647363227== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ http://jira.jboss.com/jira/browse/JBESB-1391?page=3Dall ] Mark Little closed JBESB-1391. ------------------------------ > NTLMConfigurator > ---------------- > > Key: JBESB-1391 > URL: http://jira.jboss.com/jira/browse/JBESB-1391 > Project: JBoss ESB > Issue Type: Feature Request > Security Level: Public(Everyone can see) = > Components: Rosetta > Affects Versions: 4.2.1 > Environment: JBOSS ESB 4.2.1 GA > Reporter: Faisal Azizullah > Assigned To: Mark Little > Fix For: 4.3 > > Original Estimate: 0 minutes > Remaining Estimate: 0 minutes > > package org.jboss.soa.esb.http.configurators; > /* > * > *@ author: Faisal Azizullah > *@ company : Lewisville ISD > * > */ > import org.apache.commons.httpclient.HttpClient; > import org.apache.commons.httpclient.Credentials; > import org.apache.commons.httpclient.NTCredentials; > import org.apache.commons.httpclient.auth.AuthScope; > import org.jboss.soa.esb.ConfigurationException; > import org.jboss.soa.esb.http.Configurator; > import java.util.Properties; > /** > * HTTP NTLM Authentication Configurator. > *

> * Properties: > *

> *

> * See HttpClient Authentication Guide. > * = > * = > */ > public class AuthNTLM extends Configurator > { > public void configure(HttpClient httpClient, Properties properties) thro= ws ConfigurationException { > String username =3D properties.getProperty("ntauth-username"); > String password =3D properties.getProperty("ntauth-password"); > String authScopeHost =3D properties.getProperty("ntauthscope-host= "); > String authScopePort =3D properties.getProperty("ntauthscope-port= "); > String authScopeRealm =3D properties.getProperty("ntauthscope-rea= lm"); > String authScopeDomain =3D properties.getProperty("ntauthscope-do= main"); > = > = > = > assertPropertySetAndNotBlank(username, "ntauth-username"); > assertPropertySetAndNotBlank(password, "ntauth-password"); > assertPropertySetAndNotBlank(authScopeHost, "ntauthscope-host"); > assertPropertyIsInteger(authScopePort, "ntauthscope-port"); > assertPropertySetAndNotBlank(authScopeDomain, "ntauthscope-domain= "); > Credentials creds =3D new NTCredentials(username, password,authSc= opeHost,authScopeDomain); > AuthScope authScope; > if(authScopeRealm !=3D null && !authScopeRealm.trim().equals(""))= { > authScope =3D new AuthScope(authScopeHost, Integer.parseInt(a= uthScopePort), authScopeRealm); > } else { > authScope =3D new AuthScope(authScopeHost, Integer.parseInt(a= uthScopePort)); > } > httpClient.getState().setCredentials(authScope, creds); > } > } -- = This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= p://jira.jboss.com/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============3734358838647363227==--