[Rt-commit] rt branch, 4.2/rename-external-auth, created. rt-4.1.8-514-g3d55df4

Alex Vandiver alexmv at bestpractical.com
Thu May 30 17:03:37 EDT 2013


The branch, 4.2/rename-external-auth has been created
        at  3d55df404102d212e3d0ff04f221201044e4221d (commit)

- Log -----------------------------------------------------------------
commit 3d55df404102d212e3d0ff04f221201044e4221d
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue May 21 06:41:42 2013 -0400

    Rename $WebExternalAuth and friends to reduce confusion, and be more specific
    
    In order to reduce confusion with the common extension
    RT::Authen::ExternalAuth, the following options have been renamed:
    
      WebExternalAuth           => WebRemoteUserAuth
      WebExternalAuthContinuous => WebRemoteUserContinuous
      WebFallbackToInternalAuth => WebFallbackToRTLogin
      WebExternalGecos          => WebRemoteUserGecos
      WebExternalAuto           => WebRemoteUserAutocreate
      AutoCreate                => UserAutocreateDefaults
    
    This also makes their utility more evident.

diff --git a/docs/UPGRADING-4.2 b/docs/UPGRADING-4.2
index 2a5bc12..7abbdf0 100644
--- a/docs/UPGRADING-4.2
+++ b/docs/UPGRADING-4.2
@@ -129,3 +129,15 @@ UPGRADING FROM RT 4.0.0 and greater
   and granting Everyone the OwnTicket right is a common cause of
   performance problems.  Unprivileged Owners (if they exist) may still
   be set using the Autocompleter.
+
+* Configuration options dealing with "external authentication" have been
+  renamed to reduce confusion with the common extension
+  RT::Authen::ExternalAuth.  The old names will work, but produce
+  deprecation warnings.  The old names, and their new counterparts, are:
+
+      WebExternalAuth           => WebRemoteUserAuth
+      WebExternalAuthContinuous => WebRemoteUserContinuous
+      WebFallbackToInternalAuth => WebFallbackToRTLogin
+      WebExternalGecos          => WebRemoteUserGecos
+      WebExternalAuto           => WebRemoteUserAutocreate
+      AutoCreate                => UserAutocreateDefaults
diff --git a/docs/authentication.pod b/docs/authentication.pod
index 38cc82c..056c070 100644
--- a/docs/authentication.pod
+++ b/docs/authentication.pod
@@ -21,7 +21,7 @@ username and password into RT's login form, and in the other your web server
 user logged in.
 
 The second is supported by RT out of the box under the configuration option
-C<$WebExternalAuth> and other related options.  The first is supported by an RT
+C<$WebRemoteUserAuth> and other related options.  The first is supported by an RT
 extension named L</RT::Authen::ExternalAuth>.  These two types may be used
 independently or together, and both can fallback to RT's internal
 authentication.
@@ -39,7 +39,7 @@ OpenLDAP or Active Directory server, as the authoritative repository and keeps
 RT up to date accordingly.  This can be used in tandem with any of the external
 authentication options as it does not provide any authentication itself.
 
-=head2 Via your web server, aka C<$WebExternalAuth>, aka C<REMOTE_USER>
+=head2 Via your web server, aka C<$WebRemoteUserAuth>, aka C<REMOTE_USER>
 
 This type of external authentication is built-in to RT and bypasses the RT
 login form.  Instead, RT defers authentication to the web server which is
@@ -48,10 +48,10 @@ checks the value of C<REMOTE_USER> against its internal database and logs in
 the matched user.
 
 It is often used to provide single sign-on (SSO) support via Apache modules
-such as C<mod_auth_kerb> (to talk to Active Directory).  C<$WebExternalAuth> is
+such as C<mod_auth_kerb> (to talk to Active Directory).  C<$WebRemoteUserAuth> is
 widely used by organizations with existing authentication standards for web
 services that leverge web server modules for central authentication services.
-The flexibility of RT's C<$WebExternalAuth> support means that it can be setup
+The flexibility of RT's C<$WebRemoteUserAuth> support means that it can be setup
 with almost any authentication system.
 
 In order to keep user data in sync, this type of external auth is almost always
@@ -68,12 +68,12 @@ and you can read the documentation by running C<perldoc /opt/rt4/etc/RT_Config.p
 The list below is meant to make you aware of what's available.  You should read
 the full documentation as described above.
 
-=head4 C<$WebExternalAuth>
+=head4 C<$WebRemoteUserAuth>
 
 Enables or disables RT's expectation that the web server will provide
 authentication using the C<REMOTE_USER> environment variable.
 
-=head4 C<$WebExternalAuthContinuous>
+=head4 C<$WebRemoteUserContinuous>
 
 Check C<REMOTE_USER> on every request rather than the initial request.
 
@@ -81,25 +81,25 @@ When this is off, users will remain logged into RT even after C<REMOTE_USER> is
 no longer provided.  This provides a separation of sessions, but it may not be
 desirable in all cases.  For example, if a user logs out of the external
 authentication system their RT session will remain active unless
-C<$WebExternalAuthContinuous> is on.
+C<$WebRemoteUserContinuous> is on.
 
-=head4 C<$WebFallbackToInternalAuth>
+=head4 C<$WebFallbackToRTLogin>
 
 If true, allows internal logins as well as C<REMOTE_USER> by providing a login
 form if external authentication fails. This is useful to provide local admin
 access (usually as root) or self service access for people without external
 user accounts.
 
-=head4 C<$WebExternalAuto>
+=head4 C<$WebRemoteUserAutocreate>
 
 Enables or disables auto-creation of RT users when a new C<REMOTE_USER> is
 encountered.
 
-=head4 C<$AutoCreate>
+=head4 C<$UserAutocreateDefaults>
 
 Specifies the default properties of auto-created users.
 
-=head4 C<$WebExternalGecos>
+=head4 C<$WebRemoteUserGecos>
 
 Tells RT to compare C<REMOTE_USER> to the C<Gecos> field of RT users instead of
 the C<Name> field.
@@ -110,7 +110,7 @@ L<RT::Authen::ExternalAuth> is an RT extension which provides authentication
 B<using> RT's login form.  It can be configured to talk to an LDAP source (such
 as Active Directory), an external database, or an SSO cookie.
 
-The key difference between C<$WebExternalAuth> and L<RT::Authen::ExternalAuth>
+The key difference between C<$WebRemoteUserAuth> and L<RT::Authen::ExternalAuth>
 is the use of the RT login form and what part of the system talks to your
 authentication source (your web server vs. RT itself).
 
@@ -122,7 +122,7 @@ also get their information pulled and updated from your external source.
 
 Auth-only configurations are rare, and generally not as useful.
 
-Info-only configurations are commonly setup in tandem with C<$WebExternalAuth>.
+Info-only configurations are commonly setup in tandem with C<$WebRemoteUserAuth>.
 This lets your web server handle authentication (usually for SSO) and
 C<RT::Authen::ExternalAuth> ensures user data is updated every time someone
 logs in.
diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index b98de3b..25bc21d 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1956,64 +1956,66 @@ Set(@ReferrerWhitelist, qw());
 
 =over 4
 
-=item C<$WebExternalAuth>
+=item C<$WebRemoteUserAuth>
 
-If C<$WebExternalAuth> is defined, RT will defer to the environment's
-REMOTE_USER variable.
+If C<$WebRemoteUserAuth> is defined, RT will defer to the environment's
+REMOTE_USER variable, which should be set by the webserver's
+authentication layer.
 
 =cut
 
-Set($WebExternalAuth, undef);
+Set($WebRemoteUserAuth, undef);
 
-=item C<$WebExternalAuthContinuous>
+=item C<$WebRemoteUserContinuous>
 
-If C<$WebExternalAuthContinuous> is defined, RT will check for the
+If C<$WebRemoteUserContinuous> is defined, RT will check for the
 REMOTE_USER on each access.  If you would prefer this to only happen
 once (at initial login) set this to a false value.  The default
-setting will help ensure that if your external authentication system
+setting will help ensure that if your webserver's authentication layer
 deauthenticates a user, RT notices as soon as possible.
 
 =cut
 
-Set($WebExternalAuthContinuous, 1);
+Set($WebRemoteUserContinuous, 1);
 
