JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Create Issue
  • Mule
  • MULE-1269

NPE in AcegiAuthenticationAdapter

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.3.2
  • Fix Version/s: None
  • Component/s: Modules: Security (Spring Security, Acegi, PGP, WS-Security)
  • Labels:
    None
  • Environment:

    Windows XP Professional 2003, Java 5

  • User impact:
    Low
  • Log Output:
    Hide
    DEBUG 2006-12-14 16:55:07,187 [connector.http.0.http.ProvidencePresentationService.receiver.2] org.mule.providers.http.HttpMessageReceiver: Message Payload:
    {60,115,111,97,112,58,69,110,118,101,108,111,112,101,32,120,109,108,110,115,58,115,111,97,112,61,34,104,116,116,112,58,47,47,115,99,104,101,109,97,115,46,120,109,108,115,111,97,112,46 [..]}
    DEBUG 2006-12-14 16:55:07,187 [connector.http.0.http.ProvidencePresentationService.receiver.2] org.mule.impl.MuleSession: There is no session id on the request using key: ID. Generating new session id: c2dc791f-8bbd-11db-9cea-316415bcfc4d
    DEBUG 2006-12-14 16:55:07,187 [connector.http.0.http.ProvidencePresentationService.receiver.2] org.mule.extras.acegi.filters.http.HttpBasicAuthenticationFilter: Authorization header: Basic amRlbWljOm51bGw=
    DEBUG 2006-12-14 16:55:07,187 [connector.http.0.http.ProvidencePresentationService.receiver.2] org.mule.impl.security.MuleSecurityManager: Authentication attempt using org.mule.extras.acegi.AcegiProviderAdapter
    ERROR 2006-12-14 16:55:07,187 [connector.http.0.http.ProvidencePresentationService.receiver.2] org.mule.impl.DefaultExceptionStrategy: Caught exception in Exception Strategy: null
    java.lang.NullPointerException
    at org.mule.extras.acegi.AcegiAuthenticationAdapter.hashCode(AcegiAuthenticationAdapter.java:70)
    at java.lang.Object.toString(Unknown Source)
    at org.mule.extras.acegi.filters.http.HttpBasicAuthenticationFilter.authenticateInbound(HttpBasicAuthenticationFilter.java:154)
    at org.mule.impl.security.AbstractEndpointSecurityFilter.authenticate(AbstractEndpointSecurityFilter.java:157)
    at org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:527)
    at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:305)
    at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:262)
    at org.mule.providers.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:235)
    at org.mule.impl.work.WorkerContext.run(WorkerContext.java:317)
    at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
    at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
    at java.lang.Thread.run(Unknown Source)
    ERROR 2006-12-14 16:55:07,187 [connector.http.0.http.ProvidencePresentationService.receiver.2] org.mule.impl.DefaultExceptionStrategy: Caught exception in Exception Strategy: null
    java.lang.NullPointerException
    at org.mule.extras.acegi.AcegiAuthenticationAdapter.hashCode(AcegiAuthenticationAdapter.java:70)
    at java.lang.Object.toString(Unknown Source)
    at org.mule.extras.acegi.filters.http.HttpBasicAuthenticationFilter.authenticateInbound(HttpBasicAuthenticationFilter.java:154)
    at org.mule.impl.security.AbstractEndpointSecurityFilter.authenticate(AbstractEndpointSecurityFilter.java:157)
    at org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:527)
    at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:305)
    at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:262)
    at org.mule.providers.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:235)
    at org.mule.impl.work.WorkerContext.run(WorkerContext.java:317)
    at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
    at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
    at java.lang.Thread.run(Unknown Source)
    Show
    DEBUG 2006-12-14 16:55:07,187 [connector.http.0.http.ProvidencePresentationService.receiver.2] org.mule.providers.http.HttpMessageReceiver: Message Payload: {60,115,111,97,112,58,69,110,118,101,108,111,112,101,32,120,109,108,110,115,58,115,111,97,112,61,34,104,116,116,112,58,47,47,115,99,104,101,109,97,115,46,120,109,108,115,111,97,112,46 [..]} DEBUG 2006-12-14 16:55:07,187 [connector.http.0.http.ProvidencePresentationService.receiver.2] org.mule.impl.MuleSession: There is no session id on the request using key: ID. Generating new session id: c2dc791f-8bbd-11db-9cea-316415bcfc4d DEBUG 2006-12-14 16:55:07,187 [connector.http.0.http.ProvidencePresentationService.receiver.2] org.mule.extras.acegi.filters.http.HttpBasicAuthenticationFilter: Authorization header: Basic amRlbWljOm51bGw= DEBUG 2006-12-14 16:55:07,187 [connector.http.0.http.ProvidencePresentationService.receiver.2] org.mule.impl.security.MuleSecurityManager: Authentication attempt using org.mule.extras.acegi.AcegiProviderAdapter ERROR 2006-12-14 16:55:07,187 [connector.http.0.http.ProvidencePresentationService.receiver.2] org.mule.impl.DefaultExceptionStrategy: Caught exception in Exception Strategy: null java.lang.NullPointerException at org.mule.extras.acegi.AcegiAuthenticationAdapter.hashCode(AcegiAuthenticationAdapter.java:70) at java.lang.Object.toString(Unknown Source) at org.mule.extras.acegi.filters.http.HttpBasicAuthenticationFilter.authenticateInbound(HttpBasicAuthenticationFilter.java:154) at org.mule.impl.security.AbstractEndpointSecurityFilter.authenticate(AbstractEndpointSecurityFilter.java:157) at org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:527) at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:305) at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:262) at org.mule.providers.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:235) at org.mule.impl.work.WorkerContext.run(WorkerContext.java:317) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528) at java.lang.Thread.run(Unknown Source) ERROR 2006-12-14 16:55:07,187 [connector.http.0.http.ProvidencePresentationService.receiver.2] org.mule.impl.DefaultExceptionStrategy: Caught exception in Exception Strategy: null java.lang.NullPointerException at org.mule.extras.acegi.AcegiAuthenticationAdapter.hashCode(AcegiAuthenticationAdapter.java:70) at java.lang.Object.toString(Unknown Source) at org.mule.extras.acegi.filters.http.HttpBasicAuthenticationFilter.authenticateInbound(HttpBasicAuthenticationFilter.java:154) at org.mule.impl.security.AbstractEndpointSecurityFilter.authenticate(AbstractEndpointSecurityFilter.java:157) at org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:527) at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:305) at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:262) at org.mule.providers.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:235) at org.mule.impl.work.WorkerContext.run(WorkerContext.java:317) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528) at java.lang.Thread.run(Unknown Source)
  • Similar Issues:
    None

