[Rt-commit] rt branch, 4.4/ldap-not-found-logging, created. rt-4.4.4-25-g6874d09f5

Jim Brandt jbrandt at bestpractical.com
Thu Apr 25 14:44:25 EDT 2019


The branch, 4.4/ldap-not-found-logging has been created
        at  6874d09f52b325436fc32f2f6b429788dd5e1f9a (commit)

- Log -----------------------------------------------------------------
commit 6874d09f52b325436fc32f2f6b429788dd5e1f9a
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Thu Apr 25 14:40:00 2019 -0400

    Clarify external auth logging when users are not found
    
    Add a debug message to log when an account could not be found
    in the configured external sources.
    
    Create can be called in different contexts, some providing Name and
    some providing EmailAddress, for example. In these cases, one or
    the other may not have a value and this is not necessarily a
    misconfiguration. Clarify the message to avoid giving this
    potentially misleading information.

diff --git a/lib/RT/User.pm b/lib/RT/User.pm
index 0d9031bb1..e60c0b429 100644
--- a/lib/RT/User.pm
+++ b/lib/RT/User.pm
@@ -867,11 +867,7 @@ sub CanonicalizeUserInfoFromExternalAuth {
             # Jump to the next attr in $args if this one isn't in the attr_match_list
             $RT::Logger->debug( "Attempting to use this canonicalization key:",$rt_attr);
             unless( ($args->{$rt_attr} // '') =~ /\S/ ) {
-                $RT::Logger->debug("This attribute (",
-                                    $rt_attr,
-                                    ") is null or incorrectly defined in the attr_map for this service (",
-                                    $service,
-                                    ")");
+                $RT::Logger->debug("No value provided for RT user attribute $rt_attr");
                 next;
             }
 
@@ -921,6 +917,9 @@ sub CanonicalizeUserInfoFromExternalAuth {
         }
         %$args = (%$args, %params);
     }
+    else {
+        $RT::Logger->debug("No record found in configured external sources");
+    }
 
     $RT::Logger->info(  (caller(0))[3],
                         "returning",

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


More information about the rt-commit mailing list