Skip to content

Commit b1b6071

Browse files
V0V4Nbalasankarc
authored andcommitted
Restore support for SHA-1 RSA cryptography
Changelog: fixed
1 parent be52c36 commit b1b6071

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

docker/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ RUN busybox --install \
3232
RUN rm -rf /etc/update-motd.d /etc/motd /etc/motd.dynamic
3333
RUN ln -fs /dev/null /run/motd.dynamic
3434

35+
# Legacy code to be removed on 17.0. See: https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7035
36+
ENV GITLAB_ALLOW_SHA1_RSA=false
37+
3538
# Copy assets
3639
COPY RELEASE /
3740
COPY assets/ /assets/

docker/assets/wrapper

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ sleep 3s
106106
# Run unclean start detection & cleanup
107107
detect_unclean_start
108108

109+
# Legacy block to be removed on 17.0. See: https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7035
110+
# It re-adds support for rsa key types which was removed on 16.0 without going
111+
# through the proper deprecation process.
112+
if [ "${GITLAB_ALLOW_SHA1_RSA}" == 'true' ]; then
113+
printf '\n# Enabled/Disabled via GITLAB_ALLOW_SHA1_RSA=[true/false]\nHostKeyAlgorithms +ssh-rsa\nPubkeyAcceptedKeyTypes +ssh-rsa' >> /assets/sshd_config
114+
fi
115+
109116
# Check if this is a valid upgrade path
110117
# If the VERSION file doesn't exist, then this is not an upgrade
111118
if old_version=$(cat /var/opt/gitlab/gitlab-rails/VERSION)

0 commit comments

Comments
 (0)