Adjust REMOTE_USER split

Hi everyone.

I recently got “Single Sign-on” to work for logging into RT. This is
working by using Kerberos in an Active Directory domain.
One problem I am having is that Apache is setting REMOTE_USER to:
username@domain.com

I want RT to remove the "@domain.com" part and just think that the first
part is the REMOTE_USER. I am at a loss as to where to configure this
within RT. Can anyone help me out with this? Where would I do this?
Do I need to make an overlay? If so, do you have any hint on how to
make one that would do this?

Thank you in advance for your assistance.

You all rock!

Here is what I did. Under (rtdir)/lib/RT/Interface/ I made a file
called Web_Local.pm

Make the file if you don’t have it already and put this in it.
Basically I split on the @ sign and return the first part. If you have
this file already and it already redefines this function you’ll have to
come up with your own logic to do the same.

no warnings qw(redefine);

package RT::Interface::Web;
use strict;

sub WebCanonicalizeInfo {
my $user;

if ( defined $ENV{'REMOTE_USER'} ) {
    $user = lc ( $ENV{'REMOTE_USER'} ) if(

length($ENV{‘REMOTE_USER’}) );
if ($user =~ /@/) {
# we need to split off the fully qualified Kerberos trailer as
# we don’t care about it.
my @tmparray = split /@/, $user;
$user = $tmparray[0];
}
}
return $user;
}

-Tim-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Jason
Fenner
Sent: Monday, February 20, 2006 3:58 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Adjust REMOTE_USER split

Hi everyone.

I recently got “Single Sign-on” to work for logging into RT. This is
working by using Kerberos in an Active Directory domain.
One problem I am having is that Apache is setting REMOTE_USER to:
username@domain.com

I want RT to remove the "@domain.com" part and just think that the first

part is the REMOTE_USER. I am at a loss as to where to configure this
within RT. Can anyone help me out with this? Where would I do this?
Do I need to make an overlay? If so, do you have any hint on how to
make one that would do this?

Thank you in advance for your assistance.

You all rock!

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Download a free sample chapter of RT Essentials from O’Reilly Media at
http://rtbook.bestpractical.com

WE’RE COMING TO YOUR TOWN SOON - RT Training in Amsterdam, Boston and
San Francisco - Find out more at
http://bestpractical.com/services/training.html