]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson: add AuthService
authorKefu Chai <kchai@redhat.com>
Tue, 5 Mar 2019 04:05:31 +0000 (12:05 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 20 Mar 2019 03:36:07 +0000 (11:36 +0800)
commit4ca5138f77cc248bd78b3bb673dbca3fe4b7d830
tree23377b875c3dfd8b9661a041f8c81ed8eab4b0ac
parent6596ecd1099cd8e81f2fd60a62d005ac659b97cb
crimson: add AuthService

AuthService is introduced to allow Dispatchers to access to
authorizers, even if it is not chained with a Dispatcher implementing
Dispatcher::ms_get_authorizer(). in this case, we need to grant access to
Heartbeat class. it has its own messengers dedicated for heartbeat
traffic. it's mon::Client which provides the facilities of authorization
via Dispatcher interface.

we could just cast mon::Client to ceph::common::Dispatch for accessing
Dispatcher::ms_get_authorizer(), but i want to make this explicit using
AuthService. as the consumers of Dispatch inteface is messenger and
ChainedDispatcher not the domain specific classes.

in future, we need to either implement Auth{Client,Server} or adapt to
this machinery for msgr V2.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/common/auth_service.h [new file with mode: 0644]
src/crimson/mon/MonClient.cc
src/crimson/mon/MonClient.h
src/crimson/osd/heartbeat.cc
src/crimson/osd/heartbeat.h