1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2004-2009 Sage Weil <sage@newdream.net>
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
15 #ifndef CEPH_CEPHXSERVICEHANDLER_H
16 #define CEPH_CEPHXSERVICEHANDLER_H
18 #include "auth/AuthServiceHandler.h"
19 #include "auth/Auth.h"
23 class CephxServiceHandler
: public AuthServiceHandler
{
24 KeyServer
*key_server
;
25 uint64_t server_challenge
;
28 CephxServiceHandler(CephContext
*cct_
, KeyServer
*ks
)
29 : AuthServiceHandler(cct_
), key_server(ks
), server_challenge(0) {}
30 ~CephxServiceHandler() override
{}
32 int start_session(const EntityName
& name
,
33 size_t connection_secret_required_length
,
34 bufferlist
*result_bl
,
36 CryptoKey
*session_key
,
37 std::string
*connection_secret
) override
;
39 bufferlist::const_iterator
& indata
,
40 size_t connection_secret_required_length
,
41 bufferlist
*result_bl
,
44 CryptoKey
*session_key
,
45 std::string
*connection_secret
) override
;
47 void build_cephx_response_header(int request_type
, int status
, bufferlist
& bl
);