]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
auth,msg/async/ProtocolV2: negotiate connection modes
authorSage Weil <sage@redhat.com>
Tue, 22 Jan 2019 22:59:22 +0000 (16:59 -0600)
committerSage Weil <sage@redhat.com>
Thu, 7 Feb 2019 18:10:33 +0000 (12:10 -0600)
commitc7ee66c3e54b276b219a0ef26e2475bde8a0fc8b
treebe43c3f3a249e06d03bcfcfc9fb8ebba005b46e5
parent9c3dd336b76ddce483c6791ab6508844cf47d6c3
auth,msg/async/ProtocolV2: negotiate connection modes

The modes are:

- crc: crc32c checksums to protect against bit errors.  No secrecy or
  authenticity guarantees, so a MITM could alter traffic in flight.
- secure: cryptographic secrecy and authenticity proection (i.e, encrypted
  and signed).

We do not include a 'signed' mode that provides authenticity without
secrecy because the cryptographic protocols appear to be faster than
SHA-2.

New settings:

- ms_cluster_mode  : mode(s list) for intra-cluster connections
- ms_service_mode  : mode(s list) for daemons to allow
- ms_client_mode   : mode(s list) for clients to allow

Also,

- ms_mon_cluster_mode  : mon <-> mon connections
- ms_mon_service_mode  : mon <-> daemon or client connections

The msgr2 protocol is expanded slightly to negotiate a mode.  Client
shares it's allowed/preferred modes, and server picks one as auth finishes.
Negotiation is independent of the authentication, except that the
authentiction mode may precluse certain choices. Specifically, AUTH_NONE
does not support 'secure', only 'crc'.

Signed-off-by: Sage Weil <sage@redhat.com>
14 files changed:
doc/dev/msgr2.rst
src/auth/Auth.h
src/auth/AuthClient.h
src/auth/AuthRegistry.cc
src/auth/AuthRegistry.h
src/auth/AuthServer.h
src/common/options.cc
src/include/ceph_fs.h
src/mon/MonClient.cc
src/mon/MonClient.h
src/mon/Monitor.cc
src/mon/Monitor.h
src/msg/async/ProtocolV2.cc
src/msg/async/ProtocolV2.h