#include "AuthAuthorizeHandler.h"
#include "cephx/CephxAuthorizeHandler.h"
+#ifdef HAVE_GSSAPI
#include "krb/KrbAuthorizeHandler.hpp"
+#endif
#include "none/AuthNoneAuthorizeHandler.h"
AuthAuthorizeHandler *AuthAuthorizeHandlerRegistry::get_handler(int protocol)
case CEPH_AUTH_CEPHX:
m_authorizers[protocol] = new CephxAuthorizeHandler();
return m_authorizers[protocol];
-
+#ifdef HAVE_GSSAPI
case CEPH_AUTH_GSS:
m_authorizers[protocol] = new KrbAuthorizeHandler();
return m_authorizers[protocol];
+#endif
+ default:
+ return nullptr;
}
- return NULL;
}
AuthAuthorizeHandlerRegistry::~AuthAuthorizeHandlerRegistry()
#include "AuthClientHandler.h"
#include "cephx/CephxClientHandler.h"
+#ifdef HAVE_GSSAPI
#include "krb/KrbClientHandler.hpp"
+#endif
#include "none/AuthNoneClientHandler.h"
return new CephxClientHandler(cct, rkeys);
case CEPH_AUTH_NONE:
return new AuthNoneClientHandler{cct};
+#ifdef HAVE_GSSAPI
case CEPH_AUTH_GSS:
return new KrbClientHandler(cct);
+#endif
default:
return NULL;
}
#include "AuthServiceHandler.h"
#include "cephx/CephxServiceHandler.h"
+#ifdef HAVE_GSSAPI
#include "krb/KrbServiceHandler.hpp"
+#endif
#include "none/AuthNoneServiceHandler.h"
#define dout_subsys ceph_subsys_auth
return new CephxServiceHandler(cct, ks);
case CEPH_AUTH_NONE:
return new AuthNoneServiceHandler(cct);
+#ifdef HAVE_GSSAPI
case CEPH_AUTH_GSS:
return new KrbServiceHandler(cct, ks);
+#endif
+ default:
+ return nullptr;
}
- return NULL;
}
#include "common/debug.h"
#include "AuthSessionHandler.h"
#include "cephx/CephxSessionHandler.h"
+#ifdef HAVE_GSSAPI
#include "krb/KrbSessionHandler.hpp"
+#endif
#include "none/AuthNoneSessionHandler.h"
#include "unknown/AuthUnknownSessionHandler.h"
return new AuthNoneSessionHandler(cct, key);
case CEPH_AUTH_UNKNOWN:
return new AuthUnknownSessionHandler(cct, key);
+#ifdef HAVE_GSSAPI
case CEPH_AUTH_GSS:
return new KrbSessionHandler(cct, key);
+#endif
+ default:
+ return nullptr;
}
- return NULL;
}
cephx/CephxClientHandler.cc
cephx/CephxProtocol.cc
cephx/CephxSessionHandler.cc
- krb/KrbAuthorizeHandler.cpp
- krb/KrbClientHandler.cpp
- krb/KrbProtocol.cpp
- krb/KrbSessionHandler.hpp
none/AuthNoneAuthorizeHandler.cc
unknown/AuthUnknownAuthorizeHandler.cc)
+if(HAVE_GSSAPI)
+ list(APPEND auth_srcs
+ krb/KrbAuthorizeHandler.cpp
+ krb/KrbClientHandler.cpp
+ krb/KrbProtocol.cpp
+ krb/KrbSessionHandler.hpp)
+endif()
+
add_library(common-auth-objs OBJECT ${auth_srcs})
if(WITH_SEASTAR)
add_library(crimson-auth OBJECT ${auth_srcs})
/* define if cephfs enabled */
#cmakedefine WITH_CEPHFS
+/*define if GSSAPI/KRB5 enabled */
+#cmakedefine HAVE_GSSAPI
+
/* define if rbd enabled */
#cmakedefine WITH_RBD
${CMAKE_SOURCE_DIR}/src/auth/cephx/CephxKeyServer.cc
${CMAKE_SOURCE_DIR}/src/auth/cephx/CephxServiceHandler.cc
${CMAKE_SOURCE_DIR}/src/auth/AuthServiceHandler.cc
- ${CMAKE_SOURCE_DIR}/src/auth/krb/KrbServiceHandler.cpp
${osd_mon_files}
Paxos.cc
PaxosService.cc
../mds/MDSAuthCaps.cc
../mgr/mgr_commands.cc
../osd/OSDCap.cc)
+
+if(HAVE_GSSAPI)
+ list(APPEND lib_mon_srcs
+ ${CMAKE_SOURCE_DIR}/src/auth/krb/KrbServiceHandler.cpp)
+endif()
+
add_library(mon STATIC
${lib_mon_srcs}
$<TARGET_OBJECTS:kv_objs>)