Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Set default TLS mode to start_tls and reorder in form

Oliver Günther8295f4986dc7
diff --git a/app/models/ldap_auth_source.rb b/app/models/ldap_auth_source.rb
index 0227a1de034..3e32996f21b 100644
--- a/app/models/ldap_auth_source.rb
+++ b/app/models/ldap_auth_source.rb
@@ -29,7 +29,7 @@
require 'net/ldap'
class LdapAuthSource < AuthSource
- enum tls_mode: %w[plain_ldap simple_tls start_tls]
+ enum tls_mode: %w[plain_ldap simple_tls start_tls], _default: 'start_tls'
validates :tls_mode, inclusion: { in: tls_modes.keys }
validates_presence_of :host, :port, :attr_login
diff --git a/app/views/ldap_auth_sources/_form.html.erb b/app/views/ldap_auth_sources/_form.html.erb
index dbc6d588a0d..65f86e1b544 100644
--- a/app/views/ldap_auth_sources/_form.html.erb
+++ b/app/views/ldap_auth_sources/_form.html.erb
@@ -65,12 +65,12 @@ See COPYRIGHT and LICENSE files for more details.
link: OpenProject::Static::Links[:ldap_encryption_documentation][:href] %>
</p>
<div class="form--field">
- <%= f.radio_button :tls_mode,
- 'plain_ldap',
- label: t('ldap_auth_sources.tls_mode.plain'),
- container_class: '-wide' %>
+ <%= f.radio_button :tls_mode,
+ 'start_tls',
+ label: t('ldap_auth_sources.tls_mode.start_tls'),
+ container_class: '-wide' %>
<p class="form--field-instructions">
- <%= t('ldap_auth_sources.tls_mode.plain_description') %>
+ <%= t('ldap_auth_sources.tls_mode.start_tls_description') %>
</p>
</div>
<div class="form--field">
@@ -83,12 +83,12 @@ See COPYRIGHT and LICENSE files for more details.
</p>
</div>
<div class="form--field">
- <%= f.radio_button :tls_mode,
- 'start_tls',
- label: t('ldap_auth_sources.tls_mode.start_tls'),
- container_class: '-wide' %>
+ <%= f.radio_button :tls_mode,
+ 'plain_ldap',
+ label: t('ldap_auth_sources.tls_mode.plain'),
+ container_class: '-wide' %>
<p class="form--field-instructions">
- <%= t('ldap_auth_sources.tls_mode.start_tls_description') %>
+ <%= t('ldap_auth_sources.tls_mode.plain_description') %>
</p>
</div>
</fieldset>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 611ede0ccda..55dd097f074 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -153,6 +153,7 @@ en:
Leave this unchecked to only allow existing accounts in OpenProject to authenticate through LDAP!
connection_encryption: 'Connection encryption'
+ encryption_details: 'Encryption details'
system_account: 'System account'
system_account_legend: |
OpenProject requires read-only access through a system account to lookup users and groups in your LDAP tree.
@@ -164,15 +165,19 @@ en:
what LDAP attributes are used to define the attributes of an OpenProject user (attribute mapping).
tls_mode:
plain: 'none'
- simple_tls: 'simple_tls'
- start_tls: 'start_tls'
- plain_description: "Plain unencrypted connection, no TLS negotiation."
- simple_tls_description: "Implicit TLS encryption, but no certificate validation. Use with caution and implicit trust of the LDAP connection."
- start_tls_description: "Explicit TLS encryption with full validation. Use for LDAP over TLS/SSL."
+ simple_tls: 'LDAPS'
+ start_tls: 'STARTTLS'
+ plain_description: "Opens an unencrypted connection to the LDAP server. Not recommended for production."
+ simple_tls_description: "Use LDAPS. Requires a separate port on the LDAP server. This mode is often deprecated, we recommend using STARTTLS whenever possible."
+ start_tls_description: "Sends a STARTTLS command after connecting to the standard LDAP port. Recommended for encrypted connections."
section_more_info_link_html: >
This section concerns the connection security of this LDAP authentication source.
For more information, visit <a href="%{link}">the Net::LDAP documentation</a>.
-
+ tls_options:
+ verify_peer: "Verify SSL certificate"
+ verify_peer_description: "Enables strict SSL verification of the certificate trusted chain."
+ verify_hostname: "Verify certificate hostname"
+ verify_hostname_description: "Verifies the SSL certificate hostname"
forums:
show:
no_results_title_text: There are currently no posts for the forum.