I'm running JMeter which depends on JDK 1.8's Krb5LoginModule.
It seems to me that the Krb5LoginModule can't maintain a kerberos session across multiple requests. This results in a HTTP 401 and renewed handshaking before every request.
I'm trying to reproduce a production environment which has severe intermittent performance issues and I would like to include the Kerberos / SSO authentication in my testing but I can't set it up to run like the Windows clients that use my REST server.
The REST server provides data to hundreds of Excel add-in clients, which are set up to authenticate with Kerberos. In the access logs, I see each client initially triggers an HTTP status 401 response, followed by a 200, and further 200s for the duration of the client's activity.
Just to avoid confusion, the server is handling the Kerberos hand-shaking and is NOT using servlet container sessions.
When my test runs though, I see that every request is rejected by a 401 from the server, Java goes off to the Kerberos KDC to get another ticket, and then resubmits it. While this works, my KDC server can't handle more than a couple of requests every second and times out the requests, so I can't ramp up my load test very much.
So why isn't Krb5LoginModule keeping the kerberos ticket it gets from the KDC and pre-authenticating every call, like Excel does?
This is what I've tried for the config:
JMeter {
com.sun.security.auth.module.Krb5LoginModule required
useTicketCache=true
ticketCache="FILE:krb.cache"
useKeyTab=true
keyTab="FILE:krb.keytab"
storeKey=true
principal="-tsk-thing-ldap-dev@DO.AD.DUM.COM"
debug=true;
};
I've tried with keytabs and without, with ticket caching and without. I hope I'm just doing the config wrong, but I can't see how.
This is what I'm basing my assumption on: Oracle: Single sign-on using Kerberos
and the API: Krb5LoginModule - Oracle JDK 1.8 API docs