Although not very common, whatever CAS server the module uses may be only be available through an http protocol (local test instances for example).

I tried to find out a reason to why the use of https is hardcoded in the module and could only find a reference to the now unused PhpCas library in the following ticket: https://www.drupal.org/project/cas/issues/1506244

I believe it would be useful to add the cas server protocol as another configuration variable for the module.

Comments

ieguskiza created an issue. See original summary.

ieguskiza’s picture

Status: Active » Needs review
StatusFileSize
new4.4 KB

I added a small patch with a possible implementation of the proposed feature.

Status: Needs review » Needs work

The last submitted patch, 2: 2996924-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

ieguskiza’s picture

Status: Needs work » Needs review
StatusFileSize
new4.4 KB

Fixed the failing test.

bkosborne’s picture

Status: Needs review » Needs work

The reason it was hardcoded is because I didn't want people to configure the module in an insecure way, but I agree that it could be useful for local testing. For that reason I think we need to display a warning message for this field that indicates that HTTP should NOT be used in production environment. The reasons are two fold:

1. Doing so implies that the CAS server doesn't have a TLS certificate, so users would be entering their credentials over HTTP which is not safe
2. This module sends an HTTP POST request to the CAS server to validate the authentication token. If that's not over HTTPS it could be intercepted.

ieguskiza’s picture

Status: Needs work » Needs review
StatusFileSize
new4.49 KB

That's a good point. Would it be enough to add a warning in the description of the field? I added a patch with it, but let me know if you where thinking of something else.

bkosborne’s picture

StatusFileSize
new5.57 KB
new3.62 KB

Found a couple issues that I fixed (see interdiff). If tests pass I will commit.

  • bkosborne committed 55c5687 on 8.x-1.x
    Issue #2996924 by ieguskiza, bkosborne: Add support for http cas servers
    
bkosborne’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.