You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Vinod Kone (Created) (JIRA)" <ji...@apache.org> on 2011/11/01 19:19:34 UTC

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

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


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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Vinod Kone (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MESOS-54?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13141632#comment-13141632 ] 

Vinod Kone commented on MESOS-54:
---------------------------------

fixed and attached the patch here..
                
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Vinod Kone (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MESOS-54?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vinod Kone updated MESOS-54:
----------------------------

    Attachment: 0001-Detector-Auth-fix.patch
    
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira