Authentication Negotiate: working sample

Hi there,

Noob to the world of Gatling for my enterprise, the tool was sold me as “easy like 1+1 to use”.
Well, well.

I have an application: www.application.com

Which authenticate user using Kerberos (Tomcat + Spnego).

The browser recieved first a 401 http then send a WWW-Authenticate:“Negotiate oYHrMIHo…==”

My Windows login is: “domain\j.doe”, my password “pass” and my desktop named “jdoedesk”.

So, i get a try:

package computerdatabase
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._

class JDoeTest01 extends Simulation {
val httpConf = http
.baseURL(“http://www.application.com”)

val scn = scenario(“First test”)
.exec(http(“request_1”)
.get("/")
.basicAuth(“j.doe”,“pass”))

setUp(scn.inject(atOnceUsers(1)).protocols(httpConf))
}

KO.

.ntlmAuth(“j.doe”,“pass”,“domain”,“jdoedesk”))

KO

Each time: 401 !
13:55:43.051 [WARN ] i.g.h.a.ResponseProcessor - Request ‘request_1’ failed: status.find.in(200,304,201,202,203,204,205,206,207,208,209), but actually found 401

Am i missing an easy thing ? :slight_smile:

Thanx by advance.

FYvon

Noob to the world of Gatling for my enterprise, the tool was sold me as
"easy like 1+1 to use".
Well, well.

Well, Kerberos and Spnego are typically the kind of entreprisey things that
open source projects have a hard time building and testing.

.ntlmAuth("j.doe","pass","domain","jdoedesk"))

KO

Which version of Gatling do you use? If you use an old one, have you tried
upgrading?
If using latest version still doesn't work, could you please provide (maybe
offline) the sequence of HTTP requests/responses produced by Gatling, and
the expected/working one produced by your browser?

*Stéphane Landelle*
*GatlingCorp CEO*
slandelle@gatling.io

Thanks for your quick answer !

My Gatling version : 2.2.1

For the http requests, i need to put Gatling in debug mode ?

For what i except:
with a F12 enabled on FireFox

i first get a 401
then a 200 transmitting the ntlmAuth ticket

Is it enough ?

For the http requests, i need to put Gatling in debug mode ?

Yes.

For what i except:
with a F12 enabled on FireFox
> i first get a 401
> then a 200 transmitting the ntlmAuth ticket

Is it enough ?

No.

I need the full sequence of requests and responses with their headers.
I'm not familiar with IE (haven't used for years), but with Chrome, you
case export your network traffic from the Network tab in Dev tools.
Or you can use Charles <https://www.charlesproxy.com/> proxy.

*Stéphane Landelle*
*GatlingCorp CEO*
slandelle@gatling.io