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

Isabel Jimenez commented on MESOS-3560:
---------------------------------------

[~mcypark] When decoding the JSON credential file into the Credential protobuf 
object, the 'secret' which is in 'bytes' is mapped into base64 string 
automatically by protobuf from JSON (e.g proto3 and same in proto2 
https://developers.google.com/protocol-buffers/docs/proto3#json)
Which would be preferable, changing the protobuf definition so 'secret' can be 
a string? I don't really see why this is 'bytes'.
Or try to find a hack for this to work? my assumption is that since 'secret' is 
bytes, when decoding JSON, protobuf is expecting base64 and anything else will 
not be properly processed for us to just simply do the necessary base64 
decodes/encodes in the code. Thoughts?



> 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)

Reply via email to