Hi Scott,
I did some tracing with LiveHTTPHeaders and compared between working and non-working servers today. I think I've found the spot where things appear to go off the rails but am not certain what to do about it. We're going to set up a little in-house reverse proxy and experiment, since it is quite difficult to get the cloud vendor to change settings.
You said:
...The issue isn't what the URLs are
per se, but where/when the session cookie is dropped. That should be
evident from a trace. Once the droppage is confirmed and on what step,
it's a given that there's a mismatch between where it's set and where's
it's not sent back. Then you can figure out which one is off.
Here's what I have so far. I've boiled down the trace to what I think is most significant:
______________________________
Line 1. https://reverseproxy.com/content
GET /content HTTP/1.1
Host: mlearningqa.med.umich.edu<http://mlearningqa.med.umich.edu>
HTTP/1.1 302 Please Wait
Location: https://identityprovider.com:8443/nidp/saml2/sso?SAMLRequest=.......*&RelayState=cookie%3A1409080194_2900
Set-Cookie: _shibstate_1409080194_2900=https%3A%2F%2Freverseproxy.com%2Fcontent%2F; path=/; secure; HttpOnly
Set-Cookie: SABASESSIONID=1336989325.20480.0000; path=/ (this is a non-shibboleth-related cookie set by the Reverse Proxy)
______________________________
Line 23. https://identityprovider.com:8443/nidp/saml2/sso?SAMLRequest=....&RelayState=cookie%3A1409080194_2900
GET /nidp/saml2/sso?SAMLRequest=.....&RelayState=cookie%3A1409080194_2900 HTTP/1.1
HTTP/1.1 200 OK
Set-Cookie: JSESSIONID=BC18E99BDCF778DD44FD14B9044953DF; Path=/nidp/; Secure; HttpOnly
Set-Cookie: UrnNovellNidpClusterMemberId=~03~02fdf~1B~16~11uqr; Path=/nidp
Set-Cookie: urn:novell:nidp:cluster:member:id=~03~02fdf~1B~16~11uqr; Path=/nidp
______________________________
Line 44. https://identityprovider.com<http://identityprovider.com>:8443/nidp/saml2/sso?id=716&sid=0&option=credential&sid=0
POST /nidp/saml2/sso?id=716&sid=0&option=credential&sid=0 HTTP/1.1
Cookie: JSESSIONID=BC18E99BDCF778DD44FD14B9044953DF; UrnNovellNidpClusterMemberId=~03~02fdf~1B~16~11uqr; urn:novell:nidp:cluster:member:id=~03~02fdf~1B~16~11uqr
______________________________
Line 68. https://identityprovider.com<http://identityprovider.com>:8443/nidp/saml2/sso?sid=0
POST /nidp/saml2/sso?sid=0 HTTP/1.1
Cookie: JSESSIONID=BC18E99BDCF778DD44FD14B9044953DF; UrnNovellNidpClusterMemberId=~03~02fdf~1B~16~11uqr; urn:novell:nidp:cluster:member:id=~03~02fdf~1B~16~11uqr
______________________________
Line 91. https://identityprovider.com:8443/nidp/saml2/sso?sid=0
GET /nidp/saml2/sso?sid=0 HTTP/1.1
Cookie: JSESSIONID=BC18E99BDCF778DD44FD14B9044953DF; UrnNovellNidpClusterMemberId=~03~02fdf~1B~16~11uqr; urn:novell:nidp:cluster:member:id=~03~02fdf~1B~16~11uqr
______________________________
Line 112. https://reverseproxy.com/content/Shibboleth.sso/SAML2/POST
POST /content/Shibboleth.sso/SAML2/POST HTTP/1.1
Location: https://identityprovider.com:8443/nidp/saml2/sso?SAMLRequest=...&RelayState=cookie%3A1409080201_2348
Set-Cookie: _shibstate_1409080201_2348=https%3A%2F%2Freverseproxy.com%2Fcontent%2F%2FShibboleth.sso%2FSAML2%2FPOST; path=/; secure; HttpOnly
______________________________
Note that a new _shibstate cookie is set at this spot with a new number appended to its name. Its value is now /content//Shibboleth.sso/SAML/POST
The server that is NOT behind the RP does not do this. Instead it sets a cookie called _shibsession_ at this point and then goes off to the resource that was requested, but this server does not.
You asked:
Is there some value this reverse proxy is providing?
It is required to enable Javascript communication between frames which would normally be in different domains. This is a requirement of the SCORM standard. With our current in-house hosted LMS, we used virtual directories to get the same result - content in the same domain as the LMS.
One thing we noticed today in the wiki instructions for Reverse Proxy:
* Note that the path (/secure) to the requested resource is set by the Shibboleth SP and hence is specific to the protected resource on the web server. This mandates that the proxy either proxies the resource with the exact same path (/secure to /secure), or that the proxy is able to rewrite HTTP resonse headers (e.g. the ones containing the relayState) before returning results to the client.
https://wiki.shibboleth.net/confluence/display/SHIB2/SPReverseProxy
We're mapping /content to / (webroot) So that could be one problem at least.
_______________________________________________________________________________
On Aug 25, 2014, at 10:19 PM, Cantor, Scott wrote:
On 8/25/14, 7:18 PM, "Meiselman, Ellen" <emeiselm-mMBBrLdnlFaUArH+***@public.gmane.org<mailto:emeiselm-mMBBrLdnlFaUArH+***@public.gmane.org>> wrote:
We didn't find any smoking guns until we changed the relayState setting
to "cookie" and inspected the value of the cookie. It turns out there is
alway a double slash after the "content" part of the path:
There are absolutely no trailing slashes after the word "content" in
shibboleth2.xml.
Well, it's your proxy doing it.
A. Do you think the extra slash in path in the cookie value might cause
the looping problem?
I doubt it, but I guess it's possible. The issue isn't what the URLs are
per se, but where/when the session cookie is dropped. That should be
evident from a trace. Once the droppage is confirmed and on what step,
it's a given that there's a mismatch between where it's set and where's
it's not sent back. Then you can figure out which one is off.
Is there some value this reverse proxy is providing?
It is required to enable Javascript communication between frames which would normally be in different domains. This is a requirement of the SCORM standard. With our current in-house hosted LMS, we used virtual directories to get the same result - content in the same domain as the LMS.
In the new cloud system we are attempting to use a reverse proxy to achieve this. While we were looking at the wiki article on Reverse Proxy again today, a member of my team noticed this note:
https://wiki.shibboleth.net/confluence/display/SHIB2/SPReverseProxy
Note that the path (/secure) to the requested resource is set by the Shibboleth SP and hence is specific to the protected resource on the web server. This mandates that the proxy either proxies the resource with the exact same path (/secure to /secure), or that the proxy is able to rewrite HTTP resonse headers (e.g. the ones containing the relayState) before returning results to the client.
We are not proxying to the identical path.
https://proxyserver.com/content
displays content at
https://contentserver.com
-- Scott
--
To unsubscribe from this list send an email to users-***@shibboleth.net
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues