Authenticating to model on shared controller

Tim Van Steenburgh tim.van.steenburgh at canonical.com
Sat Nov 5 22:07:30 UTC 2016


Can anyone tell me how the macaroons in ~/.go-cookies are encoded? If I try
to
deserialize the 'Value' value directly (using libmacaroons), I get an
'invalid macaroon'
error. I also tried base64-decoding the value first, and that didn't work
either.

My plan is to grab macaroons out of ~/.go-cookies, reserialize them to
json, and
ship them along with my Login request to the api. If that is a dumb plan
and I just
don't know it yet, please enlighten me. :)

On Fri, Nov 4, 2016 at 12:54 PM, Uros Jovanovic <
uros.jovanovic at canonical.com> wrote:

> Through Identity manager and SSO with macaroons. You'll have them in
> ~/.go-cookies and ~/.local/share/juju/usso-store-token (or something like
> that).
>
> Feel free to ask in #jaas
>
> On Fri, Nov 4, 2016 at 6:51 PM, Tim Van Steenburgh <
> tim.van.steenburgh at canonical.com> wrote:
>
>> If I `juju register` a shared controller and add a model to it, how does
>> the juju client authenticate to that model, since AFAICT there is no
>> password locally? I'm asking b/c I need to be able to make other clients
>> (python) work for this case. For the heck of it I tried with a blank
>> password but got the (unexpected?) error below:
>>
>> 2016-11-04 12:07:42 [DEBUG] jujuclient.connector: Connecting to wss://
>> 162.213.33.28:443/model/5ce2c723-7db5-4ed7-801c-210250f244dc/api
>> 2016-11-04 12:07:43 [DEBUG] jujuclient.rpc: rpc request:
>> {
>>   "request": "Login",
>>   "type": "Admin",
>>   "params": {
>>     "credentials": "",
>>     "auth-tag": "user-tvansteenburgh at external"
>>   },
>>   "version": 3,
>>   "request-id": 1
>> }
>> 2016-11-04 12:07:43 [DEBUG] jujuclient.rpc: rpc response:
>> {
>>   "request-id": 1,
>>   "response": {},
>>   "error": "redirection required",
>>   "error-code": "redirection required"
>> }
>>
>> TIA,
>>
>> Tim
>>
>> --
>> Juju mailing list
>> Juju at lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/juju
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20161105/c448aaff/attachment.html>


More information about the Juju mailing list