-=item C<$WebFallbackToInternalAuth>
+=item C<$WebFallbackToRTLogin>
 
-If C<$WebFallbackToInternalAuth> is defined, the user is allowed a
+If C<$WebFallbackToRTLogin> is defined, the user is allowed a
 chance of fallback to the login screen, even if REMOTE_USER failed.
 
 =cut
 
-Set($WebFallbackToInternalAuth, undef);
+Set($WebFallbackToRTLogin, undef);
 
-=item C<$WebExternalGecos>
+=item C<$WebRemoteUserGecos>
 
-C<$WebExternalGecos> means to match 'gecos' field as the user
-identity); useful with mod_auth_pwcheck and IIS Integrated Windows
+C<$WebRemoteUserGecos> means to match 'gecos' field as the user
+identity; useful with C<mod_auth_pwcheck> and IIS Integrated Windows
 logon.
 
 =cut
 
-Set($WebExternalGecos, undef);
+Set($WebRemoteUserGecos, undef);
 
-=item C<$WebExternalAuto>
+=item C<$WebRemoteUserAutocreate>
 
-C<$WebExternalAuto> will create users under the same name as
-REMOTE_USER upon login, if it's missing in the Users table.
+C<$WebRemoteUserAutocreate> will create users under the same name as
+REMOTE_USER upon login, if they are missing from the Users table.
 
 =cut
 
-Set($WebExternalAuto, undef);
+Set($WebRemoteUserAutocreate, undef);
 
-=item C<$AutoCreate>
+=item C<$UserAutocreateDefaults>
 
-If C<$WebExternalAuto> is set to 1, C<$AutoCreate> will be passed to
-User's Create method.  Use it to set defaults, such as creating
-Unprivileged users with C<{ Privileged => 0 }> This must be a hashref.
+If C<$WebRemoteUserAutocreate> is set to 1, C<$UserAutocreateDefaults>
+will be passed to L<RT::User/Create>.  Use it to set defaults, such as
+creating unprivileged users with C<<{ Privileged => 0 }>>.  This must be
+a hashref.
 
 =cut
 
-Set($AutoCreate, undef);
+Set($UserAutocreateDefaults, undef);
 
 =item C<$WebSessionClass>
 
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index f36ec2f..da9d821 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -821,6 +821,12 @@ our %META = (
             $config->Set( CustomFieldGroupings => %$groups );
         },
     },
