We use Shibboleth for auth, which has worked well so far, but I’m having an issue with the Shibboleth session cookie when connecting to the interactive app. Once the interactive session is created and I try to connect to it via the Connect to Jupyter button, the shib session cookie is cleared, and the session tab fails to load properly. The cookie clearing looks like expected behavior based on the ood-portal.conf that is generated from our ood-portal.yml:
We’re not super well versed in Shibboleth, but I’d imagine folks have gotten this to work, because, well without it, OnDemand is a bit useless.
Looking at the documentation you need a shib_auth.conf that holds
ShibCompatValidUser On
I just want to verify that you’ve got that configuration.
Beyond that, I’m not really sure what that edit cookie directive is supposed to do. I’d have to search through the git and/or this forum to see how we came up with that. I’d imagine this is largely community driven, which is to say, someone gives us this as it worked for them and we take it on face value that it’s correct.
OK then we can look into the session tab fails to load properly. Are you sure it’s an issue with authentication? I mean are you getting 403 forbidden errors from apache?
If so, maybe you can turn on debug or trace level logging to see what’s going on specifically with the cookie edits to find out if those edits are what’s causing the issue.
notebook_core.4799ce7e762b693682b6.js?v=4799ce7e762b693682b6:114683 WebSocket connection to ‘wss://ondemand-dev.it.emory.edu/node/ip-10-66-251-136.ec2.internal/6071/api/events/subscribe’ failed
Access to fetch at ‘``https://login.emory.edu/idp/profile/SAML2/Redirect/SSO?SAMLRequest=hZLLUsIwFIZfpZM9TSnl0gztTIWFzKAwtLpw46TNATKTJjUnRX17y0XFDa7zX87%2FTabIa9WwrHV7vYG3FtB5H7XSyE4PCWmtZoajRKZ5DchcxfLsYclCP2CNNc5URhEvQwTrpNEzo7GtweZgD7KCp80yIXvnGmSUGi2g5lr0BBx86Xyojf30QbQ038uyNArc3kc09FgQ0vUqL4g37y6Smh%2Bzf5OU2Ul95Zeiod0xW6ngYt6AkBYqR%2FN8RbzFPCGvAiCOIQq24%2FGIRzweDssyruIRL3l%2FMKiiTobYwkKj49olJAzCYS%2BY9PqTIuyzKGBR%2FEK89WXzndRC6t1tQOVZhOy%2BKNa986BnsHga0wlIOj1iZqdiewX%2Bdiz%2Fpk3S%2F9niD9spvSo7NzfssUtfzNdGyerTy5Qy7zML3EFC%2BoSmZ8vf%2F5F%2BAQ%3D%3D&RelayState=ss%3Amem%3Aa5fdf98e3ff7dffcbf91baa24e711748c9afccca9714a33f4dfdbfb754435f71’`` (redirected from ‘``https://ondemand-dev.it.emory.edu/node/ip-10-66-251-136.ec2.internal/6071/lab/api/translations/default?1755553249719’``) from origin ‘``https://ondemand-dev.it.emory.edu``’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Without the Shibboleth session present in the notebook tab, the link is redirected to the login URL at https://login.emory.edu
Maybe you’re able to add that header through an apache directive? You can use custom_vhost_directives to add directives to the vhost (also custom_location_directives to add directives to every location).
Something like this maybe (you’ll have to account for the actual hostname here)?
That didn’t change the behavior, unfortunately. IIRC Access-Control-Allow-Origin is a response header so can’t really be changed via the vhost. I’ve also tested with attempts at removing the auth items from the /node location (AuthType/ShibRequestSetting/RequestHeader/Require) to no avail; Apache hits a 500 in that scenario.
Something else strange that I’ve noticed - sometimes the shib session cookie is still present in the newly opened Jupyter session browser tab, and I can even get as far as opening a notebook file (another new tab) and running commands, before the cookie is cleared when saving the notebook.
Yea but the directive is RequestHeader to edit request headers.
In any case, maybe you can try to use the current tab? In the view.html.erb you probably have target="_blank". Try removing this to get Jupyter in the same tab and see if that’s any better for you.
@jeff.ohrstrom Do you know if any institution have successfully deployed OOD with Jupyter Interactive app behind Shibboleth? If there is, we would like to reach out to understand their setup.
You can try to ping the folks on this topic - from the looks of it they run shibboleth and have Jupyter running. They appear to be from the University of Virginia.
Thanks for the input, @jeff.ohrstrom . Still the same behavior with opening the Jupyter session in the same browser tab via removal of target="_blank" from view.html.erb.
I’ll have a look through those links and reach out to those folks. I’ve also reverted our setup from Shibboleth to LDAP and found that to be working as expected.