web services - Gatling test fails when digest authentication on -
i developped soap web service. started implement without authentication. works fine : service, call soap ui , gatling tests.
i added digest authentication , cannot make gatling test work (the test soap ui still successful). according gatling documentation (here), supposed call .digestauth(login, pass) on http request:
val scn = scenario("scenario") .feed(feeder) .feed(feeder2) .forever{ exec( http("myrequest") .post(target) .digestauth("login","pass") .body(elfilebody("request.wsdl")) .headers(headers_2) ) } the answer server 500 error message :
jul 07, 2015 4:27:31 pm com.sun.xml.wss.impl.securityrecipient processmessagepolicy schwerwiegend: wss0253: message not conform configured policy: no security header found in message
update :
i'm using latest version of gatling 2.1.6
i cannot share webservice here how configured.
spring-servlet.xml
<sws:interceptors> <bean id="wssecurityinterceptor" class="org.springframework.ws.soap.security.xwss.xwssecurityinterceptor"> <property name="policyconfiguration" value="classpath:securitypolicy.xml" /> <property name="callbackhandlers"> <list> <ref bean="passwordvalidationhandler" /> </list> </property> </bean> </sws:interceptors> <bean id="passwordvalidationhandler" class="org.springframework.ws.soap.security.xwss.callback.simplepasswordvalidationcallbackhandler"> <property name="users"> <props> <prop key="user">password</prop> </props> </property> </bean> and securitypolicy.xml
<?xml version="1.0" encoding="utf-8"?> <xwss:securityconfiguration xmlns:xwss="http://java.sun.com/xml/ns/xwss/config"> <xwss:requireusernametoken passworddigestrequired="true" noncerequired="true" /> </xwss:securityconfiguration> update 2: here full request , response gatling logs:
10:06:57.243 [warn ] i.g.h.a.asynchandleractor - request 'post_addresscheck' failed: status.find.in(200,304,201,202,203,204,205,206,207,208,209), found 500 10:06:57.244 [trace] i.g.h.a.asynchandleractor - http://localhost:8000/root/checkaddresshttp://localhost:8000/root/checkaddress headers= accept-encoding: gzip,deflate content-type: text/xml;charset=utf-8 content-length: 1830 connection: keep-alive host: localhost:8000 accept: */* realm=realm{principal='user', password='password', scheme=digest, realmname='', nonce='', algorithm='md5', response='', qop='auth', nc='00000001', cno nce='', uri='null', methodname='get', useabsoluteuri='true', omitquery='false'} ========================= http response: status= 500 internal server error headers= server: [apache-coyote/1.1] accept: [text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2] soapaction: [""] content-type: [text/xml;charset=utf-8] content-length: [605] date: [thu, 09 jul 2015 08:06:57 gmt] connection: [close] did miss in test definition?
i think there might confusion here: gatling supports http digest auth, not wss digest auth (where creds passed soap header, inside body, instead of http header).
Comments
Post a Comment