Skip to content

Commit

Permalink
ceph-post-file: migrate to RSA SSH keys
Browse files Browse the repository at this point in the history
DSA keys are being deprecated: http://www.openssh.com/legacy.html

drop.ceph.com will continue to allow the old DSA key but eventually,
users submitting logs using ceph-post-file will run into issues when
OpenSSH completely drops support for the algorithm.

Fixes: http://tracker.ceph.com/issues/14267

Signed-off-by: David Galloway <[email protected]>
  • Loading branch information
David Galloway committed Aug 22, 2016
1 parent 20186b2 commit ecd02bf
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 28 deletions.
8 changes: 4 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ EXTRA_DIST += \
udev/60-ceph-by-parttypeuuid.rules \
udev/95-ceph-osd.rules \
share/known_hosts_drop.ceph.com \
share/id_dsa_drop.ceph.com \
share/id_dsa_drop.ceph.com.pub
share/id_rsa_drop.ceph.com \
share/id_rsa_drop.ceph.com.pub

NPROC = nproc
if FREEBSD
Expand All @@ -30,8 +30,8 @@ endif
install-data-local::
-mkdir -p $(DESTDIR)$(datadir)/ceph
-install -m 600 share/known_hosts_drop.ceph.com $(DESTDIR)$(datadir)/ceph/known_hosts_drop.ceph.com
-install -m 600 share/id_dsa_drop.ceph.com $(DESTDIR)$(datadir)/ceph/id_dsa_drop.ceph.com
-install -m 600 share/id_dsa_drop.ceph.com.pub $(DESTDIR)$(datadir)/ceph/id_dsa_drop.ceph.com.pub
-install -m 600 share/id_rsa_drop.ceph.com $(DESTDIR)$(datadir)/ceph/id_rsa_drop.ceph.com
-install -m 600 share/id_rsa_drop.ceph.com.pub $(DESTDIR)$(datadir)/ceph/id_rsa_drop.ceph.com.pub

all-local::
if WITH_DEBUG
Expand Down
4 changes: 2 additions & 2 deletions ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -924,8 +924,8 @@ DISABLE_RESTART_ON_UPDATE="yes"
%{_mandir}/man8/rbd-replay-prep.8*
%dir %{_datadir}/ceph/
%{_datadir}/ceph/known_hosts_drop.ceph.com
%{_datadir}/ceph/id_dsa_drop.ceph.com
%{_datadir}/ceph/id_dsa_drop.ceph.com.pub
%{_datadir}/ceph/id_rsa_drop.ceph.com
%{_datadir}/ceph/id_rsa_drop.ceph.com.pub
%dir %{_sysconfdir}/ceph/
%config %{_sysconfdir}/bash_completion.d/rados
%config %{_sysconfdir}/bash_completion.d/rbd
Expand Down
4 changes: 2 additions & 2 deletions debian/ceph-common.install
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ usr/share/man/man8/rbd.8
usr/share/man/man8/rbdmap.8
usr/share/man/man8/rbd-replay*.8
usr/share/ceph/known_hosts_drop.ceph.com
usr/share/ceph/id_dsa_drop.ceph.com
usr/share/ceph/id_dsa_drop.ceph.com.pub
usr/share/ceph/id_rsa_drop.ceph.com
usr/share/ceph/id_rsa_drop.ceph.com.pub
etc/ceph/rbdmap
etc/init.d/rbdmap
lib/udev/rules.d/50-rbd.rules
Expand Down
12 changes: 0 additions & 12 deletions share/id_dsa_drop.ceph.com

This file was deleted.

1 change: 0 additions & 1 deletion share/id_dsa_drop.ceph.com.pub

This file was deleted.

