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

Can't configure standalone Jetty for hawtio authentication #3398

Open
grgrzybek opened this issue Apr 18, 2024 · 0 comments
Open

Can't configure standalone Jetty for hawtio authentication #3398

grgrzybek opened this issue Apr 18, 2024 · 0 comments
Assignees
Milestone

Comments

@grgrzybek
Copy link
Contributor

The instructions at https://hawt.io/docs/security.html#_jetty already mention problems with Jetty.

The problem is:

15:57:14 WARN {qtp191382150-33} : Login failed due to: java.lang.NullPointerException: Cannot invoke "org.eclipse.jetty.jaas.JAASLoginService.getBean(java.lang.Class)" because the return value of "java.lang.ThreadLocal.get()" is null
	at org.eclipse.jetty.jaas.spi.PropertyFileLoginModule.setupPropertyUserStore(PropertyFileLoginModule.java:71)
	at org.eclipse.jetty.jaas.spi.PropertyFileLoginModule.initialize(PropertyFileLoginModule.java:56)
	at java.base/javax.security.auth.login.LoginContext.invoke(LoginContext.java:745)
	at java.base/javax.security.auth.login.LoginContext$4.run(LoginContext.java:679)
	at java.base/javax.security.auth.login.LoginContext$4.run(LoginContext.java:677)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
	at java.base/javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:677)
	at java.base/javax.security.auth.login.LoginContext.login(LoginContext.java:587)
	at io.hawt.system.Authenticator.login(Authenticator.java:210)
	at io.hawt.system.Authenticator.doAuthenticate(Authenticator.java:184)
	at io.hawt.system.Authenticator.authenticate(Authenticator.java:155)
	at io.hawt.web.auth.LoginServlet.doPost(LoginServlet.java:68)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:520)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:587)
...

and the reason is that org.eclipse.jetty.jaas.spi.PropertyFileLoginModule requires a web application with proper <login-config>, while Hawtio has custom authentication.

It'd be nice to provide easy way for people who want to use Jetty.

@grgrzybek grgrzybek self-assigned this Apr 18, 2024
@tadayosi tadayosi added this to the 2024Q2 milestone Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

2 participants