Closed (cannot reproduce)
Project:
CAS
Version:
7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Mar 2011 at 16:27 UTC
Updated:
16 Jun 2014 at 02:08 UTC
Jump to comment: Most recent
Comments
Comment #1
bfroehle commented@Shefik: Can you provide some more debugging information? I'm not currently using Varnish, and I don't think the other maintaner (@metzlerd) is either.
Is there helpful information in any error log?
How are you initiating the logout? Are you being redirected to the CAS server logout page?
Comment #2
shefik commentedThere was a build of this module dated March 30. Did you recently remove it? Now, the date says March 29.
Comment #3
bfroehle commented@Shefik: No, we have no control over the automated builds. Nothing significant should have changed in the past ~5 days with the exception of adding test routines (which are in separate files and should not effect the performance of CAS itself).
The date difference, by the way, is likely a timezone phenomenon. The page shows March 30th if I'm not logged in, but March 29th if I am. It's likely because the anonymous user and I have different timezones set.
Comment #4
shefik commentedIt looks like it has something to do with the function _cas_single_sign_out_check();
When that is called, it throws the error in Varnish.
Also, it then prevents the user to login again, since al pages have the 503 error.
Comment #5
bfroehle commented@Shefik: Can you provide any more specificity? There's still not enough here for me to be able to help you, short of installing Varnish myself which I do not have time for at the moment.
Comment #6
shefik commentedI have a fix for the problem, which appears to be working for me at the moment.
In the Varnish .vcl configuration file, I added these lines to "sub vcl_recv", to prevent the "/cas" URI from being cached by Varnish:
/**
* Don't cache cas.
*/
if (req.url ~ "^cas$") {
return (pass);
}
If that URI is cached by Varnish, then it causes issues when the user logs in and out, resulting in server error code 503 (for any page handled by the cas modules) for all other users.
Comment #7
bfroehle commented@Shefik: That's great to know. Is there a similar exception for 'user/login' or similar? Or is there a way we can change the CAS module code to be compatible?
Regardless, we should document this someplace for others.
Comment #8
bfroehle commented@Shefik: That's great to know. Is there a similar exception for 'user/login' or similar? Or is there a way we can change the CAS module code to be compatible?
Regardless, we should document this someplace for others.
Comment #9
shefik commentedDo you know how often the automated builds get generated?
Any certain schedule, such as daily, weekly, monthly, etc.?
Comment #10
bfroehle commentedShefik: Every 12 hours, but I don't know what time of day. But of course there won't be a new build if there weren't any source code changes.
Comment #11
bfroehle commentedComment #12
shefik commented@bfroehle - I'll be posting additional info on this Varnish issue during the upcoming week. I executed more testing on my end, and I think I may have pinpointed a more specific behavior that should be addressed overall. Based on this recent testing, I may have been premature in my advice to simply resolve the issue by just preventing the "/cas" URI from being cached by Varnish. In fact, I am almost on the verge of completely withdrawing that particular advice. Instead, I'm getting "back to the drawing board". I am now theorizing on possibly a more efficient and practical solution, one that can lend itself to be utilized site-wide via any other Varnish-conflicted module (if any).
Comment #13
bfroehle commented@Shefik: Awesome! If any architectural changes are needed for CAS for compatibility, we can discuss those here as well.
Comment #14
bfroehle commentedShefik: Any chance you could post your final working Varnish + CAS configuration (or add it to the CAS Documentation)?
Comment #15
cilefen commentedMarking this as Closed (cannot reproduce) because there is no clear answer in the comments and the issue reporter has not responded in three years.
Comment #16
vinmassaro commented@cilefen: Just to follow up, it looks like a session cookie is set when visiting
/cas. All Varnish configurations you will find online for Drupal are set to pass to the backend when a session cookie is set. This means that no additional configuration should be necessary on the Varnish end for CAS to work. It's unclear if Gateway mode works with Varnish without additional configuration though.Comment #17
cilefen commented@vinmassaro: That makes sense to me and probably that it is the reason this problem has not arisen generally.