27 changes: 27 additions & 0 deletions share/id_rsa_drop.ceph.com
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA6H/ykb30TtYaK8DbaFH5gOHO1E5zs9M5rRNpx5oSC5K3qj7j
PmWJqFtL+kGxD19IqmYVzAun9auwwObIYtNqr/trD7G9I8W2MYYo/CmJlv/anoBE
R+fQxkcsPQ8TB3RHBFHR2NnJmOAn3dSt5BRdjzQCL3MMCENq7J2zmF1OcATAAjuK
kYvp/dunFqmn6GVDjgUWcd12Oz67dVlykjLDCF6cLqup0YM2dZ/mMAUQkGPJytpZ
4O9Pk9MdXy4LIvJEfQyRWf9fMXWmjEjn7xYFoMbQn+078Fxqv3z2pxB0DU2u94ur
ep4l7NATtuLoF0qrTYqxxmJi2PDhVMkpeaFQWQIDAQABAoI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VDXbPWsnh9EU893uQrLHLDJ5Xu1dcvKX8yvFDihwUrP6ycq9O
zopzAWu8Fdm0vFEyImwkPPhEJ5kSLQW8T3RJVKQpZ1tgz8sZRXoaTOI+u9w28REc
2/ABV6x6DknKI9qiQU4sM5hY5pweFtKDIwJFBqWtgFQR0NBoll7JHA==
-----END RSA PRIVATE KEY-----
1 change: 1 addition & 0 deletions share/id_rsa_drop.ceph.com.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDof/KRvfRO1horwNtoUfmA4c7UTnOz0zmtE2nHmhILkreqPuM+ZYmoW0v6QbEPX0iqZhXMC6f1q7DA5shi02qv+2sPsb0jxbYxhij8KYmW/9qegERH59DGRyw9DxMHdEcEUdHY2cmY4Cfd1K3kFF2PNAIvcwwIQ2rsnbOYXU5wBMACO4qRi+n926cWqafoZUOOBRZx3XY7Prt1WXKSMsMIXpwuq6nRgzZ1n+YwBRCQY8nK2lng70+T0x1fLgsi8kR9DJFZ/18xdaaMSOfvFgWgxtCf7TvwXGq/fPanEHQNTa73i6t6niXs0BO24ugXSqtNirHGYmLY8OFUySl5oVBZ public_ceph_post_key_2016-08-19
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,8 @@ install(PROGRAMS
RENAME ceph)

install(FILES
${CMAKE_SOURCE_DIR}/share/id_dsa_drop.ceph.com
${CMAKE_SOURCE_DIR}/share/id_dsa_drop.ceph.com.pub
${CMAKE_SOURCE_DIR}/share/id_rsa_drop.ceph.com
${CMAKE_SOURCE_DIR}/share/id_rsa_drop.ceph.com.pub
${CMAKE_SOURCE_DIR}/share/known_hosts_drop.ceph.com
DESTINATION ${CMAKE_INSTALL_DATADIR}/ceph)

Expand Down
10 changes: 5 additions & 5 deletions src/ceph-post-file.in
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash -e

# If these files exist, assume we are a source install.
if [[ -f ../share/known_hosts_drop.ceph.com && -f ../share/id_dsa_drop.ceph.com ]]
if [[ -f ../share/known_hosts_drop.ceph.com && -f ../share/id_rsa_drop.ceph.com ]]
then # running from source install
known_hosts=../share/known_hosts_drop.ceph.com
ssh_key=../share/id_dsa_drop.ceph.com
ssh_key=../share/id_rsa_drop.ceph.com
else # running from a pkg install
known_hosts=@datadir@/known_hosts_drop.ceph.com
ssh_key=@datadir@/id_dsa_drop.ceph.com
ssh_key=@datadir@/id_rsa_drop.ceph.com
fi

function usage() {
Expand Down Expand Up @@ -39,7 +39,7 @@ Options:
-k|--known_hosts <path> known_hosts file
[Default: /usr/share/ceph/known_hosts_drop.ceph.com]
-i <path> Ssh identity file
[Default: /usr/share/ceph/id_dsa_drop.ceph.com]
[Default: /usr/share/ceph/id_rsa_drop.ceph.com]
-h|--help Show this usage information
"
}
Expand Down Expand Up @@ -150,7 +150,7 @@ EOF
done

# no UserKnownHostsFile so that we don't try to record the IP hash key
# GLobalKnownHostsFile so that we are verifying that this is the real drop.ceph.com
# GlobalKnownHostsFile so that we are verifying that this is the real drop.ceph.com

cp "$ssh_key" "$t4"
cp "${ssh_key}.pub" "$t4.pub"
Expand Down

0 comments on commit ecd02bf

Please sign in to comment.