On 25 January 2017 at 08:23, Bryan K. Walton <[email protected]> wrote:
> On Tue, Jan 24, 2017 at 06:51:22PM -0500, David Hawes wrote:
>> On 24 January 2017 at 08:45, Bryan K. Walton <[email protected]> wrote:
>> ...
>> > However, that same CAS server passes some users in lowercase. Is there
>> > a way in mod_auth_cas to convert all usernames to either uppercase or
>> > lowercase, overriding what the CAS authentication server sends?
>>
>> There is no configuration option to do this in mod_auth_cas.
>>
>> I would recommend changing the case on your CAS server or the
>> application that uses REMOTE_USER.
>
> OK, thanks. The CAS server isn't our's and we have no control over it or
> access to it. So, we will pursue from an application angle. One question,
> for you (or others). Looking at the following page:
>
> https://httpd.apache.org/docs/current/expr.html
>
> It appears that one might be able to use the REMOTE_USER variable in some
> kind of combination with the "tolower" function in an Apache expression to
> possible convert the variable to all lowercase. But I can't see to figure
> out if that is really possible, or how to implement that. Has anybody tried
> this?
I tried something like:
RewriteEngine On
RewriteMap uc int:toupper
RewriteRule ^ - [E=REMOTE_USER:${uc:%{LA-U:REMOTE_USER}},L]
LogLevel debug rewrite:trace6
I could see it uppercase the REMOTE_USER properly in the logs, but my
phpinfo() page did not reflect that. I expect there's something in the
auth flow that's writing it back, though I don't have time to trace it
right now.
If you're comfortable modifying source, this could of course be done
in the mod_auth_cas code. I can provide pointers if you'd like.
--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
You received this message because you are subscribed to the Google Groups "CAS
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAAgu-wCGT73_5W4zJEqL0DQWQ9dbsgoyC_4VngP63dhkB_X9TA%40mail.gmail.com.