You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by Belousov Maksim Eduardovich <m....@tinkoff.ru.INVALID> on 2018/08/10 16:53:19 UTC

[DISCUSS] Run notes from note using user token/ticket

?Hi, dev!

Our users want to run several notes at the end of note that prepare data.

Now user may call REST API with user's login and password. But it seems unsecured to store password inside note. Also user must to change password every 3 months.
z.runNote doesn't work when interpreter set in isolated per note mode.

I think it would be nice if user can run notes through REST API? with authentication through? his current token/ticket, which he can get from ZeppelinContext.

Is it possible in zeppelin architecture?


Regards,
Maxim Belousov


?

Re: [DISCUSS] Run notes from note using user token/ticket

Posted by Belousov Maksim Eduardovich <m....@tinkoff.ru.INVALID>.
I have next scenario:

```
A long running code that prepare table.

# At the end
%python

import requests

session_ticket = z.getInterpreterContext().getAuthenticationInfo().getTicket()

# run note without password
r=requests.post("http://{server}:{port}/api/notebook/job/{note_id}" \
	.format(server, port, note_id), \
	headers={"X-Zeppelin-Ticket": session_ticket})
```

Also I want that described note works on cron every day.
Thus users could use REST API and they shouldn't save the password in notes.


________________________________________
От: Jeff Zhang <zj...@gmail.com>
Отправлено: 13 августа 2018 г. 3:38
Кому: dev@zeppelin.apache.org
Тема: Re: [DISCUSS] Run notes from note using user token/ticket

>>> z.runNote doesn't work when interpreter set in isolated per note mode.
What kind of issue do you meet in this scenario ?

>>> I think it would be nice if user can run notes through REST API? with
authentication through? his current token/ticket, which he can get from
ZeppelinContext.
Do you want to call rest api in notebook via ZeppelinContext ? Can you be
more specific about what you'd like to achieve ?

Belousov Maksim Eduardovich <m....@tinkoff.ru.invalid>于2018年8月11日周六
上午12:53写道:

> ?Hi, dev!
>
> Our users want to run several notes at the end of note that prepare data.
>
> Now user may call REST API with user's login and password. But it seems
> unsecured to store password inside note. Also user must to change password
> every 3 months.
> z.runNote doesn't work when interpreter set in isolated per note mode.
>
> I think it would be nice if user can run notes through REST API? with
> authentication through? his current token/ticket, which he can get from
> ZeppelinContext.
>
> Is it possible in zeppelin architecture?
>
>
> Regards,
> Maxim Belousov
>
>
> ?
>

Re: [DISCUSS] Run notes from note using user token/ticket

Posted by Jeff Zhang <zj...@gmail.com>.
>>> z.runNote doesn't work when interpreter set in isolated per note mode.
What kind of issue do you meet in this scenario ?

>>> I think it would be nice if user can run notes through REST API? with
authentication through? his current token/ticket, which he can get from
ZeppelinContext.
Do you want to call rest api in notebook via ZeppelinContext ? Can you be
more specific about what you'd like to achieve ?

Belousov Maksim Eduardovich <m....@tinkoff.ru.invalid>于2018年8月11日周六
上午12:53写道:

> ?Hi, dev!
>
> Our users want to run several notes at the end of note that prepare data.
>
> Now user may call REST API with user's login and password. But it seems
> unsecured to store password inside note. Also user must to change password
> every 3 months.
> z.runNote doesn't work when interpreter set in isolated per note mode.
>
> I think it would be nice if user can run notes through REST API? with
> authentication through? his current token/ticket, which he can get from
> ZeppelinContext.
>
> Is it possible in zeppelin architecture?
>
>
> Regards,
> Maxim Belousov
>
>
> ?
>