You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Michael Park (JIRA)" <ji...@apache.org> on 2015/10/03 00:17:26 UTC

[jira] [Comment Edited] (MESOS-3560) JSON-based credential files do not work correctly

    [ https://issues.apache.org/jira/browse/MESOS-3560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14941870#comment-14941870 ] 

Michael Park edited comment on MESOS-3560 at 10/2/15 10:16 PM:
---------------------------------------------------------------

[~bmahler] Looking back in git history, it looks like it was introduced in [this commit|https://github.com/apache/mesos/commit/616973da105f70f93cd04fe97c0477fac0950fda].  while SASL was being added. From what I can see, it seems like changing {{secret}} to {{string}} would be fine. But I need to do some digging to make sure the fact that {{bytes}} is a {{ByteString}} whereas {{string}} is {{String}} in Java doesn't affect any communication with {{SASL}} and such.

I'm happy to take the approach of doing the research on compatibility then changing {{bytes}} to {{string}}.


was (Author: mcypark):
[~bmahler] Looking back in git history, it looks like it was introduced in this commit while SASL was being added in [this commit|https://github.com/apache/mesos/commit/616973da105f70f93cd04fe97c0477fac0950fda]. From what I can see, it seems like changing {{secret}} to {{string}} would be fine. But I need to do some digging to make sure the fact that {{bytes}} is a {{ByteString}} whereas {{string}} is {{String}} in Java doesn't affect any communication with {{SASL}} and such.

I'm happy to take the approach of doing the research on compatibility then changing {{bytes}} to {{string}}.

> JSON-based credential files do not work correctly
> -------------------------------------------------
>
>                 Key: MESOS-3560
>                 URL: https://issues.apache.org/jira/browse/MESOS-3560
>             Project: Mesos
>          Issue Type: Bug
>          Components: master
>            Reporter: Michael Park
>            Assignee: Isabel Jimenez
>              Labels: mesosphere
>             Fix For: 0.20.0, 0.21.0, 0.22.0, 0.23.0, 0.24.0
>
>
> Specifying the following credentials file:
> {code}
> {
>   “credentials”: [
>     {
>       “principal”: “user”,
>       “secret”: “password”
>     }
>   ]
> }
> {code}
> Then hitting a master endpoint with:
> {code}
> curl -i -u “user:password” ...
> {code}
> Does not work. This is contrary to the text-based credentials file which works:
> {code}
> user password
> {code}
> Currently, the password in a JSON-based credentials file needs to be base64-encoded in order for it to work:
> {code}
> {
>   “credentials”: [
>     {
>       “principal”: “user”,
>       “secret”: “cGFzc3dvcmQ=”
>     }
>   ]
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)