You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Brook Heaton <br...@yahoo.com> on 2008/01/16 18:24:23 UTC

JMeter plugin: WS-Security using Axis 1.4 and WSS4J

Hello-

I am in the process of attempting to create a plugin
for JMeter that allows testing web services secured
with WS-Security encryption and signature.  I have
followed the tutorial on creating plugins for JMeter
and looked at the source code for the Web Service
sampler, and have almost finished my development- I
have the GUI working, at any rate.  I'm doing very
much the same thing as the Web Service sampler-
extending the HTTPSampler, etc.

My problem arises in the implementation of the
sampler; specifically, the sample() method (where the
client actually puts together the WS-Security request
to the server).  In this method, I am using the Apache
Axis 1.4 and Apache WSS4J libraries to compose the
request.  One of the requirements for WSS4J is to
specify a "crypto.properties" file containing
information about the crypto libraries and keystores
used to perform the signature and encryption. 

According the the WSS4J mailing list, there isn't any
way to programmatically set the values contained in
crypto.properties (to avoid having to use
crypto.properties).  The WSS4J mailing list also
states that the crypto.properties file *must* reside
on the classpath.  

So, my problem is that the sampler is unable to find
the crypto.properties file.  I've tried putting the
file inside the jar files, outside the jar files, and
in the lib and bin directories.  I've also specified
the complete path of the file, as well as just the
filename (without path).  I've tried specifying the
classpath in the JMeter jmeter.properties and
user.properties, as well as in the jmeter batch file. 
All with no success- I always get a "Cannot find
crypto.properties" error.  

I suspect the problem has something to do with a) me
being an idiot, or b) the way JMeter handles its class
loading, but I'm too much of a novice to intelligently
understand exactly what's happening.  I'm hoping that
this is an easy question and somebody will be able to
tell me where I need to put the crypto.properties file
in order for my sampler to "find" it.

Thanks

Brook H


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: JMeter plugin: WS-Security using Axis 1.4 and WSS4J

Posted by sahara <om...@gmail.com>.
Hi ,

I would appreciate if you could send me/share the ws-security plug in and
the steps you did in 
Jmeter to perform Message confidentiality and integrity. Please send me an
email at omasahara at gmail dot
com and I owe you one for this as its very critical for me.

Best regards

Sahara.



Eddie Lau wrote:
> 
> Hi,
> 
> 
> I am facing problem when testing Web Service with WS-Security too.
> could you share your WS-Security plugin with us ?
> 
> Thanks in advance ~
> 
> 
> Regards,
> Eddie Lau
> 

-- 
View this message in context: http://www.nabble.com/JMeter-plugin%3A-WS-Security-using-Axis-1.4-and-WSS4J-tp14888443p24975482.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: JMeter plugin: WS-Security using Axis 1.4 and WSS4J

Posted by Eddie Lau <ed...@octopus.com.hk>.
Hi,


I am facing problem when testing Web Service with WS-Security too.
could you share your WS-Security plugin with us ?

Thanks in advance ~


Regards,
Eddie Lau
-- 
View this message in context: http://www.nabble.com/JMeter-plugin%3A-WS-Security-using-Axis-1.4-and-WSS4J-tp14888443p20030464.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: JMeter plugin: WS-Security using Axis 1.4 and WSS4J

Posted by Brook Heaton <br...@yahoo.com>.
Alas, it turns out that the problem was (a)- me being
an idiot.  I forgot to include a trailing slash in the
directory on my classpath where crypto.properties
lives.  I needed d:/file/lib/ instead of d:/file/lib

--- sebb <se...@gmail.com> wrote:

