MCB initialAuthContext with multiple contexts throws java.lang.NullPointerException

Scott Koranda skoranda at gmail.com
Thu Feb 13 11:10:07 EST 2014


> On Feb 12, 2014, at 8:57 PM, Scott Koranda <skoranda at gmail.com> wrote:
> 
> 
>     If instead I configure the <initialAuthContext> element with two
>     <context> elements, for example
> 
>        <initialAuthContext requestedOnly="false">
>                <context name="urn:oasis:names:tc:SAML:2.0:ac:classes:Password"
>     />
>                <context name="http://id.incommon.org/assurance/bronze" />
>        </initialAuthContext>
> 
>     then I am presented, as I expect, a list of two methods. When I choose
>     one of the methods and click "Continue" I find in my Tomcat log files
> 
> 
> Scott,
> 
> In your idp-process.log are there any debug lines that look like this:
> 
> log.debug("Adding default method [{}]", m.getContent());
> 
> From the stack trace it appears that for some reason the default method list is
> null, which doesn't make much sense given it is the list shown on the selection
> page. However, the list shown on the selection page can vary. So because of
> that it stores the list in the Tomcat session object where it later retrieves
> it for validation of the selection. That is the point the NPE shows up, that
> list retrieved from the session is null. Anything special in the Tomcat
> configuration as far as session support?
> 
> Paul
> 

Yes, I find this in idp-process.log:

# grep -A 2 "Adding default method" idp-process.log 
15:38:12.113 - DEBUG
[edu.internet2.middleware.assurance.mcb.authn.provider.MCBConfiguration:274]
- Adding default method [
            Username/Password Only
        ]
--
15:38:12.114 - DEBUG
[edu.internet2.middleware.assurance.mcb.authn.provider.MCBConfiguration:274]
- Adding default method [
            Bronze Level Password
        ]

I see the problem now.

This Tomcat instance has cookies="false" in the <Context> for
the IdP. The JSESSIONID cookie is not used by the vanilla IdP.

The MCB does not set its "own" cookie but uses the JSESSIONID
cookie and so the default or an explicit cookies="true" is 
necessary.

Changing cookies="true" resolves the issue.

Thanks,

Scott K


More information about the users mailing list