+    WebExternalAuth           => { Deprecated => { Instead => 'WebRemoteUserAuth',       Remove => '4.4' }},
+    WebExternalAuthContinuous => { Deprecated => { Instead => 'WebRemoteUserContinuous', Remove => '4.4' }},
+    WebFallbackToInternalAuth => { Deprecated => { Instead => 'WebFallbackToRTLogin',    Remove => '4.4' }},
+    WebExternalGecos          => { Deprecated => { Instead => 'WebRemoteUserGecos',      Remove => '4.4' }},
+    WebExternalAuto           => { Deprecated => { Instead => 'WebRemoteUserAutocreate', Remove => '4.4' }},
+    AutoCreate                => { Deprecated => { Instead => 'UserAutocreateDefaults',  Remove => '4.4' }},
 );
 my %OPTIONS = ();
 my @LOADED_CONFIGS = ();
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index d46dd55..8a1dc9a 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -228,21 +228,21 @@ sub WebCanonicalizeInfo {
 
 
 
-=head2 WebExternalAutoInfo($user);
+=head2 WebRemoteUserAutocreateInfo($user);
 
-Returns a hash of user attributes, used when WebExternalAuto is set.
+Returns a hash of user attributes, used when WebRemoteUserAutocreate is set.
 
 =cut
 
-sub WebExternalAutoInfo {
+sub WebRemoteUserAutocreateInfo {
     my $user = shift;
 
     my %user_info;
 
     # default to making Privileged users, even if they specify
     # some other default Attributes
-    if ( !$RT::AutoCreate
-        || ( ref($RT::AutoCreate) && not exists $RT::AutoCreate->{Privileged} ) )
+    if ( !$RT::UserAutocreateDefaults
+        || ( ref($RT::UserAutocreateDefaults) && not exists $RT::UserAutocreateDefaults->{Privileged} ) )
     {
         $user_info{'Privileged'} = 1;
     }
@@ -309,7 +309,7 @@ sub HandleRequest {
 
     MaybeShowNoAuthPage($ARGS);
 
-    AttemptExternalAuth($ARGS) if RT->Config->Get('WebExternalAuthContinuous') or not _UserLoggedIn();
+    AttemptExternalAuth($ARGS) if RT->Config->Get('WebRemoteUserContinuous') or not _UserLoggedIn();
 
     _ForceLogout() unless _UserLoggedIn();
 
@@ -682,7 +682,7 @@ sub ShowRequestedPage {
 sub AttemptExternalAuth {
     my $ARGS = shift;
 
-    return unless ( RT->Config->Get('WebExternalAuth') );
+    return unless ( RT->Config->Get('WebRemoteUserAuth') );
 
     my $user = $ARGS->{user};
     my $m    = $HTML::Mason::Commands::m;
@@ -699,9 +699,9 @@ sub AttemptExternalAuth {
         and (not _UserLoggedIn() or $logged_in_external_user) )
     {
         $user = RT::Interface::Web::WebCanonicalizeInfo();
-        my $load_method = RT->Config->Get('WebExternalGecos') ? 'LoadByGecos' : 'Load';
+        my $load_method = RT->Config->Get('WebRemoteUserGecos') ? 'LoadByGecos' : 'Load';
 
-        if ( $^O eq 'MSWin32' and RT->Config->Get('WebExternalGecos') ) {
+        if ( $^O eq 'MSWin32' and RT->Config->Get('WebRemoteUserGecos') ) {
             my $NodeName = Win32::NodeName();
             $user =~ s/^\Q$NodeName\E\\//i;
         }
@@ -712,12 +712,12 @@ sub AttemptExternalAuth {
         $HTML::Mason::Commands::session{'CurrentUser'} = RT::CurrentUser->new();
         $HTML::Mason::Commands::session{'CurrentUser'}->$load_method($user);
 
-        if ( RT->Config->Get('WebExternalAuto') and not _UserLoggedIn() ) {
+        if ( RT->Config->Get('WebRemoteUserAutocreate') and not _UserLoggedIn() ) {
 
             # Create users on-the-fly
             my $UserObj = RT::User->new(RT->SystemUser);
             my ( $val, $msg ) = $UserObj->Create(
-                %{ ref RT->Config->Get('AutoCreate') ? RT->Config->Get('AutoCreate') : {} },
+                %{ ref RT->Config->Get('UserAutocreateDefaults') ? RT->Config->Get('UserAutocreateDefaults') : {} },
                 Name  => $user,
                 Gecos => $user,
             );
@@ -725,7 +725,7 @@ sub AttemptExternalAuth {
             if ($val) {
 
                 # now get user specific information, to better create our user.
-                my $new_user_info = RT::Interface::Web::WebExternalAutoInfo($user);
+                my $new_user_info = RT::Interface::Web::WebRemoteUserAutocreateInfo($user);
 
                 # set the attributes that have been defined.
                 foreach my $attribute ( $UserObj->WritableAttributes, qw(Privileged Disabled) ) {
@@ -741,8 +741,8 @@ sub AttemptExternalAuth {
                 }
                 $HTML::Mason::Commands::session{'CurrentUser'}->Load($user);
             } else {
-                RT->Logger->error("Couldn't auto-create user '$user' when attempting WebExternalAuth: $msg");
-                AbortExternalAuth( Error => "AutoCreate" );
+                RT->Logger->error("Couldn't auto-create user '$user' when attempting WebRemoteUser: $msg");
+                AbortExternalAuth( Error => "UserAutocreateDefaults" );
             }
         }
 
@@ -761,7 +761,7 @@ sub AttemptExternalAuth {
         } else {
             # Couldn't auth with the REMOTE_USER provided because an RT
             # user doesn't exist and we're configured not to create one.
-            RT->Logger->error("Couldn't find internal user for '$user' when attempting WebExternalAuth and RT is not configured for auto-creation. Refer to `perldoc $RT::BasePath/docs/authentication.pod` if you want to allow auto-creation.");
+            RT->Logger->error("Couldn't find internal user for '$user' when attempting WebRemoteUser and RT is not configured for auto-creation. Refer to `perldoc $RT::BasePath/docs/authentication.pod` if you want to allow auto-creation.");
             AbortExternalAuth(
                 Error => "NoInternalUser",
                 User  => $user,
@@ -773,7 +773,7 @@ sub AttemptExternalAuth {
         # should kick them out.
         AbortExternalAuth( Error => "Deauthorized" );
     }
-    elsif (not RT->Config->Get('WebFallbackToInternalAuth')) {
+    elsif (not RT->Config->Get('WebFallbackToRTLogin')) {
         # Abort if we don't want to fallback internally
         AbortExternalAuth( Error => "NoRemoteUser" );
     }
@@ -781,7 +781,7 @@ sub AttemptExternalAuth {
 
 sub AbortExternalAuth {
     my %args  = @_;
-    my $error = $args{Error} ? "/Errors/WebExternalAuth/$args{Error}" : undef;
+    my $error = $args{Error} ? "/Errors/WebRemoteUser/$args{Error}" : undef;
     my $m     = $HTML::Mason::Commands::m;
     my $r     = $HTML::Mason::Commands::r;
 
diff --git a/lib/RT/User.pm b/lib/RT/User.pm
index e5f1538..fd6a80c 100644
--- a/lib/RT/User.pm
+++ b/lib/RT/User.pm
@@ -989,8 +989,8 @@ sub CurrentUserRequireToSetPassword {
         RequireCurrent => 1,
     );
 
-    if ( RT->Config->Get('WebExternalAuth')
-        && !RT->Config->Get('WebFallbackToInternalAuth')
+    if ( RT->Config->Get('WebRemoteUserAuth')
+        && !RT->Config->Get('WebFallbackToRTLogin')
     ) {
         $res{'CanSet'} = 0;
         $res{'Reason'} = $self->loc("External authentication enabled.");
diff --git a/share/html/Elements/Login b/share/html/Elements/Login
index c1b3588..8e9dd12 100644
--- a/share/html/Elements/Login
+++ b/share/html/Elements/Login
@@ -63,7 +63,7 @@
 
 <& LoginRedirectWarning, %ARGS &>
 
-% unless (RT->Config->Get('WebExternalAuth') and !RT->Config->Get('WebFallbackToInternalAuth')) {
+% unless (RT->Config->Get('WebRemoteUserAuth') and !RT->Config->Get('WebFallbackToRTLogin')) {
 <form id="login" name="login" method="post" action="<% RT->Config->Get('WebPath') %>/NoAuth/Login.html">
 
 <div class="input-row">
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 424c0e6..6671e64 100644
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -579,8 +579,8 @@ my $build_main_nav = sub {
         }
     }
     if ( $session{'CurrentUser'}->Name
-         && (   !RT->Config->Get('WebExternalAuth')
-              || RT->Config->Get('WebFallbackToInternalAuth') )) {
+         && (   !RT->Config->Get('WebRemoteUserAuth')
+              || RT->Config->Get('WebFallbackToRTLogin') )) {
         $about_me->child( logout => title => loc('Logout'), path => '/NoAuth/Logout.html' );
     }
     if ( $request_path =~ m{^/Dashboards/(\d+)?}) {
@@ -954,8 +954,8 @@ my $build_selfservice_nav = sub {
     }
 
     if ( $session{'CurrentUser'}->Name
-         && (   !RT->Config->Get('WebExternalAuth')
-              || RT->Config->Get('WebFallbackToInternalAuth') )) {
+         && (   !RT->Config->Get('WebRemoteUserAuth')
+              || RT->Config->Get('WebFallbackToRTLogin') )) {
         $about_me->child( logout => title => loc('Logout'), path => '/NoAuth/Logout.html' );
     }
 
diff --git a/share/html/Errors/WebExternalAuth/Deauthorized b/share/html/Errors/WebRemoteUser/Deauthorized
similarity index 100%
rename from share/html/Errors/WebExternalAuth/Deauthorized
rename to share/html/Errors/WebRemoteUser/Deauthorized
diff --git a/share/html/Errors/WebExternalAuth/NoInternalUser b/share/html/Errors/WebRemoteUser/NoInternalUser
similarity index 100%
rename from share/html/Errors/WebExternalAuth/NoInternalUser
rename to share/html/Errors/WebRemoteUser/NoInternalUser
diff --git a/share/html/Errors/WebExternalAuth/NoRemoteUser b/share/html/Errors/WebRemoteUser/NoRemoteUser
similarity index 100%
rename from share/html/Errors/WebExternalAuth/NoRemoteUser
rename to share/html/Errors/WebRemoteUser/NoRemoteUser
diff --git a/share/html/Errors/WebExternalAuth/AutoCreate b/share/html/Errors/WebRemoteUser/UserAutocreateDefaults
similarity index 100%
rename from share/html/Errors/WebExternalAuth/AutoCreate
rename to share/html/Errors/WebRemoteUser/UserAutocreateDefaults
diff --git a/share/html/Errors/WebExternalAuth/Wrapper b/share/html/Errors/WebRemoteUser/Wrapper
similarity index 95%
rename from share/html/Errors/WebExternalAuth/Wrapper
rename to share/html/Errors/WebRemoteUser/Wrapper
index ad20860..9306851 100644
--- a/share/html/Errors/WebExternalAuth/Wrapper
+++ b/share/html/Errors/WebRemoteUser/Wrapper
@@ -58,7 +58,7 @@ my $login_url = $m->interp->apply_escapes(RT::Interface::Web::TangentForLoginURL
   </head>
   <body>
     <h1><% $Title %></h1>
-    <!-- WebExternalAuth error: <% $Error %> -->
+    <!-- WebRemoteUserAuth error: <% $Error %> -->
     <% $m->content |n%>
 
     <p id="contact-admin">
@@ -70,7 +70,7 @@ my $login_url = $m->interp->apply_escapes(RT::Interface::Web::TangentForLoginURL
 % }
     </p>
 
-% if (RT->Config->Get('WebExternalAuth') and RT->Config->Get('WebFallbackToInternalAuth')) {
+% if (RT->Config->Get('WebRemoteUserAuth') and RT->Config->Get('WebFallbackToRTLogin')) {
     <p id="internal-auth">
       <&|/l_unsafe, qq[<a href="$login_url">], '</a>' &>If you have an internal RT login, you may [_1]try it instead[_2].</&>
     </p>
diff --git a/share/html/m/_elements/login b/share/html/m/_elements/login
index fe3d8b9..a37b223 100644
--- a/share/html/m/_elements/login
+++ b/share/html/m/_elements/login
@@ -62,7 +62,7 @@
 
 <& /Elements/LoginRedirectWarning, %ARGS &>
 
-% unless (RT->Config->Get('WebExternalAuth') and !RT->Config->Get('WebFallbackToInternalAuth')) {
+% unless (RT->Config->Get('WebRemoteUserAuth') and !RT->Config->Get('WebFallbackToRTLogin')) {
 <form id="login" name="login" method="post" action="<% RT->Config->Get("WebPath") %>/NoAuth/Login.html">
 
 <div class="entry">
diff --git a/t/web/basic_auth.t b/t/web/basic_auth.t
index f8ac2ee..ff77f29 100644
--- a/t/web/basic_auth.t
+++ b/t/web/basic_auth.t
@@ -4,7 +4,7 @@ use RT;
 use RT::Test tests => 9;
 
 RT->Config->Set( DevelMode => 0 );
-RT->Config->Set( WebExternalAuth => 1 );
+RT->Config->Set( WebRemoteUserAuth => 1 );
 
 my ( $url, $m ) = RT::Test->started_ok( basic_auth => 1 );
 
@@ -23,7 +23,7 @@ $m->content_like(
     qr{<span class="current-user">\Qroot\E</span>}i,
     "Has user on the page"
 );
-$m->content_unlike(qr/Logout/i, "Has no logout button, no WebFallbackToInternalAuth");
+$m->content_unlike(qr/Logout/i, "Has no logout button, no WebFallbackToRTLogin");
 
 # Again, testing the plack middleware
 $m->get($url);
diff --git a/t/web/redirect-after-login.t b/t/web/redirect-after-login.t
index 35025a1..f9e7d88 100644
--- a/t/web/redirect-after-login.t
+++ b/t/web/redirect-after-login.t
@@ -226,7 +226,7 @@ for my $path (qw(Prefs/Other.html /Prefs/Other.html)) {
     unlike($agent->content, qr/Your username or password is incorrect/, "didn't get any error message");
 }
 
-# XXX TODO: we should also be testing WebExternalAuth here, but we don't have
+# XXX TODO: we should also be testing WebRemoteUserAuth here, but we don't have
 # the framework for dealing with that
 
 1;
diff --git a/t/web/remote_user.t b/t/web/remote_user.t
index 69c672f..fbc02f6 100644
--- a/t/web/remote_user.t
+++ b/t/web/remote_user.t
@@ -18,10 +18,10 @@ sub stop_server {
 diag "Continuous + Fallback";
 {
     RT->Config->Set( DevelMode => 0 );
-    RT->Config->Set( WebExternalAuth => 1 );
-    RT->Config->Set( WebExternalAuthContinuous => 1 );
-    RT->Config->Set( WebFallbackToInternalAuth => 1 );
-    RT->Config->Set( WebExternalAuto => 0 );
+    RT->Config->Set( WebRemoteUserAuth => 1 );
+    RT->Config->Set( WebRemoteUserAuthContinuous => 1 );
+    RT->Config->Set( WebFallbackToRTLogin => 1 );
+    RT->Config->Set( WebRemoteUserAutocreate => 0 );
 
     my ( $url, $m ) = RT::Test->started_ok( basic_auth => 'anon' );
 
@@ -116,10 +116,10 @@ diag "Continuous + Fallback";
 diag "Fallback OFF";
 {
     RT->Config->Set( DevelMode => 0 );
-    RT->Config->Set( WebExternalAuth => 1 );
-    RT->Config->Set( WebExternalAuthContinuous => 0 );
-    RT->Config->Set( WebFallbackToInternalAuth => 0 );
-    RT->Config->Set( WebExternalAuto => 0 );
+    RT->Config->Set( WebRemoteUserAuth => 1 );
+    RT->Config->Set( WebRemoteUserContinuous => 0 );
+    RT->Config->Set( WebFallbackToRTLogin => 0 );
+    RT->Config->Set( WebRemoteUserAutocreate => 0 );
 
     my ( $url, $m ) = RT::Test->started_ok( basic_auth => 'anon' );
 
@@ -133,14 +133,14 @@ diag "Fallback OFF";
     stop_server(\$m);
 }
 
-diag "AutoCreate";
+diag "WebRemoteUserAutocreate";
 {
     RT->Config->Set( DevelMode => 0 );
-    RT->Config->Set( WebExternalAuth => 1 );
-    RT->Config->Set( WebExternalAuthContinuous => 1 );
-    RT->Config->Set( WebFallbackToInternalAuth => 0 );
-    RT->Config->Set( WebExternalAuto => 1 );
-    RT->Config->Set( AutoCreate => { Organization => "BPS" } );
+    RT->Config->Set( WebRemoteUserAuth => 1 );
+    RT->Config->Set( WebRemoteUserContinuous => 1 );
+    RT->Config->Set( WebFallbackToRTLogin => 0 );
+    RT->Config->Set( WebRemoteUserAutocreate => 1 );
+    RT->Config->Set( UserAutocreateDefaults => { Organization => "BPS" } );
 
     my ( $url, $m ) = RT::Test->started_ok( basic_auth => 'anon' );
 
@@ -153,13 +153,13 @@ diag "AutoCreate";
         my $user = RT::User->new( RT->SystemUser );
         $user->Load("anewuser");
         ok $user->id, "Found newly created user";
-        is $user->Organization, "BPS", "Found Organization from AutoCreate hash";
+        is $user->Organization, "BPS", "Found Organization from UserAutocreateDefaults hash";
         ok $user->Privileged, "Privileged by default";
     }
 
     stop_server(\$m);
     RT->Config->Set(
-        AutoCreate => {
+        UserAutocreateDefaults => {
             Privileged   => 0,
             EmailAddress => 'foo at example.com',
         },

-----------------------------------------------------------------------


More information about the Rt-commit mailing list