Moodle
  1. Moodle
  2. MDL-39409

CAS authentication does not use Moodle's web proxy settings

    Details

    • Testing Instructions:
      Hide

      1. Configure Moodle to use CAS authentication, and test that it's working
      2. Configure Moodle to use a proxy for it's web traffic
      3. Ensure that Moodle can only communicate with the outside world via the proxy (e.g. configure a firewall so that outward communication is blocked except to the proxy server)
      4. Test without the fix: CAS authentication will fail
      5. Test with the fix: CAS authentication will succeed

      Show
      1. Configure Moodle to use CAS authentication, and test that it's working 2. Configure Moodle to use a proxy for it's web traffic 3. Ensure that Moodle can only communicate with the outside world via the proxy (e.g. configure a firewall so that outward communication is blocked except to the proxy server) 4. Test without the fix: CAS authentication will fail 5. Test with the fix: CAS authentication will succeed
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull from Repository:
    • Pull 2.4 Branch:
      mdl24-MDL-39409-auth-cas-use-moodle-web-proxy
    • Pull Master Branch:
      master-MDL-39409-auth-cas-use-moodle-web-proxy
    • Rank:
      50049

      Description

      Under Site Administration -> Server -> HTTP you can configure a web proxy to use.

      CAS authentication will fail if the server is firewalled and does not use the configured web proxy.

      The CAS module uses the phpCAS library, which uses curl. The appropriate proxy-related curl settings need to be set.

      The solution is fairly simple.

        Activity

        Hide
        Michael de Raadt added a comment -

        Thanks for reporting that and providing a patch.

        Show
        Michael de Raadt added a comment - Thanks for reporting that and providing a patch.
        Hide
        Michael de Raadt added a comment -

        I've added Iñaki in case he's interested in reviewing this.

        Show
        Michael de Raadt added a comment - I've added Iñaki in case he's interested in reviewing this.
        Hide
        Iñaki Arenaza added a comment -

        I've had a look at it (but didn't test it!), and it looks good to me.

        Show
        Iñaki Arenaza added a comment - I've had a look at it (but didn't test it!), and it looks good to me.
        Hide
        Andrew Davis added a comment -

        This issue is missing some testing instructions.

        Show
        Andrew Davis added a comment - This issue is missing some testing instructions.
        Hide
        Brian King added a comment -

        Added testing instructions

        Show
        Brian King added a comment - Added testing instructions
        Hide
        Petr Škoda added a comment -

        +1, submitting for integration

        Show
        Petr Škoda added a comment - +1, submitting for integration
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Integrated (24, 25 & master), thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - Integrated (24, 25 & master), thanks!
        Hide
        Damyon Wiese added a comment -

        Tested on 24 and master and all works as expected. (Setup a virtual network with moodle/cas/squid on separate vms and moodle with no direct access to cas).

        Show
        Damyon Wiese added a comment - Tested on 24 and master and all works as expected. (Setup a virtual network with moodle/cas/squid on separate vms and moodle with no direct access to cas).
        Hide
        Dan Poltawski added a comment -
        Feature: Thanks to our superb contributors
          In order to make Moodle better
          As an integrator
          I need to thank all our contributors
        
          Scenario: Dan thanks you all
            Given I log in as "dan"
            And I see "lots of fixed issues"
            When I follow "Close integrated issues"
            Then I should see "Lots of thanks to all our contributors"
        

        Your changes are upstream

        Show
        Dan Poltawski added a comment - Feature: Thanks to our superb contributors In order to make Moodle better As an integrator I need to thank all our contributors Scenario: Dan thanks you all Given I log in as "dan" And I see "lots of fixed issues" When I follow "Close integrated issues" Then I should see "Lots of thanks to all our contributors" Your changes are upstream

          People

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

            Dates

            • Created:
              Updated:
              Resolved: