File tree 3 files changed +13
-18
lines changed
3 files changed +13
-18
lines changed Original file line number Diff line number Diff line change @@ -273,9 +273,8 @@ production: &base
273
273
encryption: 'plain'
274
274
275
275
# Enables SSL certificate verification if encryption method is
276
- # "start_tls" or "simple_tls". (Defaults to false for backward-
277
- # compatibility)
278
- verify_certificates: false
276
+ # "start_tls" or "simple_tls". Defaults to true.
277
+ verify_certificates: true
279
278
280
279
# Specifies the path to a file containing a PEM-format CA certificate,
281
280
# e.g. if you need to use an internal CA.
Original file line number Diff line number Diff line change @@ -155,18 +155,11 @@ def cron_random_weekly_time
155
155
server [ 'encryption' ] = 'simple_tls' if server [ 'encryption' ] == 'ssl'
156
156
server [ 'encryption' ] = 'start_tls' if server [ 'encryption' ] == 'tls'
157
157
158
- # Certificates are not verified for backwards compatibility.
159
- # This default should be flipped to true in 9.5.
160
- if server [ 'verify_certificates' ] . nil?
161
- server [ 'verify_certificates' ] = false
162
-
163
- message = <<-MSG . strip_heredoc
164
- LDAP SSL certificate verification is disabled for backwards-compatibility.
165
- Please add the "verify_certificates" option to gitlab.yml for each LDAP
166
- server. Certificate verification will be enabled by default in GitLab 9.5.
167
- MSG
168
- Rails . logger . warn ( message )
169
- end
158
+ # Certificate verification was added in 9.4.2, and defaulted to false for
159
+ # backwards-compatibility.
160
+ #
161
+ # Since GitLab 10.0, verify_certificates defaults to true for security.
162
+ server [ 'verify_certificates' ] = true if server [ 'verify_certificates' ] . nil?
170
163
171
164
Settings . ldap [ 'servers' ] [ key ] = server
172
165
end
Original file line number Diff line number Diff line change @@ -87,9 +87,12 @@ main: # 'main' is the GitLab 'provider ID' of this LDAP server
87
87
encryption: 'plain'
88
88
89
89
# Enables SSL certificate verification if encryption method is
90
- # "start_tls" or "simple_tls". (Defaults to false for backward-
91
- # compatibility)
92
- verify_certificates: false
90
+ # "start_tls" or "simple_tls". Defaults to true since GitLab 10.0 for
91
+ # security. This may break installations upon upgrade to 10.0, that did
92
+ # not know their LDAP SSL certificates were not setup properly. For
93
+ # example, when using self-signed certificates, the ca_file path may
94
+ # need to be specified.
95
+ verify_certificates: true
93
96
94
97
# Specifies the path to a file containing a PEM-format CA certificate,
95
98
# e.g. if you need to use an internal CA.
You can’t perform that action at this time.
0 commit comments