Skip to content

phpCAS application on an Apache host protected by mod_auth_cas doesn't work #131

@tdb85

Description

@tdb85

I'm working on a development server which we currently restrict access to using HTTP Basic authentication and LDAP authentication (AuthType Basic & AuthBasicProvider ldap). I've successfully switched this to AuthType CAS, however mod_auth_cas seems to be stripping out the ticket parameter from the URL so the application can't read it.

The applications we are developing will be located on a production server authenticating themselves to CAS. However in development we do a blanket authentication to restrict access to the whole server, after which the applications currently each have their own HTML login form which I'm trying to migrate to phpCAS.

Current

VirtualHost section, and PHP apps authenticate themselves

<VirtualHost ip:443>
  <Location />
    AuthType Basic
    AuthBasicProvider ldap
    Require ldap-group blah-blah...
  </Location>
  # blah blah 
</VirtualHost>

Desired

Here's what I want, which works from Apache's point of view, but not PHP.

<VirtualHost ip:443>
  <Location />
    AuthType CAS
    Require ldap-group blah-blah...
  </Location>
  # blah blah 
</VirtualHost>


<?php
var_dump($_GET);
phpCAS::client(CAS_VERSION_2_0, "cas.myhost.com", 443, "/cas");
phpCAS::forceAuthentication();

phpCAS successfully redirects to the CAS server, however on direction back it is missing the ticket parameter. As a result I end up in a redirection loop because phpCAS keeps redirecting to CAS, but CAS redirects back because we are already authenticated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions