Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CASGateway error 500 for unauthenticated requests in Apache 2.4 #204

Open
nregina-hbs opened this issue Apr 21, 2022 · 1 comment
Open

Comments

@nregina-hbs
Copy link

When accessing a CASGateway location as an unauthenticated user, a 500 error is returned. The Apache error log shows an error like this:

AH00027: No authentication done but request not allowed without authentication for /gateway. Authentication not configured?

In Apache 2.4 AuthZ module requires the request user to be set when the authentication provider returns OK.

Sample config:

<Location / >
  Authtype CAS
  Require valid-user
  CASGateway /gateway
</Location>

In my own build, I've updated the flow to set the user to an empty string.

/* do not set a user, but still allow anonymous access */
r->user = "";

This works for my own use cases, but I'm not sure this would be an acceptable change in behavior for all users of mod-auth-cas.

@dhawes
Copy link
Contributor

dhawes commented Jun 17, 2022

Yeah, I've been thinking about how to handle this case. An empty user string seems like a decent way to go, but I wonder if something configurable would be better? I'll need to experiment some before I can comment further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants