I can't think of a better way to do this, but I admittedly haven't
played around with the gateway stuff too much.
I'll have to think if there's a way to make this work a little more
seamlessly in Apache 2.4, which seems to be a little more strict about
setting a user during auth (which is something mod_auth_cas explicitly
does not do).
Here's the comment in the 2.4 code:
if (r->user == NULL) {
/* don't let buggy authn module crash us in authz */
:)