Sorry if this post should be misplaced. I have been trying to use the CAS module to authenticate to a CAS server with no avail.

    I installed 2 Drupal sites on my computer, one for use as a server, another as a client:
  • composer create-project drupal-composer/drupal-project:~8.0 --stability dev --no-interaction d8s
  • composer create-project drupal-composer/drupal-project:~8.0 --stability dev --no-interaction d8c

I am running apache2 and have an SSL certificate installed, e.g. https://mysite.org/drupal/sandbox

On the server, no configuration was done and the default values for timeouts were left.
On the client:

Protocol version 2.0
Hostname mysite.org
Port 443
URI /drupal/sandbox/d8s/web/cas
No SSL verification
Login link enabled
Auto-register users, restrict password management
no forced login, no gateway feature, no logout behaviour defined

On the terminal, I checked

$ curl -I https://mysite.org/drupal/sandbox/d8c/web/caslogin
HTTP/1.1 302 Found
Date: Sat, 10 Feb 2018 20:35:15 GMT
Server: Apache/2.4.29 (Unix) PHP/7.1.13 mod_python/3.5.0- Python/2.7.10 OpenSSL/1.0.2n mod_perl/2.0.10 Perl/v5.26.1
X-Content-Type-Options: nosniff
X-Powered-By: PHP/7.1.13
Cache-Control: must-revalidate, no-cache, private
Location: https://mysite.org/drupal/sandbox/d8s/web/cas/login?service=https%3A//mysite.org/drupal/sandbox/d8c/web/casservice
X-Drupal-Dynamic-Cache: HIT
X-UA-Compatible: IE=edge
Content-language: en
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Expires: Sun, 19 Nov 1978 05:00:00 GMT
X-Generator: Drupal 8 (https://www.drupal.org)
Content-Type: text/html; charset=UTF-8

Then, I issued the request on the browser and got an error message on the CAS Server side:

Invalid Service

You have not requested a valid service.

The log messages report include (on the client site):

CAS gateway auth has already been performed for this session.

with user anonymous.

I have tried all sorts of things, to no avail.

Any help will be appreciated. Thank you in advance

Comments

sixflags created an issue. See original summary.

bkosborne’s picture

Status: Active » Fixed

The Drupal 8 version of this module doesn't have a CAS server component, so that's your problem :)

You have to use some other CAS server software.

sixflags’s picture

Hi bkosborne, first of all, thank you for taking the time to answer.

As per documentation, -and as you confirm-, the CAS module (https://www.drupal.org/project/cas), does not provide the server functionality for Drupal 8, and this functionality is now covered by the CAS Server module (https://www.drupal.org/project/cas_server), currently released as 8.x-1.0-beta1.

Hence, unless I haven't got it well, a site with the CAS Server module should be able to authenticate clients having the CAS module installed.

Based in that assumption, as explained in my first post, I had installed 2 Drupal sites, d8s and d8c: the d8s has the CAS Server module and should serve to authenticate, while the d8c site has the CAS module and acts as a client to d8s. Yet, it does not work.

Do you have any hint on what can I do?

Thank you again and best regards,

bkosborne’s picture

Ah, I misunderstood. I see you opened an issue in that queue is well. I'll reply there.

Status: Fixed » Closed (fixed)

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