Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in jetty-jaas PropertyFileLoginModule.setupPropertyUserStore on recent versions #6223

Closed
stevenpyzhang opened this issue Apr 28, 2021 · 4 comments
Assignees

Comments

@stevenpyzhang
Copy link

Jetty version
9.4.39.v20210325

Java version

 mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/local/Cellar/maven/3.6.3/libexec
Java version: 1.8.0_202-ea, vendor: Oracle Corporation,

Description

While trying to update Jetty versions from 9.4.28.v20200408 to a more recent one, our build experienced NPE in multiple auth tests in Jetty

[2021-04-28 14:48:56,164] ERROR Failed to log in. java.lang.NullPointerException
	at org.eclipse.jetty.jaas.spi.PropertyFileLoginModule.setupPropertyUserStore(PropertyFileLoginModule.java:78)
	at org.eclipse.jetty.jaas.spi.PropertyFileLoginModule.initialize(PropertyFileLoginModule.java:63)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at javax.security.auth.login.LoginContext.invoke(LoginContext.java:736)
	at javax.security.auth.login.LoginContext.access$000(LoginContext.java:195)
	at javax.security.auth.login.LoginContext$4.run(LoginContext.java:682)
	at javax.security.auth.login.LoginContext$4.run(LoginContext.java:680)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
	at javax.security.auth.login.LoginContext.login(LoginContext.java:587)
...
	at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:313)
	at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)

I think it might be related to some changes that happened in this PR #5518
Upgrading up to 9.4.34.v20201102 works fine, but any version after that fails

Any idea on why this could be happening?

@janbartel janbartel self-assigned this Apr 28, 2021
@janbartel
Copy link
Contributor

That seems strange - it would indicate that the thread that has called JAASLoginService.login() is different than the thread that has called PropertyFileLoginModule.initialize() and I don't see how that can happen. Can you post the full stacktrace? And can you get some more debugging info, including thread names? Is there any more light you can shed on your setup and how you're using jetty?

@janbartel
Copy link
Contributor

@stevenpyzhang nudge: any more info?

@janbartel
Copy link
Contributor

@stevenpyzhang ?

@janbartel
Copy link
Contributor

Closing this issue due to lack of further info after more than 12 months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants