プロジェクト

全般

プロフィール

Vote #79523

完了

Support self-signed LDAPS connections

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
LDAP_28
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
28
version_id:
99
issue_org_id:
29606
author_id:
14446
assigned_to_id:
1
comments:
11
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

With the introduction of certficate checks to LDAPS connections in trunk #24970 (and maybe 3.4 in #29476), we should enable the user to fall back to the old behavior, where server certificates were not checked.

This is especially important, where local domain controllers and LDAP servers are used as an authentication backend. Because there servers will often use self-signed certificates.

The attached patch adds a configuration option to disable the certificate checks for LDAPS connections.

h4. Implementation

The patch adds a new boolean column to @auth_sources@ called @verify_peer@. The LDAP auth source edit screen is extended so that users may decide if they want to use "LDAP", "LDAPS without certificate check" (this one is new) or "LDAPS with certificate check".

!Screen%20Shot%202018-09-13%20at%2014.24.18.png!

Depending on the selected option, the @tls@ and @verify_peer@ attributes are set on the auth source.

Furthermore the patch extends the LDAP connection setup code, to use the newly introduced setting.

h4. Backwards compatibility

To ensure backwards compatibility with the current Redmine trunk, the new column @verify_peer@ defaults to @true@. This way, connections which use @tls@ will continue checking the certificates.

If you want to stay compatible with the behavior in the latest Redmine release, then the default value should be @false@, since 3.4 currently doesn't verify certificates, as explained in #29476.

I chose to introduce a new column instead of changing the existing one, so that the db schema remains compatible with other auth sources, which may be used by plugins. Adding a new column, should not break any existing code.

h4. Redmine.pm compatibility

Redmine.pm currently does not verify certificates.

A brief check suggests, that the library which is used in Redmine.pm simpy doesn't support checking server certificates. Therefore in order to properly secure LDAP authentication for SVN and/or to support this new configuration, Redmine.pm would need to switch to a different LDAP library. But this would be out of scope for this ticket. This patch neither improves nor worsens the security of Redmine.pm's LDAP authentication.

h4. Related issues

  • #24970 introduces server certificate checks for LDAPS for Redmine 4.0
  • #29476 suggests to backport #24970 to Redmine 3.4
  • #27071 seems to be facing the problem, that the certficate cannot be validated
  • #3358 was suggesting (among others) a similar feature

The attached patch is targeted at r17480.


journals

!https://www.redmine.org/attachments/download/21415/Screen%20Shot%202018-09-13%20at%2014.24.18.png!
--------------------------------------------------------------------------------

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

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

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

--------------------------------------------------------------------------------
Using self-signed certificates is not so uncommon for on-premises. Setting the target version to 4.0.0.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
After some internal discussion at "Planio":https://plan.io/redmine-hosting/, we've decided to further clarify the wording. Attached you may find an updated patch. It only differs in the locale files.

It should be now more clear, that LDAPS _with_ certificate check should be considered proper LDAPS, while the option _without_ certificate check is merely an exception for special use cases.

I've also replaced authorization with authentication in the new texts.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Committed, thanks.
--------------------------------------------------------------------------------


related_issues

relates,Closed,24970,Net::LDAP::LdapError is deprecated
relates,Closed,29476,Update net-ldap to 0.16.0
relates,Closed,27071,Error testing LDAPS Connection: "Unable to connect (hostname X.X.X.X does not match the server certificate)"
relates,New,3358,Advanced LDAP authentication
relates,Closed,8068,LDAP Authentificaton doesn't verify certificate validity

Admin Redmine さんが3年以上前に更新

  • カテゴリLDAP_28 にセット
  • 対象バージョン4.0.0_99 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0