You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by waseemfa <fa...@gmail.com> on 2015/10/21 09:07:23 UTC

Issue with kerberos

Hi,

Not sure where I am going wrong here.  I have a HTTP Authorization Manager
with the following details

Username : Test
Password : Pass
Domain : Test
Realm : Test.com
Mechanism : Kerberos

and have configured the krb5.conf and jass.conf file as per the domain
requirements.  I get the following error while trying to authenticate a user

/2015/10/21 12:26:28 WARN  - jmeter.protocol.http.control.KerberosManager:
Execution of getting subject for Test failed
java.util.concurrent.ExecutionException: java.lang.SecurityException:
java.io.IOException: Configuration Error:
	Line 10: expected [controlFlag]
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at
org.apache.jmeter.protocol.http.control.KerberosManager.getSubjectForUser(KerberosManager.java:92)
	at
org.apache.jmeter.protocol.http.control.AuthManager.getSubjectForUrl(AuthManager.java:278)
	at
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:501)
	at
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:330)
	at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
	at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1144)
	at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1133)
	at
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:434)
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.SecurityException: java.io.IOException: Configuration
Error:
	Line 10: expected [controlFlag]
	at sun.security.provider.ConfigFile$Spi.<init>(ConfigFile.java:137)
	at sun.security.provider.ConfigFile.<init>(ConfigFile.java:102)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
	at java.lang.Class.newInstance(Class.java:442)
	at javax.security.auth.login.Configuration$2.run(Configuration.java:255)
	at javax.security.auth.login.Configuration$2.run(Configuration.java:247)
	at java.security.AccessController.doPrivileged(Native Method)
	at
javax.security.auth.login.Configuration.getConfiguration(Configuration.java:246)
	at javax.security.auth.login.LoginContext$1.run(LoginContext.java:245)
	at javax.security.auth.login.LoginContext$1.run(LoginContext.java:243)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.login.LoginContext.init(LoginContext.java:243)
	at javax.security.auth.login.LoginContext.<init>(LoginContext.java:417)
	at
org.apache.jmeter.protocol.http.control.KerberosManager$1.call(KerberosManager.java:71)
	at
org.apache.jmeter.protocol.http.control.KerberosManager$1.call(KerberosManager.java:65)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at
org.apache.jmeter.protocol.http.control.KerberosManager.getSubjectForUser(KerberosManager.java:89)
	... 9 more
Caused by: java.io.IOException: Configuration Error:
	Line 10: expected [controlFlag]
	at sun.security.provider.ConfigFile$Spi.ioException(ConfigFile.java:666)
	at sun.security.provider.ConfigFile$Spi.match(ConfigFile.java:572)
	at
sun.security.provider.ConfigFile$Spi.parseLoginEntry(ConfigFile.java:454)
	at sun.security.provider.ConfigFile$Spi.readConfig(ConfigFile.java:427)
	at sun.security.provider.ConfigFile$Spi.init(ConfigFile.java:329)
	at sun.security.provider.ConfigFile$Spi.init(ConfigFile.java:271)
	at sun.security.provider.ConfigFile$Spi.<init>(ConfigFile.java:135)
	... 28 more/

Can someone help me out here.  Thanks in advance.

-Waseem




--
View this message in context: http://jmeter.512774.n5.nabble.com/Issue-with-kerberos-tp5723361.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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


Re: Issue with kerberos

Posted by Felix Schumacher <fe...@internetallee.de>.

Am 21. Oktober 2015 12:50:45 MESZ, schrieb waseemfa <fa...@gmail.com>:
>I dont see that there is another jaas.conf file.  These are the
>properties
>set in 'systems.properties' file
>
>/java.security.krb5.conf=krb5.conf
>java.security.auth.login.config=jaas.conf/

What happens, if you move the semicolon at the end just before the closing brace. What happens, if you remove the "debug=true"?

Every reference to this kind of error I have found by Google leads to a configuration error in jaas.conf.

Have you tried the original conf? I don't think that you need to modify it. 

Regards, 
Felix 
>
>
>
>--
>View this message in context:
>http://jmeter.512774.n5.nabble.com/Issue-with-kerberos-tp5723361p5723367.html
>Sent from the JMeter - User mailing list archive at Nabble.com.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>For additional commands, e-mail: user-help@jmeter.apache.org


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


Re: Issue with kerberos

Posted by waseemfa <fa...@gmail.com>.
I dont see that there is another jaas.conf file.  These are the properties
set in 'systems.properties' file

/java.security.krb5.conf=krb5.conf
java.security.auth.login.config=jaas.conf/



--
View this message in context: http://jmeter.512774.n5.nabble.com/Issue-with-kerberos-tp5723361p5723367.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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


Re: Issue with kerberos

Posted by Felix Schumacher <fe...@internetallee.de>.

Am 21. Oktober 2015 10:00:56 MESZ, schrieb waseemfa <fa...@gmail.com>:
>Felix,
>
>My jaas.conf file looks like this
>
>JMeter {
>    com.sun.security.auth.module.Krb5LoginModule required
>    doNotPrompt=false
>    useKeyTab=false
>    storeKey=false;
>	debug=true
>};
>
>Tried removing the semicolon after 'storeKey=false' but that didnt
>seems to
>help here.

Maybe there is another jaas.conf which gets used? Have you checked that that jass.conf is referenced by the properties? 

Regards, 
Felix 
>
>
>
>--
>View this message in context:
>http://jmeter.512774.n5.nabble.com/Issue-with-kerberos-tp5723361p5723365.html
>Sent from the JMeter - User mailing list archive at Nabble.com.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>For additional commands, e-mail: user-help@jmeter.apache.org


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


Re: Issue with kerberos

Posted by waseemfa <fa...@gmail.com>.
Felix,

My jaas.conf file looks like this

JMeter {
    com.sun.security.auth.module.Krb5LoginModule required
    doNotPrompt=false
    useKeyTab=false
    storeKey=false;
	debug=true
};

Tried removing the semicolon after 'storeKey=false' but that didnt seems to
help here.



--
View this message in context: http://jmeter.512774.n5.nabble.com/Issue-with-kerberos-tp5723361p5723365.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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


Re: Issue with kerberos

Posted by Felix Schumacher <fe...@internetallee.de>.

Am 21. Oktober 2015 09:07:23 MESZ, schrieb waseemfa <fa...@gmail.com>:
>Hi,
>
>Not sure where I am going wrong here.  I have a HTTP Authorization
>Manager
>with the following details
>
>Username : Test
>Password : Pass
>Domain : Test
>Realm : Test.com
>Mechanism : Kerberos
>
>and have configured the krb5.conf and jass.conf file as per the domain
>requirements.  I get the following error while trying to authenticate a
>user
>
>/2015/10/21 12:26:28 WARN  -
>jmeter.protocol.http.control.KerberosManager:
>Execution of getting subject for Test failed
>java.util.concurrent.ExecutionException: java.lang.SecurityException:
>java.io.IOException: Configuration Error:
>	Line 10: expected [controlFlag]
...
>Caused by: java.lang.SecurityException: java.io.IOException:
>Configuration
>Error:
>	Line 10: expected [controlFlag]
>	at sun.security.provider.ConfigFile$Spi.<init>(ConfigFile.java:137)

Can you show us your jaas.conf? You probably have a semicolon where it is not allowed. 

Regards, 
Felix 

>	at sun.security.provider.ConfigFile.<init>(ConfigFile.java:102)
>	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>Method)
>	at
>sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>	at
>sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
>	at java.lang.Class.newInstance(Class.java:442)
>	at
>javax.security.auth.login.Configuration$2.run(Configuration.java:255)
>	at
>javax.security.auth.login.Configuration$2.run(Configuration.java:247)
>	at java.security.AccessController.doPrivileged(Native Method)
>	at
>javax.security.auth.login.Configuration.getConfiguration(Configuration.java:246)
>	at javax.security.auth.login.LoginContext$1.run(LoginContext.java:245)
>	at javax.security.auth.login.LoginContext$1.run(LoginContext.java:243)
>	at java.security.AccessController.doPrivileged(Native Method)
>	at javax.security.auth.login.LoginContext.init(LoginContext.java:243)
>	at
>javax.security.auth.login.LoginContext.<init>(LoginContext.java:417)
>	at
>org.apache.jmeter.protocol.http.control.KerberosManager$1.call(KerberosManager.java:71)
>	at
>org.apache.jmeter.protocol.http.control.KerberosManager$1.call(KerberosManager.java:65)
>	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>	at
>org.apache.jmeter.protocol.http.control.KerberosManager.getSubjectForUser(KerberosManager.java:89)
>	... 9 more
>Caused by: java.io.IOException: Configuration Error:
>	Line 10: expected [controlFlag]
>	at
>sun.security.provider.ConfigFile$Spi.ioException(ConfigFile.java:666)
>	at sun.security.provider.ConfigFile$Spi.match(ConfigFile.java:572)
>	at
>sun.security.provider.ConfigFile$Spi.parseLoginEntry(ConfigFile.java:454)
>	at
>sun.security.provider.ConfigFile$Spi.readConfig(ConfigFile.java:427)
>	at sun.security.provider.ConfigFile$Spi.init(ConfigFile.java:329)
>	at sun.security.provider.ConfigFile$Spi.init(ConfigFile.java:271)
>	at sun.security.provider.ConfigFile$Spi.<init>(ConfigFile.java:135)
>	... 28 more/
>
>Can someone help me out here.  Thanks in advance.
>
>-Waseem
>
>
>
>
>--
>View this message in context:
>http://jmeter.512774.n5.nabble.com/Issue-with-kerberos-tp5723361.html
>Sent from the JMeter - User mailing list archive at Nabble.com.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>For additional commands, e-mail: user-help@jmeter.apache.org


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


Re: Issue with kerberos

Posted by waseemfa <fa...@gmail.com>.
Adding the message from the HTTP Request as well

Thread Name: Thread Group 1-1
Sample Start: 2015-10-21 12:39:21 IST
Load time: 678
Connect Time: 259
Latency: 678
Size in bytes: 141
Headers size in bytes: 141
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Data type ("text"|"bin"|""): 
Response code: 401
Response message: Unauthorized

Response headers:
HTTP/1.1 401 Unauthorized
Server: Apache-Coyote/1.1
WWW-Authenticate: Negotiate
Content-Length: 0
Date: Wed, 21 Oct 2015 07:09:21 GMT


HTTPSampleResult fields:
ContentType: 
DataEncoding: null



--
View this message in context: http://jmeter.512774.n5.nabble.com/Issue-with-kerberos-tp5723361p5723362.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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


Re: Issue with kerberos

Posted by waseemfa <fa...@gmail.com>.
Sorry here.

The previous update was because we had our own custom version of kerberos
configured.

By setting options on the JVM command line with -D, I was able to run the
program with Kerberos.

Thanks,
Waseem.



--
View this message in context: http://jmeter.512774.n5.nabble.com/Issue-with-kerberos-tp5723361p5723375.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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


Re: Issue with kerberos

Posted by waseemfa <fa...@gmail.com>.
Felix,

Removing the "debug=true" helped for that issue.

Getting a new error now

jmeter.protocol.http.control.KerberosManager: Could not log in user Test
javax.security.auth.login.LoginException: Pre-authentication information was
invalid (24)
	at
com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:804)
	at
com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:617)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)



--
View this message in context: http://jmeter.512774.n5.nabble.com/Issue-with-kerberos-tp5723361p5723374.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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