0
votes

I am trying to implement a Jmeter script (jmeter version 5.1)for SSO functionality with Kerberos. I have done the set-up in the krb5 and jass conf files and have also updated HTTP Authorization Manager with the Domain,Realm and mechanism as Kerberos.

The script does not output the SAML Response in the URL when running the script. Checking the jmeter logs gives the below error:

2020-02-14 12:32:23,453 WARN o.a.j.p.h.c.KerberosManager: Could not log in user gl0
javax.security.auth.login.LoginException: null (68)
        at com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Unknown Source) ~[?:1.8.0_241]
        at com.sun.security.auth.module.Krb5LoginModule.login(Unknown Source) ~[?:1.8.0_241]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241]
        at javax.security.auth.login.LoginContext.invoke(Unknown Source) ~[?:1.8.0_241]
        at javax.security.auth.login.LoginContext.access$000(Unknown Source) ~[?:1.8.0_241]
        at javax.security.auth.login.LoginContext$4.run(Unknown Source) ~[?:1.8.0_241]
        at javax.security.auth.login.LoginContext$4.run(Unknown Source) ~[?:1.8.0_241]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_241]
        at javax.security.auth.login.LoginContext.invokePriv(Unknown Source) ~[?:1.8.0_241]
        at javax.security.auth.login.LoginContext.login(Unknown Source) ~[?:1.8.0_241]
        at org.apache.jmeter.protocol.http.control.KerberosManager.lambda$getSubjectForUser$0(KerberosManager.java:70) ~[ApacheJMeter_http.jar:5.1 r1853635]
        at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_241]
        at org.apache.jmeter.protocol.http.control.KerberosManager.getSubjectForUser(KerberosManager.java:83) [ApacheJMeter_http.jar:5.1 r1853635]
        at org.apache.jmeter.protocol.http.control.AuthManager.getSubjectForUrl(AuthManager.java:294) [ApacheJMeter_http.jar:5.1 r1853635]
        at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:829) [ApacheJMeter_http.jar:5.1 r1853635]
        at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:572) [ApacheJMeter_http.jar:5.1 r1853635]
        at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:67) [ApacheJMeter_http.jar:5.1 r1853635]
        at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1231) [ApacheJMeter_http.jar:5.1 r1853635]
        at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1220) [ApacheJMeter_http.jar:5.1 r1853635]
        at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622) [ApacheJMeter_core.jar:5.1 r1853635]
        at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546) [ApacheJMeter_core.jar:5.1 r1853635]
        at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486) [ApacheJMeter_core.jar:5.1 r1853635]
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253) [ApacheJMeter_core.jar:5.1 r1853635]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
    Caused by: sun.security.krb5.KrbException: null (68)
        at sun.security.krb5.KrbAsRep.<init>(Unknown Source) ~[?:1.8.0_241]
        at sun.security.krb5.KrbAsReqBuilder.send(Unknown Source) ~[?:1.8.0_241]
        at sun.security.krb5.KrbAsReqBuilder.action(Unknown Source) ~[?:1.8.0_241]
        ... 27 more
1

1 Answers

0
votes

Unfortunately your question doesn't have enough details in order to guess the failure reason, going forward consider adding screenshots of:

  1. HTTP Request sampler
  2. HTTP Authorization Manager
  3. Contents of krb5.conf and jaas.conf files
  4. It would be also beneficial to have more verbose logs, add the next line to log4j2.xml file:

    <Logger name="org.apache.jmeter.protocol.http.control" level="debug" />
    

    and set sun.security.krb5.debug system property to true

More information: