Till Toenshoff created MESOS-1891: ------------------------------------- Summary: Authenticator Module: Interface design Key: MESOS-1891 URL: https://issues.apache.org/jira/browse/MESOS-1891 Project: Mesos Issue Type: Improvement Components: modules Reporter: Till Toenshoff Assignee: Till Toenshoff Priority: Blocker
The current sasl based, "flat-file" Authenticator ( {{sasl/authenticator.hpp}} ) is spawning a (libprocess) process in its constructor and demands the authentication client process UPID as a parameter - not a perfect fit for the current Module API as that one does only allow default constructors. Instead of wrapping the flat-file Authenticator with yet another class that satisfies a proper interface design, we might just as well slightly change the current design into a feasible interface, no? I would like to propose something like this: {noformat} class Authenticator { public: Authenticator() {} virtual ~Authenticator() {} virtual void initialize(const process::UPID& clientPid) = 0; virtual process::Future<Option<std::string> > authenticate(void) = 0; }; {noformat} As a result, the flat-file authenticator would spawn its process within that proposed initialize method and not within the constructor already. -- This message was sent by Atlassian JIRA (v6.3.4#6332)