You are right. The problem is the cas appliance had some problems to
begin with and has always been difficult to configure, because it
predates auth. What is in the book should work (using cas.py) but only
if you do not use Auth.
You may be better off using the cas consumer integrated in Auth:
gluon/contrib/login_methods/cas_auth.py
From the docstring in this file:
    Login will be done via Web2py's CAS application, instead of
web2py's
    login
form.
    Include in your model (eg
db.py)::
        from gluon.contrib.login_methods.cas_auth import
CasAuth
 
auth.define_tables(username=True)
 
auth.settings.login_form=CasAuth(
 
globals(),
            urlbase = "
https://web2py.com/cas/
cas",
 
actions=['login','check','logout'])
    where urlbase is the actual CAS server url without the
login,logout...
 
Enjoy.