Skip to content

Commit da719e7

Browse files
committed
Merge branch 'id-deprecate-self-signed-cert' into 'main'
Deprecate self_signed_cert config setting See merge request gitlab-org/gitlab-shell!552
2 parents 4989011 + 537f8e1 commit da719e7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

client/httpclient.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ func buildHttpsTransport(hcc httpClientCfg, selfSignedCert bool, gitlabURL strin
162162
}
163163
}
164164
tlsConfig := &tls.Config{
165-
RootCAs: certPool,
165+
RootCAs: certPool,
166+
// The self_signed_cert config setting is deprecated
167+
// The field and its usage is going to be removed in
168+
// https://gitlab.com/gitlab-org/gitlab-shell/-/issues/541
166169
InsecureSkipVerify: selfSignedCert,
167170
MinVersion: tls.VersionTLS12,
168171
}

config.yml.example

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ http_settings:
2626
# password: somepass
2727
# ca_file: /etc/ssl/cert.pem
2828
# ca_path: /etc/pki/tls/certs
29+
#
30+
# The self_signed_cert option is deprecated
31+
# When it's set to true, any certificate is accepted, which may make machine-in-the-middle attack possible
32+
# Certificates specified in ca_file and ca_path are trusted anyway even if they are self-signed
33+
# Issue: https://gitlab.com/gitlab-org/gitlab-shell/-/issues/120
2934
self_signed_cert: false
3035

3136
# File used as authorized_keys for gitlab user

0 commit comments

Comments
 (0)