Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359675 - jaas broken after refactoring
Summary: jaas broken after refactoring
Status: CLOSED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: server (show other bugs)
Version: 7.5.1   Edit
Hardware: All All
: P3 blocker (vote)
Target Milestone: 7.5.x   Edit
Assignee: Jesse McConnell CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-03 02:57 EDT by Jan Bartel CLA
Modified: 2011-10-03 18:53 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Bartel CLA 2011-10-03 02:57:42 EDT
When using JAAS (with the PropertyFileLoginModule enabled), trying to authenticate now results in:

2011-10-03 17:50:37.466:WARN:oejpj.JAASLoginService:
javax.security.auth.login.LoginException: java.lang.ArrayStoreException: org.eclipse.jetty.security.MappedLoginService$KnownUser
	at org.eclipse.jetty.plus.jaas.spi.AbstractLoginModule.login(AbstractLoginModule.java:249)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
	at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
	at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
	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:579)
	at org.eclipse.jetty.plus.jaas.JAASLoginService.login(JAASLoginService.java:217)
	at org.eclipse.jetty.security.authentication.FormAuthenticator.validateRequest(FormAuthenticator.java:184)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:442)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:940)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:874)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
	at org.eclipse.jetty.server.Server.handle(Server.java:349)
	at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
	at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:931)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:784)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:223)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:52)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:555)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:43)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
Comment 1 Jesse McConnell CLA 2011-10-03 18:53:35 EDT
fixed

the getUserInfo() call was trying to stuff Principal into a String[]