Description

When Mule is running under a DEBUG log level, the following debug statement in HttpBasicAuthenticationFilter.java causes an NPE to be thrown after a successful authentication.

// Authentication success
if (logger.isDebugEnabled())

{ logger.debug("Authentication success: " + authResult.toString()); }

UMOSecurityContext context = getSecurityManager().createSecurityContext(authResult);

this seems to be because the "delegate" member of authResult is null.

Issue Links

relates to

Bug - A problem which impairs or prevents the functions of the product. MULE-991 Mule Authentication with CAS through Acegi is troublesome

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Open - The issue is open and ready for the assignee to start work on it.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds
Hide
Permalink
Marie Claire Rizzo added a comment - 15/Dec/06 03:02 AM

Hi

I just checked this out and nothing seems to be wrong with the filter (even when running mule under a debug log level)... If the authentication succeeds, then the authResult "delegate" member should contain the UsernamePasswordAuthenticationToken. The fact that you're getting a null in the delegate is strange.

Could you please give us more detail about your configuration so that we may see where the problem is?

Show
Marie Claire Rizzo added a comment - 15/Dec/06 03:02 AM Hi I just checked this out and nothing seems to be wrong with the filter (even when running mule under a debug log level)... If the authentication succeeds, then the authResult "delegate" member should contain the UsernamePasswordAuthenticationToken. The fact that you're getting a null in the delegate is strange. Could you please give us more detail about your configuration so that we may see where the problem is?
Hide
Permalink
john demic added a comment - 15/Dec/06 01:54 PM

Marie,

I am using CAS as my security provider in acegi, and as such I think the issue is related to this:

http://dev.mulesource.com/jira/browse/MULE-991

When I pass a username that is not CasProcessingFilter.CAS_STATELESS_IDENTIFIER, the NPE is thrown. Passing in that username allows
the filter to proceed normally.

Show
john demic added a comment - 15/Dec/06 01:54 PM Marie, I am using CAS as my security provider in acegi, and as such I think the issue is related to this: http://dev.mulesource.com/jira/browse/MULE-991 When I pass a username that is not CasProcessingFilter.CAS_STATELESS_IDENTIFIER, the NPE is thrown. Passing in that username allows the filter to proceed normally.
Hide
Permalink
Marie Claire Rizzo added a comment - 03/May/07 05:24 AM

Linked to MULE-991, which is the problem with the CAS implementation.

Show
Marie Claire Rizzo added a comment - 03/May/07 05:24 AM Linked to MULE-991, which is the problem with the CAS implementation.
Hide
Permalink
Dirk Olmes added a comment - 30/Jan/08 11:15 PM

descoping from 1.4.4 release

Show
Dirk Olmes added a comment - 30/Jan/08 11:15 PM descoping from 1.4.4 release
Hide
Permalink
Ross Mason added a comment - 29/Nov/08 07:08 PM

I'm pritty sure you'll end up fixing this with your changes

Show
Ross Mason added a comment - 29/Nov/08 07:08 PM I'm pritty sure you'll end up fixing this with your changes

People

  • Assignee:
    Dan Diephouse
    Reporter:
    john demic
Vote (0)
Watch (1)

Dates

  • Created:
    14/Dec/06 04:04 PM
    Updated:
    29/Nov/08 07:08 PM

Agile

  • View on Board
  • Atlassian JIRA (v5.0.7#734-sha1:8ad78a6)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for MuleForge. Try JIRA - bug tracking software for your team.