Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-40179

unable to login with CAS with a web proxy

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      Setup

      In order to execute this test, you should have a working CAS Server.
      There's a CAS VM on server to test this.

      Also, to establish connection between your moodle instance and the CAS server, you should change the _getServerBaseURL function on CAS/Client.php. The main reason is because CAS plugin by the default verify the host SSL and unless you have a HTTPS in your local machine, you should change this line.

      1. Replace the https to http on line 315, the line should be exactly like this:

      $this->_server['base_url'] = 'http://' . $this->_getServerHostname();
      

      2. Log as admin and Go to Plugins > Authentication > Manage authentication.
      3. Enable CAS server (SSO) and go to Settings. The config should be like this.

      Hostname: Your VM IP address 
      Base URI: cas-server-webapp-3.5.2/
      Port: 8080
      CAS logout option: Yes
      Multi-authentication: Yes
      

      Testing

      4. Create a user moodle or cas1 and set the authentication method to: CAS server (SSO)
      5. Set the proxyhost and proxybypass to some ip address. (can be any)
      6. Logout and click on Log In.
      7. You will be prompted to choose the authentication method, choose CAS user.
      8. Enter your cas user and password and click LOGIN.
      9. Make sure you are able to log in using CAS server.
      10. Click Log out.

      Show
      Setup In order to execute this test, you should have a working CAS Server. There's a CAS VM on server to test this. Also, to establish connection between your moodle instance and the CAS server, you should change the _getServerBaseURL function on CAS/Client.php. The main reason is because CAS plugin by the default verify the host SSL and unless you have a HTTPS in your local machine, you should change this line. 1. Replace the https to http on line 315, the line should be exactly like this: $this->_server['base_url'] = 'http://' . $this->_getServerHostname(); 2. Log as admin and Go to Plugins > Authentication > Manage authentication. 3. Enable CAS server (SSO) and go to Settings. The config should be like this. Hostname: Your VM IP address Base URI: cas-server-webapp-3.5.2/ Port: 8080 CAS logout option: Yes Multi-authentication: Yes Testing 4. Create a user moodle or cas1 and set the authentication method to: CAS server (SSO) 5. Set the proxyhost and proxybypass to some ip address. (can be any) 6. Logout and click on Log In. 7. You will be prompted to choose the authentication method, choose CAS user. 8. Enter your cas user and password and click LOGIN. 9. Make sure you are able to log in using CAS server. 10. Click Log out.
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-40179-master

      Description

      Context:

      • using CAS authentification
      • using a web proxy
      • having CAS server domain in "proxybypass" variable

      Steps to reproduce:

      • try to login

      Actual result:

      • error message from phpCAS lib

      Expected result:

      • be logged

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Sep/15