/**
* @} //Authentication
*/
+
+ void ms_set_require_authorizer(bool b) {
+ require_authorizer = b;
+ }
protected:
CephContext *cct;
+public:
+ // allow unauthenticated connections. This is needed for
+ // compatibility with pre-nautilus OSDs, which do not authenticate
+ // the heartbeat sessions.
+ bool require_authorizer = true;
private:
explicit Dispatcher(const Dispatcher &rhs);
Dispatcher& operator=(const Dispatcher &rhs);
// If we have an authorizer, get a new AuthSessionHandler to deal with
// ongoing security of the connection. PLR
if (authorizer != NULL) {
+ ldout(cct, 10) << __func__ << " setting up session_security with auth "
+ << authorizer << dendl;
session_security.reset(get_auth_session_handler(
cct, authorizer->protocol, authorizer->session_key,
connection->get_features()));
} else {
// We have no authorizer, so we shouldn't be applying security to messages
// in this AsyncConnection. PLR
+ ldout(cct, 10) << __func__ << " no authorizer, clearing session_security"
+ << dendl;
session_security.reset();
}
}
connection->lock.unlock();
-
+ ldout(cct,10) << __func__ << " authorizor_protocol "
+ << connect_msg.authorizer_protocol
+ << " len " << authorizer_buf.length()
+ << dendl;
bool authorizer_valid;
bool need_challenge = HAVE_FEATURE(connect_msg.features, CEPHX_V2);
bool had_challenge = (bool)authorizer_challenge;
}
if (exproto->state == CLOSED) {
- ldout(cct, 1) << __func__ << " existing already closed." << dendl;
+ ldout(cct, 1) << __func__ << " existing " << existing
+ << " already closed." << dendl;
existing->lock.unlock();
existing = nullptr;
connection->set_features((uint64_t)reply.features &
(uint64_t)connect_msg.features);
ldout(cct, 10) << __func__ << " accept features "
- << connection->get_features() << dendl;
+ << connection->get_features()
+ << " authorizer_protocol "
+ << connect_msg.authorizer_protocol << dendl;
session_security.reset(
get_auth_session_handler(cct, connect_msg.authorizer_protocol,
}
CtPtr ProtocolV1::server_ready() {
- ldout(cct, 20) << __func__ << dendl;
+ ldout(cct, 20) << __func__ << " session_security is "
+ << session_security
+ << dendl;
ldout(cct, 20) << __func__ << " accept done" << dendl;
memset(&connect_msg, 0, sizeof(connect_msg));