moodle and proxy CAS(sso)

moodle and proxy CAS(sso)

Simon Martin -
回帖数:7
Hello.
I'm a young moodle developper for the university of Rennes 1 (france).
for my project, I need to use moodle as a CAS proxy, in order to connect to an other application direct from moodle.

it works perfectly in "simple client" mode, but when I enable the proxy mode, the script
<moodle>/login/login.php prints this and exit:

php4DOMElement::__set_state(array( 'myDOMNode' => DOMElement::__set_state(array彩蛋), 'myOwnerDocument' => php4DOMDocument::__set_state(array( 'myDOMNode' => DOMDocument::__set_state(array彩蛋), 'myOwnerDocument' => php4DOMDocument::__set_state(array( 'myDOMNode' => DOMDocument::__set_state(array彩蛋), 'myOwnerDocument' => php4DOMDocument::__set_state(array( 'myDOMNode' => DOMDocument::__set_state(array彩蛋), 'myOwnerDocument' => php4DOMDocument::__set_state(array(*RECURSION*

It seems to be a problem with PGT validation.(I'm not realy friendly with the concepts of CAS)

Maybe my apache configuration is not well done. But I did not find any documentation about this.

Any food for thought is welcomed!!

Thanks in advance, and sorry for my "frenchy" english.

Simon MARTIN
回复Simon Martin

Re: moodle and proxy CAS(sso)

Raimon Lapuente -
Hi Simon!

I'm having exactly the same problem. I'm not familiar with the CAS code either but I know how it works: apparently Moodle will send a query to your 3rd app, then this app will connect with the CAS Server and ask for a Tiket, then your app must send back the tiket to moodle to validate the account...

Maybe its an issue with the las connection and the XML generated (or the tiket sent in xml), in our browser url you must find something like: URL?tiket=something.

I still haven't fought the problem...
回复Simon Martin

Re: moodle and proxy CAS(sso)

Iñaki Arenaza -
Core developers的头像 Documentation writers的头像 Peer reviewers的头像 Plugin developers的头像

Hi Simon,

the phpCAS library bundled with Moodle was a bit old, and the integration with Moodle had a couple of glitches.

We have just (today!) upgraded the phpCAS library to the latest available version (1.1.0) and fixed the integration glitches. If you want to try if the problem you are having with proxy mode has been fixed with this upgrade, you should use the latest Moodle version from CVS (or wait for the next weekly version that should be out on Wednesday, if I'm not mistaken).

Saludos, Iñaki.

回复Iñaki Arenaza

Re: moodle and proxy CAS(sso)

Raimon Lapuente -
Hi Iñaki,

I have upgraded Moodle to the last 1.9.x version (last week). The warnings are now gone. The CAS plugin autentication works great.

But when I turn the CAS Proxy Mode, ON, the autentication to moodle gives a :

CAS Authentication failed!

You were not authenticated.

You may submit your request again by clicking here.

If the problem persists, you may contact the administrator of this site.


Even that I get this "error", the platform linked to the Moodle makes the login correctly.

回复Raimon Lapuente

Re: moodle and proxy CAS(sso)

Iñaki Arenaza -
Core developers的头像 Documentation writers的头像 Peer reviewers的头像 Plugin developers的头像

I'm afraid I don't have a proxied application at hand to test all of this.

If you described your working scenario in a more detailed way, maybe we could make it a go.

Saludos, Iñaki.

回复Raimon Lapuente

Re: moodle and proxy CAS(sso)

Matthew Selwood -
I've upgraded to Moodle 1.9.9+20100714 and receive the same error when I turn Proxy mode to Yes.

Have you made any progress on this?
回复Matthew Selwood

Re: moodle and proxy CAS(sso)

Matthew Selwood -
I resolved my issue. The problem was our load balancer redirecting us during the proxy hand-shaking with the CAS server to a different server in the web cluster (and then not able to find the .plain file that's generated by phpCAS on one of the redirects).