You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by nn...@apache.org on 2015/02/10 19:22:42 UTC
[8/9] mesos git commit: Out of tree build 8: Exposed authentication
headers.
Out of tree build 8: Exposed authentication headers.
This allows authentication modules to be built outside the mesos
source tree.
Review: https://reviews.apache.org/r/29606
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/dd3870c6
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/dd3870c6
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/dd3870c6
Branch: refs/heads/master
Commit: dd3870c65195e320d584d2f766407d3466d95347
Parents: 4ca1b1b
Author: Kapil Arya <ka...@mesosphere.io>
Authored: Tue Feb 10 09:56:02 2015 -0800
Committer: Niklas Q. Nielsen <ni...@mesosphere.io>
Committed: Tue Feb 10 09:56:02 2015 -0800
----------------------------------------------------------------------
include/mesos/authentication/authenticatee.hpp | 56 ++++++++++++++++++
include/mesos/authentication/authenticator.hpp | 58 +++++++++++++++++++
include/mesos/module/authenticatee.hpp | 64 +++++++++++++++++++++
include/mesos/module/authenticator.hpp | 64 +++++++++++++++++++++
src/Makefile.am | 10 ++--
src/authentication/authenticatee.hpp | 58 -------------------
src/authentication/authenticator.hpp | 57 ------------------
src/authentication/cram_md5/authenticatee.hpp | 3 +-
src/authentication/cram_md5/authenticator.hpp | 4 +-
src/examples/test_authentication_modules.cpp | 10 ++--
src/master/master.cpp | 6 +-
src/master/master.hpp | 3 +-
src/module/authenticatee.hpp | 64 ---------------------
src/module/authenticator.hpp | 64 ---------------------
src/sched/sched.cpp | 6 +-
src/scheduler/scheduler.cpp | 5 +-
src/slave/slave.cpp | 3 +-
src/slave/slave.hpp | 4 +-
src/tests/cram_md5_authentication_tests.cpp | 12 ++--
19 files changed, 280 insertions(+), 271 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/include/mesos/authentication/authenticatee.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/authentication/authenticatee.hpp b/include/mesos/authentication/authenticatee.hpp
new file mode 100644
index 0000000..17fb7aa
--- /dev/null
+++ b/include/mesos/authentication/authenticatee.hpp
@@ -0,0 +1,56 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MESOS_AUTHENTICATION_AUTHENTICATEE_HPP__
+#define __MESOS_AUTHENTICATION_AUTHENTICATEE_HPP__
+
+#include <mesos/mesos.hpp>
+
+#include <mesos/authentication/authentication.hpp>
+
+#include <process/future.hpp>
+#include <process/pid.hpp>
+
+namespace mesos {
+
+class Authenticatee
+{
+public:
+ Authenticatee() {}
+
+ virtual ~Authenticatee() {}
+
+ // 'pid' is the process to authenticate against (master).
+ // 'client' is the process to be authenticated (slave / framework).
+ // 'credential' is used to authenticate the 'client'.
+ // Returns true if successfully authenticated otherwise false or an
+ // error. Note that we distinguish authentication failure (false)
+ // from a failed future in the event the future failed due to a
+ // transient error and authentication can (should) be
+ // retried. Discarding the future will cause the future to fail if
+ // it hasn't already completed since we have already started the
+ // authentication procedure and can't reliably cancel.
+ virtual process::Future<bool> authenticate(
+ const process::UPID& pid,
+ const process::UPID& client,
+ const mesos::Credential& credential) = 0;
+};
+
+} // namespace mesos {
+
+#endif // __MESOS_AUTHENTICATION_AUTHENTICATEE_HPP__
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/include/mesos/authentication/authenticator.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/authentication/authenticator.hpp b/include/mesos/authentication/authenticator.hpp
new file mode 100644
index 0000000..f66217a
--- /dev/null
+++ b/include/mesos/authentication/authenticator.hpp
@@ -0,0 +1,58 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MESOS_AUTHENTICATION_AUTHENTICATOR_HPP__
+#define __MESOS_AUTHENTICATION_AUTHENTICATOR_HPP__
+
+#include <string>
+
+#include <mesos/mesos.hpp>
+
+#include <mesos/authentication/authentication.hpp>
+
+#include <process/future.hpp>
+#include <process/pid.hpp>
+
+#include <stout/option.hpp>
+
+namespace mesos {
+
+// Note that this interface definition is not hardened yet and will
+// slightly change within the next release. See MESOS-2050.
+class Authenticator
+{
+public:
+ Authenticator() {}
+ virtual ~Authenticator() {}
+
+ virtual void initialize(const process::UPID& clientPid) = 0;
+
+ // Returns the principal of the Authenticatee if successfully
+ // authenticated otherwise None or an error. Note that we
+ // distinguish authentication failure (None) from a failed future
+ // in the event the future failed due to a transient error and
+ // authentication can (should) be retried. Discarding the future
+ // will cause the future to fail if it hasn't already completed
+ // since we have already started the authentication procedure and
+ // can't reliably cancel.
+ virtual process::Future<Option<std::string>> authenticate(void) = 0;
+};
+
+} // namespace mesos {
+
+#endif // __MESOS_AUTHENTICATION_AUTHENTICATOR_HPP__
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/include/mesos/module/authenticatee.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/module/authenticatee.hpp b/include/mesos/module/authenticatee.hpp
new file mode 100644
index 0000000..94de988
--- /dev/null
+++ b/include/mesos/module/authenticatee.hpp
@@ -0,0 +1,64 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MESOS_MODULE_AUTHENTICATEE_HPP__
+#define __MESOS_MODULE_AUTHENTICATEE_HPP__
+
+#include <mesos/module.hpp>
+
+#include <mesos/authentication/authenticatee.hpp>
+
+namespace mesos {
+namespace modules {
+
+template<>
+inline const char* kind<mesos::Authenticatee>()
+{
+ return "Authenticatee";
+}
+
+
+template <>
+struct Module<mesos::Authenticatee> : ModuleBase
+{
+ Module(
+ const char* _moduleApiVersion,
+ const char* _mesosVersion,
+ const char* _authorName,
+ const char* _authorEmail,
+ const char* _description,
+ bool (*_compatible)(),
+ mesos::Authenticatee* (*_create)(const Parameters& parameters))
+ : ModuleBase(
+ _moduleApiVersion,
+ _mesosVersion,
+ mesos::modules::kind<mesos::Authenticatee>(),
+ _authorName,
+ _authorEmail,
+ _description,
+ _compatible),
+ create(_create)
+ { }
+
+ mesos::Authenticatee* (*create)(const Parameters& parameters);
+};
+
+} // namespace modules {
+} // namespace mesos {
+
+#endif // __MESOS_MODULE_AUTHENTICATEE_HPP__
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/include/mesos/module/authenticator.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/module/authenticator.hpp b/include/mesos/module/authenticator.hpp
new file mode 100644
index 0000000..6a83f17
--- /dev/null
+++ b/include/mesos/module/authenticator.hpp
@@ -0,0 +1,64 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MESOS_MODULE_AUTHENTICATOR_HPP__
+#define __MESOS_MODULE_AUTHENTICATOR_HPP__
+
+#include <mesos/module.hpp>
+
+#include <mesos/authentication/authenticator.hpp>
+
+namespace mesos {
+namespace modules {
+
+template<>
+inline const char* kind<mesos::Authenticator>()
+{
+ return "Authenticator";
+}
+
+
+template <>
+struct Module<mesos::Authenticator> : ModuleBase
+{
+ Module(
+ const char* _moduleApiVersion,
+ const char* _mesosVersion,
+ const char* _authorName,
+ const char* _authorEmail,
+ const char* _description,
+ bool (*_compatible)(),
+ mesos::Authenticator* (*_create)(const Parameters& parameters))
+ : ModuleBase(
+ _moduleApiVersion,
+ _mesosVersion,
+ mesos::modules::kind<mesos::Authenticator>(),
+ _authorName,
+ _authorEmail,
+ _description,
+ _compatible),
+ create(_create)
+ { }
+
+ mesos::Authenticator* (*create)(const Parameters& parameters);
+};
+
+} // namespace modules {
+} // namespace mesos {
+
+#endif // __MESOS_MODULE_AUTHENTICATOR_HPP__
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index a225321..7e40388 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -370,8 +370,10 @@ nodist_pkginclude_HEADERS = \
authenticationdir = $(pkgincludedir)/authentication
authentication_HEADERS = \
+ $(top_srcdir)/include/mesos/authentication/authenticatee.hpp \
$(top_srcdir)/include/mesos/authentication/authentication.hpp \
- $(top_srcdir)/include/mesos/authentication/authentication.proto
+ $(top_srcdir)/include/mesos/authentication/authentication.proto \
+ $(top_srcdir)/include/mesos/authentication/authenticator.hpp
nodist_authentication_HEADERS = ../include/mesos/authentication/authentication.pb.h
@@ -394,6 +396,8 @@ nodist_fetcher_HEADERS = ../include/mesos/fetcher/fetcher.pb.h
moduledir = $(pkgincludedir)/module
module_HEADERS = \
+ $(top_srcdir)/include/mesos/module/authenticatee.hpp \
+ $(top_srcdir)/include/mesos/module/authenticator.hpp \
$(top_srcdir)/include/mesos/module/isolator.hpp \
$(top_srcdir)/include/mesos/module/module.hpp \
$(top_srcdir)/include/mesos/module/module.proto
@@ -465,8 +469,6 @@ if WITH_NETWORK_ISOLATOR
endif
libmesos_no_3rdparty_la_SOURCES += \
- authentication/authenticatee.hpp \
- authentication/authenticator.hpp \
authentication/cram_md5/authenticatee.hpp \
authentication/cram_md5/authenticator.hpp \
authentication/cram_md5/auxprop.hpp \
@@ -510,8 +512,6 @@ libmesos_no_3rdparty_la_SOURCES += \
master/sorter.hpp \
master/validation.hpp \
messages/messages.hpp \
- module/authenticatee.hpp \
- module/authenticator.hpp \
module/hook.hpp \
module/manager.hpp \
sched/constants.hpp \
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/src/authentication/authenticatee.hpp
----------------------------------------------------------------------
diff --git a/src/authentication/authenticatee.hpp b/src/authentication/authenticatee.hpp
deleted file mode 100644
index ba90b3b..0000000
--- a/src/authentication/authenticatee.hpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __AUTHENTICATEE_HPP__
-#define __AUTHENTICATEE_HPP__
-
-#include <mesos/mesos.hpp>
-
-#include <mesos/authentication/authentication.hpp>
-
-#include <process/future.hpp>
-
-#include <stout/nothing.hpp>
-#include <stout/try.hpp>
-
-namespace mesos {
-
-class Authenticatee
-{
-public:
- Authenticatee() {}
-
- virtual ~Authenticatee() {}
-
- // 'pid' is the process to authenticate against (master).
- // 'client' is the process to be authenticated (slave / framework).
- // 'credential' is used to authenticate the 'client'.
- // Returns true if successfully authenticated otherwise false or an
- // error. Note that we distinguish authentication failure (false)
- // from a failed future in the event the future failed due to a
- // transient error and authentication can (should) be
- // retried. Discarding the future will cause the future to fail if
- // it hasn't already completed since we have already started the
- // authentication procedure and can't reliably cancel.
- virtual process::Future<bool> authenticate(
- const process::UPID& pid,
- const process::UPID& client,
- const mesos::Credential& credential) = 0;
-};
-
-} // namespace mesos {
-
-#endif // __AUTHENTICATEE_HPP__
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/src/authentication/authenticator.hpp
----------------------------------------------------------------------
diff --git a/src/authentication/authenticator.hpp b/src/authentication/authenticator.hpp
deleted file mode 100644
index 5b1375f..0000000
--- a/src/authentication/authenticator.hpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __AUTHENTICATOR_HPP__
-#define __AUTHENTICATOR_HPP__
-
-#include <mesos/mesos.hpp>
-
-#include <mesos/authentication/authentication.hpp>
-
-#include <process/future.hpp>
-#include <process/pid.hpp>
-
-#include <stout/nothing.hpp>
-#include <stout/try.hpp>
-
-namespace mesos {
-
-// Note that this interface definition is not hardened yet and will
-// slightly change within the next release. See MESOS-2050.
-class Authenticator
-{
-public:
- Authenticator() {}
- virtual ~Authenticator() {}
-
- virtual void initialize(const process::UPID& clientPid) = 0;
-
- // Returns the principal of the Authenticatee if successfully
- // authenticated otherwise None or an error. Note that we
- // distinguish authentication failure (None) from a failed future
- // in the event the future failed due to a transient error and
- // authentication can (should) be retried. Discarding the future
- // will cause the future to fail if it hasn't already completed
- // since we have already started the authentication procedure and
- // can't reliably cancel.
- virtual process::Future<Option<std::string>> authenticate(void) = 0;
-};
-
-} // namespace mesos {
-
-#endif // __AUTHENTICATOR_HPP__
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/src/authentication/cram_md5/authenticatee.hpp
----------------------------------------------------------------------
diff --git a/src/authentication/cram_md5/authenticatee.hpp b/src/authentication/cram_md5/authenticatee.hpp
index 70e1509..3311916 100644
--- a/src/authentication/cram_md5/authenticatee.hpp
+++ b/src/authentication/cram_md5/authenticatee.hpp
@@ -27,6 +27,8 @@
#include <mesos/mesos.hpp>
+#include <mesos/module/authenticatee.hpp>
+
#include <process/defer.hpp>
#include <process/future.hpp>
#include <process/id.hpp>
@@ -36,7 +38,6 @@
#include <stout/strings.hpp>
-#include "authentication/authenticatee.hpp"
#include "messages/messages.hpp"
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/src/authentication/cram_md5/authenticator.hpp
----------------------------------------------------------------------
diff --git a/src/authentication/cram_md5/authenticator.hpp b/src/authentication/cram_md5/authenticator.hpp
index fa34f76..7578ea1 100644
--- a/src/authentication/cram_md5/authenticator.hpp
+++ b/src/authentication/cram_md5/authenticator.hpp
@@ -27,6 +27,8 @@
#include <mesos/mesos.hpp>
+#include <mesos/module/authenticator.hpp>
+
#include <process/defer.hpp>
#include <process/future.hpp>
#include <process/id.hpp>
@@ -36,8 +38,6 @@
#include <stout/check.hpp>
-#include "authentication/authenticator.hpp"
-
#include "authentication/cram_md5/auxprop.hpp"
#include "messages/messages.hpp"
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/src/examples/test_authentication_modules.cpp
----------------------------------------------------------------------
diff --git a/src/examples/test_authentication_modules.cpp b/src/examples/test_authentication_modules.cpp
index fd59fe4..5ff58d2 100644
--- a/src/examples/test_authentication_modules.cpp
+++ b/src/examples/test_authentication_modules.cpp
@@ -19,15 +19,15 @@
#include <mesos/mesos.hpp>
#include <mesos/module.hpp>
-#include "authentication/authenticatee.hpp"
-#include "authentication/authenticator.hpp"
+#include <mesos/authentication/authenticatee.hpp>
+#include <mesos/authentication/authenticator.hpp>
+
+#include <mesos/module/authenticatee.hpp>
+#include <mesos/module/authenticator.hpp>
#include "authentication/cram_md5/authenticatee.hpp"
#include "authentication/cram_md5/authenticator.hpp"
-#include "module/authenticatee.hpp"
-#include "module/authenticator.hpp"
-
using namespace mesos;
using mesos::Authenticatee;
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 68bd6f5..6affd24 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -27,6 +27,10 @@
#include <mesos/module.hpp>
+#include <mesos/authentication/authenticator.hpp>
+
+#include <mesos/module/authenticator.hpp>
+
#include <process/check.hpp>
#include <process/collect.hpp>
#include <process/defer.hpp>
@@ -53,7 +57,6 @@
#include <stout/utils.hpp>
#include <stout/uuid.hpp>
-#include "authentication/authenticator.hpp"
#include "authentication/cram_md5/authenticator.hpp"
#include "authorizer/authorizer.hpp"
@@ -74,7 +77,6 @@
#include "master/flags.hpp"
#include "master/master.hpp"
-#include "module/authenticator.hpp"
#include "module/manager.hpp"
#include "watcher/whitelist_watcher.hpp"
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/src/master/master.hpp
----------------------------------------------------------------------
diff --git a/src/master/master.hpp b/src/master/master.hpp
index 4f934c0..9433b0c 100644
--- a/src/master/master.hpp
+++ b/src/master/master.hpp
@@ -32,6 +32,8 @@
#include <mesos/scheduler.hpp>
#include <mesos/type_utils.hpp>
+#include <mesos/module/authenticator.hpp>
+
#include <process/http.hpp>
#include <process/owned.hpp>
#include <process/process.hpp>
@@ -71,7 +73,6 @@ namespace registry {
class Slaves;
}
-class Authenticator;
class Authorizer;
class WhitelistWatcher;
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/src/module/authenticatee.hpp
----------------------------------------------------------------------
diff --git a/src/module/authenticatee.hpp b/src/module/authenticatee.hpp
deleted file mode 100644
index a53016a..0000000
--- a/src/module/authenticatee.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __MODULE_AUTHENTICATEE_HPP__
-#define __MODULE_AUTHENTICATEE_HPP__
-
-#include <mesos/module.hpp>
-
-#include "authentication/authenticatee.hpp"
-
-namespace mesos {
-namespace modules {
-
-template<>
-inline const char* kind<mesos::Authenticatee>()
-{
- return "Authenticatee";
-}
-
-
-template <>
-struct Module<mesos::Authenticatee> : ModuleBase
-{
- Module(
- const char* _moduleApiVersion,
- const char* _mesosVersion,
- const char* _authorName,
- const char* _authorEmail,
- const char* _description,
- bool (*_compatible)(),
- mesos::Authenticatee* (*_create)(const Parameters& parameters))
- : ModuleBase(
- _moduleApiVersion,
- _mesosVersion,
- mesos::modules::kind<mesos::Authenticatee>(),
- _authorName,
- _authorEmail,
- _description,
- _compatible),
- create(_create)
- { }
-
- mesos::Authenticatee* (*create)(const Parameters& parameters);
-};
-
-} // namespace modules {
-} // namespace mesos {
-
-#endif // __MODULE_AUTHENTICATEE_HPP__
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/src/module/authenticator.hpp
----------------------------------------------------------------------
diff --git a/src/module/authenticator.hpp b/src/module/authenticator.hpp
deleted file mode 100644
index 156617b..0000000
--- a/src/module/authenticator.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __MODULE_AUTHENTICATOR_HPP__
-#define __MODULE_AUTHENTICATOR_HPP__
-
-#include <mesos/module.hpp>
-
-#include "authentication/authenticator.hpp"
-
-namespace mesos {
-namespace modules {
-
-template<>
-inline const char* kind<mesos::Authenticator>()
-{
- return "Authenticator";
-}
-
-
-template <>
-struct Module<mesos::Authenticator> : ModuleBase
-{
- Module(
- const char* _moduleApiVersion,
- const char* _mesosVersion,
- const char* _authorName,
- const char* _authorEmail,
- const char* _description,
- bool (*_compatible)(),
- mesos::Authenticator* (*_create)(const Parameters& parameters))
- : ModuleBase(
- _moduleApiVersion,
- _mesosVersion,
- mesos::modules::kind<mesos::Authenticator>(),
- _authorName,
- _authorEmail,
- _description,
- _compatible),
- create(_create)
- { }
-
- mesos::Authenticator* (*create)(const Parameters& parameters);
-};
-
-} // namespace modules {
-} // namespace mesos {
-
-#endif // __MODULE_AUTHENTICATOR_HPP__
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/src/sched/sched.cpp
----------------------------------------------------------------------
diff --git a/src/sched/sched.cpp b/src/sched/sched.cpp
index 03d1d13..ea7e447 100644
--- a/src/sched/sched.cpp
+++ b/src/sched/sched.cpp
@@ -35,6 +35,10 @@
#include <mesos/scheduler.hpp>
#include <mesos/type_utils.hpp>
+#include <mesos/authentication/authenticatee.hpp>
+
+#include <mesos/module/authenticatee.hpp>
+
#include <mesos/scheduler/scheduler.hpp>
#include <process/defer.hpp>
@@ -63,7 +67,6 @@
#include <stout/utils.hpp>
#include <stout/uuid.hpp>
-#include "authentication/authenticatee.hpp"
#include "authentication/cram_md5/authenticatee.hpp"
#include "common/lock.hpp"
@@ -78,7 +81,6 @@
#include "messages/messages.hpp"
-#include "module/authenticatee.hpp"
#include "module/manager.hpp"
#include "sched/constants.hpp"
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/src/scheduler/scheduler.cpp
----------------------------------------------------------------------
diff --git a/src/scheduler/scheduler.cpp b/src/scheduler/scheduler.cpp
index d4eb195..5816569 100644
--- a/src/scheduler/scheduler.cpp
+++ b/src/scheduler/scheduler.cpp
@@ -33,6 +33,10 @@
#include <mesos/scheduler.hpp>
#include <mesos/type_utils.hpp>
+#include <mesos/authentication/authenticatee.hpp>
+
+#include <mesos/module/authenticatee.hpp>
+
#include <process/async.hpp>
#include <process/defer.hpp>
#include <process/delay.hpp>
@@ -54,7 +58,6 @@
#include <stout/os.hpp>
#include <stout/uuid.hpp>
-#include "authentication/authenticatee.hpp"
#include "authentication/cram_md5/authenticatee.hpp"
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index d18ac27..3eace81 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -31,6 +31,8 @@
#include <mesos/type_utils.hpp>
+#include <mesos/module/authenticatee.hpp>
+
#include <process/async.hpp>
#include <process/check.hpp>
#include <process/defer.hpp>
@@ -74,7 +76,6 @@
#include "logging/logging.hpp"
-#include "module/authenticatee.hpp"
#include "module/manager.hpp"
#include "slave/constants.hpp"
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/src/slave/slave.hpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.hpp b/src/slave/slave.hpp
index abe4140..93fa4b5 100644
--- a/src/slave/slave.hpp
+++ b/src/slave/slave.hpp
@@ -30,6 +30,8 @@
#include <mesos/resources.hpp>
#include <mesos/type_utils.hpp>
+#include <mesos/module/authenticatee.hpp>
+
#include <process/http.hpp>
#include <process/future.hpp>
#include <process/owned.hpp>
@@ -67,8 +69,6 @@ namespace mesos {
class MasterDetector; // Forward declaration.
-class Authenticatee;
-
namespace slave {
using namespace process;
http://git-wip-us.apache.org/repos/asf/mesos/blob/dd3870c6/src/tests/cram_md5_authentication_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cram_md5_authentication_tests.cpp b/src/tests/cram_md5_authentication_tests.cpp
index 8b50413..dd102dc 100644
--- a/src/tests/cram_md5_authentication_tests.cpp
+++ b/src/tests/cram_md5_authentication_tests.cpp
@@ -18,6 +18,12 @@
#include <string>
+#include <mesos/authentication/authenticatee.hpp>
+#include <mesos/authentication/authenticator.hpp>
+
+#include <mesos/module/authenticatee.hpp>
+#include <mesos/module/authenticator.hpp>
+
#include <process/gmock.hpp>
#include <process/gtest.hpp>
#include <process/pid.hpp>
@@ -25,15 +31,9 @@
#include <stout/gtest.hpp>
-#include "authentication/authenticatee.hpp"
-#include "authentication/authenticator.hpp"
-
#include "authentication/cram_md5/authenticatee.hpp"
#include "authentication/cram_md5/authenticator.hpp"
-#include "module/authenticatee.hpp"
-#include "module/authenticator.hpp"
-
#include "tests/mesos.hpp"
#include "tests/module.hpp"