You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Benjamin Mahler (JIRA)" <ji...@apache.org> on 2012/12/13 02:03:21 UTC

[jira] [Resolved] (MESOS-54) Mesos ZooKeeper authentication is broken

     [ https://issues.apache.org/jira/browse/MESOS-54?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Mahler resolved MESOS-54.
----------------------------------

    Resolution: Fixed

Appears to be fixed in trunk, Vinod please correct me if mistaken.
                
> Mesos ZooKeeper authentication is broken
> ----------------------------------------
>
>                 Key: MESOS-54
>                 URL: https://issues.apache.org/jira/browse/MESOS-54
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Vinod Kone
>         Attachments: 0001-Detector-Auth-fix.patch
>
>
> In src/zookeeper/zookeeper.cpp
> authenticate() takes (scheme,credentials) as arguments, but this function is called with (username,password). this results in the client trying to authenticate with szk with scheme 'username' and failing.
> Relevant code snippets.
> :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
> int ZooKeeper::authenticate(const string& username, const string& password)
> { #ifndef USE_THREADED_ZOOKEEPER return process::call(impl->self(), &ZooKeeperImpl::authenticate, cref(username), cref(password)); #else Promise<int> promise = impl->authenticate(username, password); return promise.future().get(); #endif // USE_THREADED_ZOOKEEPER }
> :::::::::::::::::::::::::::::::
> Promise<int> authenticate(const string& scheme, const string& credentials)
> {
> Promise<int> promise;
> tuple<Promise<int> >* args = new tuple<Promise<int> >(promise);
> int ret = zoo_add_auth(zh, scheme.c_str(), credentials.data(),
> credentials.size(), voidCompletion, args);
> if (ret != ZOK) { promise.set(ret); delete args; }
> return promise;
> }
> :::::::::::::::::::::::::::::::

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira