https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292020-05-02T05:14:31ZRedmineRedmine - Feature #33345: Include an authentication method name in LDAP connection error messageshttps://www.redmine.org/issues/33345?journal_id=976232020-05-02T05:14:31ZGo MAEDA
<ul><li><strong>Target version</strong> set to <i>Candidate for next major release</i></li></ul> Redmine - Feature #33345: Include an authentication method name in LDAP connection error messageshttps://www.redmine.org/issues/33345?journal_id=991582020-09-13T02:26:22ZGo MAEDA
<ul><li><strong>Category</strong> set to <i>Accounts / authentication</i></li></ul> Redmine - Feature #33345: Include an authentication method name in LDAP connection error messageshttps://www.redmine.org/issues/33345?journal_id=1040742021-09-08T08:48:19ZGo MAEDA
<ul></ul><p>I think that just simply adding the prefix "LDAP" to an error message is better.</p>
<pre>
LDAP: Connection refused - connect(2) for 192.0.2.1:389
</pre>
<p>The reasons are as follows:</p>
<ul>
<li>Adding the prefix "LDAP" is enough to understand that there is a problem with communication with the LDAP server</li>
<li>We don't have to add a new string to the locales</li>
<li>Redmine may support new auth sources other than LDAP in the future. The following way of using auth_method_name method can be applied for new auth sources</li>
</ul>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/app/models/auth_source_ldap.rb b/app/models/auth_source_ldap.rb
index 8ed7ce27f..846c7d2f3 100644
</span><span class="gd">--- a/app/models/auth_source_ldap.rb
</span><span class="gi">+++ b/app/models/auth_source_ldap.rb
</span><span class="p">@@ -63,7 +63,7 @@</span> class AuthSourceLdap < AuthSource
end
end
rescue *NETWORK_EXCEPTIONS => e
<span class="gd">- raise AuthSourceException.new(e.message)
</span><span class="gi">+ raise AuthSourceException.new("#{auth_method_name}: #{e.message}")
</span> end
# Test the connection to the LDAP
<span class="p">@@ -77,7 +77,7 @@</span> class AuthSourceLdap < AuthSource
end
end
rescue *NETWORK_EXCEPTIONS => e
<span class="gd">- raise AuthSourceException.new(e.message)
</span><span class="gi">+ raise AuthSourceException.new("#{auth_method_name}: #{e.message}")
</span> end
def auth_method_name
<span class="p">@@ -107,7 +107,7 @@</span> class AuthSourceLdap < AuthSource
end
results
rescue *NETWORK_EXCEPTIONS => e
<span class="gd">- raise AuthSourceException.new(e.message)
</span><span class="gi">+ raise AuthSourceException.new("#{auth_method_name}: #{e.message}")
</span> end
def ldap_mode
</code></pre> Redmine - Feature #33345: Include an authentication method name in LDAP connection error messageshttps://www.redmine.org/issues/33345?journal_id=1040782021-09-09T01:06:03ZYuichi HARADA
<ul></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>I think that just simply adding the prefix "LDAP" to an error message is better.</p>
<p>[...]</p>
<p>The reasons are as follows:</p>
<ul>
<li>Adding the prefix "LDAP" is enough to understand that there is a problem with communication with the LDAP server</li>
<li>We don't have to add a new string to the locales</li>
<li>Redmine may support new auth sources other than LDAP in the future. The following way of using auth_method_name method can be applied for new auth sources</li>
</ul>
<p>[...]</p>
</blockquote>
<p>I agree. I think a patch will be simple.</p> Redmine - Feature #33345: Include an authentication method name in LDAP connection error messageshttps://www.redmine.org/issues/33345?journal_id=1043352021-10-15T00:59:14ZGo MAEDA
<ul><li><strong>File</strong> <a href="/attachments/28164">33345-v2.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/28164/33345-v2.patch">33345-v2.patch</a> added</li></ul><p>Updated the patch using the code posted in <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Include an authentication method name in LDAP connection error messages (Closed)" href="https://www.redmine.org/issues/33345#note-3">#33345#note-3</a>.</p> Redmine - Feature #33345: Include an authentication method name in LDAP connection error messageshttps://www.redmine.org/issues/33345?journal_id=1048092021-12-09T09:21:40ZGo MAEDA
<ul><li><strong>Target version</strong> changed from <i>Candidate for next major release</i> to <i>5.0.0</i></li></ul><p>Setting the target version to 5.0.0.</p> Redmine - Feature #33345: Include an authentication method name in LDAP connection error messageshttps://www.redmine.org/issues/33345?journal_id=1048342021-12-13T09:17:25ZGo MAEDA
<ul><li><strong>Subject</strong> changed from <i>Improvement of LDAP connection error message</i> to <i>Include an authentication method name in LDAP connection error messages</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Go MAEDA</i></li></ul><p>Committed the patch. Thank you.</p> Redmine - Feature #33345: Include an authentication method name in LDAP connection error messageshttps://www.redmine.org/issues/33345?journal_id=1061632022-03-27T02:57:47ZGo MAEDA
<ul><li><strong>Tracker</strong> changed from <i>Patch</i> to <i>Feature</i></li></ul>