IdP's Session Cookie

Richard Navarrete richardun at
Thu Nov 1 17:08:25 EDT 2012

Hi -- sorry to piggyback off this thread, but I think my question is

First, I'm using this setup:  CAS + Shib + shib-cas-authenticator.  CAS is
using ActiveDirectory to authenticate users.  I'm using IdP unsolicited
initialization to log in to Concur (which requires that login request begin
at the IdP).

I can login to Concur fine using this set up.  When I log out of Concur, it
logs me out there and forwards me to my cas/logout (per my instruction).
 Shibboleth seems to keep its session going (because it doesn't know
anything about the user being logged out at CAS).

I want Shibboleth to basically NOT keep a session and to ask CAS about the
user being logged in every time.  This way, CAS will control the login time
(as far as Shib and CAS are concerned).  In a nutshell, here's what I've
done to try to make that happen:

shib conf/handler.xml
<ph:LoginHandler xsi:type="ph:ExternalAuthn"
                     supportsForcedAuthentication="true" >


(notice:  authenticationDuration)

Commented out the Previous Session:
    <ph:LoginHandler xsi:type="ph:PreviousSession">


shib conf/internal.xml
Shortened the Session time (or at least that's what I thought I was doing).

    <bean id="shibboleth.SessionManager"
        <constructor-arg ref="shibboleth.StorageService"/>
        <constructor-arg value="60000" type="long"/>
        <constructor-arg value="1800000" type="long"/>

When I look at the log on a reattempt to log in through IdP Unsolicited
SSO, I have these interesting lines:

13:31:51.139 - DEBUG
- Creating login context and transferring control to authentication engine
13:31:51.140 - DEBUG
[edu.internet2.middleware.shibboleth.idp.util.HttpServletHelper:167] -
Storing LoginContext to StorageService partition loginContexts, key
13:31:51.140 - DEBUG
- Redirecting user to authentication engine at
13:31:51.172 - DEBUG
[edu.internet2.middleware.shibboleth.idp.session.IdPSessionFilter:160] - No
session associated with session ID
- session must have timed out
13:31:51.173 - DEBUG
[edu.internet2.middleware.shibboleth.idp.authn.AuthenticationEngine:209] -
Processing incoming request
13:31:51.173 - DEBUG
[edu.internet2.middleware.shibboleth.idp.authn.AuthenticationEngine:240] -
Beginning user authentication process.
13:31:51.173 - DEBUG
[edu.internet2.middleware.shibboleth.idp.authn.AuthenticationEngine:283] -
Filtering configured LoginHandlers:
{urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport=edu.internet2.middleware.shibboleth.idp.authn.provider.ExternalAuthnSystemLoginHandler at 75ad2db5
13:31:51.173 - DEBUG
[edu.internet2.middleware.shibboleth.idp.authn.AuthenticationEngine:464] -
Selecting appropriate login handler from filtered set
{urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport=edu.internet2.middleware.shibboleth.idp.authn.provider.ExternalAuthnSystemLoginHandler at 75ad2db5
13:31:51.174 - DEBUG
[edu.internet2.middleware.shibboleth.idp.authn.AuthenticationEngine:497] -
Authenticating user with login handler of type
13:31:51.174 - DEBUG
- Forwarding authentication request to /authn/external
13:31:51.234 - DEBUG
[edu.internet2.middleware.shibboleth.idp.session.IdPSessionFilter:160] - No
session associated with session ID
- session must have timed out
13:31:51.234 - DEBUG
[edu.internet2.middleware.shibboleth.idp.authn.AuthenticationEngine:144] -
Returning control to authentication engine
13:31:51.234 - DEBUG
[edu.internet2.middleware.shibboleth.idp.authn.AuthenticationEngine:209] -
Processing incoming request
13:31:51.235 - DEBUG
[edu.internet2.middleware.shibboleth.idp.authn.AuthenticationEngine:514] -
Completing user authentication process
13:31:51.235 - DEBUG
[edu.internet2.middleware.shibboleth.idp.authn.AuthenticationEngine:585] -
Validating authentication was performed successfully
13:31:51.235 - DEBUG
[edu.internet2.middleware.shibboleth.idp.authn.AuthenticationEngine:696] -
Updating session information for principal Richard.Navarrete at
13:31:51.235 - DEBUG
[edu.internet2.middleware.shibboleth.idp.authn.AuthenticationEngine:700] -
Creating shibboleth session for principal Richard.Navarrete at
13:31:51.236 - DEBUG
[edu.internet2.middleware.shibboleth.idp.authn.AuthenticationEngine:806] -
Adding IdP session cookie to HTTP response

I looks like it sends it to the External Auth, but I don't see anything
happen on the CAS side.  CAS is logged out so it appears this would create
a login screen if it really contacted CAS (either 302 redirect or as a
result of the user not being signed in).

What is confusing above is that it says "No session associated with session
ID..." then returns to "auth engine" not sure if this is Shib or CAS, then
"Completing user authentication process" then it validates it as
successful?  I don't understand how this could happen unless it's checking
with itself for authentication... How can I kill the Shib session and make
it check with CAS everytime for a valid auth?

Thanks in advance!

-----Original Message-----

From: users-bounces at
[mailto:users-bounces at<users-bounces at>]

Behalf Of Michael A Grady

Sent: Thursday, November 01, 2012 10:26 AM

To: Shib Users

Subject: Re: IdP's Session Cookie

On Nov 1, 2012, at 9:02 AM, Cantor, Scott wrote:

On 11/1/12 9:14 AM, "Paul Hethmon" <paul.hethmon at>


I'm pretty sure that session cookie is set regardless of the

PreviousSession handler being there or not. Even if session time is

set to 0, I think it gets set. It's just immediately invalid.

Yes, the handler has nothing to do with the cookie being set.


Looks like the cookie causing problems (causing a user to be "remembered"

when such isn't desired) is a JSESSIONID cookie, scoped to the External

Authentication handler path. (The External Authn handler is what is being

used in this case.) I am correct in my reading of the documentation that the

authenticationDuration setting for a handler isn't supposed to matter if the

PreviousSession handler is not activated -- is that indeed correct?

Which would presumably put the External Authn "trigger code"

(filter/servlet) at fault for this cookie and its use.

-- Scott


Michael A. Grady

Senior IAM Consultant, Unicon, Inc.


To unsubscribe from this list send an email to

users-unsubscribe at
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the users mailing list