> On 16/01/2008, Brook Heaton <br...@yahoo.com>
> wrote:
> > Hello-
> >
> > I am in the process of attempting to create a
> plugin
> > for JMeter that allows testing web services
> secured
> > with WS-Security encryption and signature.  I have
> > followed the tutorial on creating plugins for
> JMeter
> > and looked at the source code for the Web Service
> > sampler, and have almost finished my development-
> I
> > have the GUI working, at any rate.  I'm doing very
> > much the same thing as the Web Service sampler-
> > extending the HTTPSampler, etc.
> >
> > My problem arises in the implementation of the
> > sampler; specifically, the sample() method (where
> the
> > client actually puts together the WS-Security
> request
> > to the server).  In this method, I am using the
> Apache
> > Axis 1.4 and Apache WSS4J libraries to compose the
> > request.  One of the requirements for WSS4J is to
> > specify a "crypto.properties" file containing
> > information about the crypto libraries and
> keystores
> > used to perform the signature and encryption.
> >
> > According the the WSS4J mailing list, there isn't
> any
> > way to programmatically set the values contained
> in
> > crypto.properties (to avoid having to use
> > crypto.properties).  The WSS4J mailing list also
> > states that the crypto.properties file *must*
> reside
> > on the classpath.
> >
> > So, my problem is that the sampler is unable to
> find
> > the crypto.properties file.  I've tried putting
> the
> > file inside the jar files, outside the jar files,
> and
> > in the lib and bin directories.  I've also
> specified
> > the complete path of the file, as well as just the
> > filename (without path).  I've tried specifying
> the
> > classpath in the JMeter jmeter.properties and
> > user.properties, as well as in the jmeter batch
> file.
> > All with no success- I always get a "Cannot find
> > crypto.properties" error.
> >
> 
> Looks like you've tried a lot there.
> 
> JMeter adds all jars in lib and lib/ext to the
> classpath, and updates
> the system property java.class.path accordingly.
> 
> > I suspect the problem has something to do with a)
> me
> > being an idiot, or b) the way JMeter handles its
> class
> > loading, but I'm too much of a novice to
> intelligently
> > understand exactly what's happening.  I'm hoping
> that
> > this is an easy question and somebody will be able
> to
> > tell me where I need to put the crypto.properties
> file
> > in order for my sampler to "find" it.
> 
> It might help to search the WSS4J code and/or ask on
> the  WSS4J
> mailing list exactly what Java method(s) are used to
> find the file
> (and the classloader).
> 
> > Thanks
> >
> > Brook H
> >
> >
> >     
>
____________________________________________________________________________________
> > Be a better friend, newshound, and
> > know-it-all with Yahoo! Mobile.  Try it now. 
>
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> 
> 



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: JMeter plugin: WS-Security using Axis 1.4 and WSS4J

Posted by sebb <se...@gmail.com>.
On 16/01/2008, Brook Heaton <br...@yahoo.com> wrote:
> Hello-
>
> I am in the process of attempting to create a plugin
> for JMeter that allows testing web services secured
> with WS-Security encryption and signature.  I have
> followed the tutorial on creating plugins for JMeter
> and looked at the source code for the Web Service
> sampler, and have almost finished my development- I
> have the GUI working, at any rate.  I'm doing very
> much the same thing as the Web Service sampler-
> extending the HTTPSampler, etc.
>
> My problem arises in the implementation of the
> sampler; specifically, the sample() method (where the
> client actually puts together the WS-Security request
> to the server).  In this method, I am using the Apache
> Axis 1.4 and Apache WSS4J libraries to compose the
> request.  One of the requirements for WSS4J is to
> specify a "crypto.properties" file containing
> information about the crypto libraries and keystores
> used to perform the signature and encryption.
>
> According the the WSS4J mailing list, there isn't any
> way to programmatically set the values contained in
> crypto.properties (to avoid having to use
> crypto.properties).  The WSS4J mailing list also
> states that the crypto.properties file *must* reside
> on the classpath.
>
> So, my problem is that the sampler is unable to find
> the crypto.properties file.  I've tried putting the
> file inside the jar files, outside the jar files, and
> in the lib and bin directories.  I've also specified
> the complete path of the file, as well as just the
> filename (without path).  I've tried specifying the
> classpath in the JMeter jmeter.properties and
> user.properties, as well as in the jmeter batch file.
> All with no success- I always get a "Cannot find
> crypto.properties" error.
>

Looks like you've tried a lot there.

JMeter adds all jars in lib and lib/ext to the classpath, and updates
the system property java.class.path accordingly.

> I suspect the problem has something to do with a) me
> being an idiot, or b) the way JMeter handles its class
> loading, but I'm too much of a novice to intelligently
> understand exactly what's happening.  I'm hoping that
> this is an easy question and somebody will be able to
> tell me where I need to put the crypto.properties file
> in order for my sampler to "find" it.

It might help to search the WSS4J code and/or ask on the  WSS4J
mailing list exactly what Java method(s) are used to find the file
(and the classloader).

> Thanks
>
> Brook H
>
>
>      ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org