You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@zeppelin.apache.org by Prasad Wagle <pr...@gmail.com> on 2016/09/02 23:44:50 UTC

Making bookmarks for zeppelin notes work after authentication

Many users in my company bookmark Zeppelin notes e.g.
http://localhost:8080/#/notebook/2A94M5J1Z. If users are authenticated, the
bookmarks work great. If users are not authenticated, we send them to an
authentication server that has a mechanism to remember the original query
string that can be used to redirect users to the original note after
authentication. Since Zeppelin note URLs have # in them, the note name is
not sent to the server and after authentication, users are sent to the home
page. Any ideas on how to fix this?

I am not very familiar with angular. What are your thoughts on:
https://scotch.io/tutorials/pretty-urls-in-angularjs-removing-the-hashtag
http://stackoverflow.com/questions/14771091/removing-the-fragment-identifier-from-angularjs-urls-symbol

Thanks,
Prasad

Re: Making bookmarks for zeppelin notes work after authentication

Posted by Eric Charles <er...@apache.org>.
On Thu, Sep 8, 2016 at 8:05 AM, Prasad Wagle <pr...@gmail.com> wrote:

> Thanks Damien! I created ZEPPELIN-1418
> <https://issues.apache.org/jira/browse/ZEPPELIN-1418> - Making bookmarks
> for zeppelin notes work after authentication.
>
> BTW, would it be possible to do websocket connection authentication with
> shiro using jsessionid cookies so we don't need tickets
> <https://github.com/apache/zeppelin/blob/140adb8d3939aef850b646bbecbc7b63e0b99f94/zeppelin-server/src/main/java/org/apache/zeppelin/ticket/TicketContainer.java#L32>
> ?
>

For now, SecurityUtils.getSubject used in the NotebookServer simply does
not work: It always return anonymous, even when authenticated as a user.
I made a few attempts to get this working (adding shiro filter on /ws/*...)
without success.

The HttpRequest is upgraded but remains isolated from the rest of the
HttpSession.
The fact that the Websocket connection can be done anonymously does not
help (we would need a listerner to tell NotebookServer that the user is
authenticated).



> On Fri, Sep 2, 2016 at 4:55 PM, Corneau Damien <co...@gmail.com>
> wrote:
>
>> Hi Prasad
>>
>> Removing the # might not solve the use case you are talking about (cf.
>> http://stackoverflow.com/a/30669503)
>> However, redirecting to the right page can probably be done on the
>> front-end side (cf. http://nadeemkhedr.com/re
>> direct-to-the-original-requested-page-after-login-using-angularjs/)
>>
>> If you create an issue, I will take care of it
>>
>>
>> On Sat, Sep 3, 2016 at 8:44 AM, Prasad Wagle <pr...@gmail.com>
>> wrote:
>>
>>> Many users in my company bookmark Zeppelin notes e.g.
>>> http://localhost:8080/#/notebook/2A94M5J1Z. If users are authenticated,
>>> the bookmarks work great. If users are not authenticated, we send them to
>>> an authentication server that has a mechanism to remember the original
>>> query string that can be used to redirect users to the original note after
>>> authentication. Since Zeppelin note URLs have # in them, the note name is
>>> not sent to the server and after authentication, users are sent to the home
>>> page. Any ideas on how to fix this?
>>>
>>> I am not very familiar with angular. What are your thoughts on:
>>> https://scotch.io/tutorials/pretty-urls-in-angularjs-removin
>>> g-the-hashtag
>>> http://stackoverflow.com/questions/14771091/removing-the-fra
>>> gment-identifier-from-angularjs-urls-symbol
>>>
>>> Thanks,
>>> Prasad
>>>
>>
>>
>

Re: Making bookmarks for zeppelin notes work after authentication

Posted by Prasad Wagle <pr...@gmail.com>.
Thanks Damien! I created ZEPPELIN-1418
<https://issues.apache.org/jira/browse/ZEPPELIN-1418> - Making bookmarks
for zeppelin notes work after authentication.

BTW, would it be possible to do websocket connection authentication with
shiro using jsessionid cookies so we don't need tickets
<https://github.com/apache/zeppelin/blob/140adb8d3939aef850b646bbecbc7b63e0b99f94/zeppelin-server/src/main/java/org/apache/zeppelin/ticket/TicketContainer.java#L32>
?

On Fri, Sep 2, 2016 at 4:55 PM, Corneau Damien <co...@gmail.com> wrote:

> Hi Prasad
>
> Removing the # might not solve the use case you are talking about (cf.
> http://stackoverflow.com/a/30669503)
> However, redirecting to the right page can probably be done on the
> front-end side (cf. http://nadeemkhedr.com/re
> direct-to-the-original-requested-page-after-login-using-angularjs/)
>
> If you create an issue, I will take care of it
>
>
> On Sat, Sep 3, 2016 at 8:44 AM, Prasad Wagle <pr...@gmail.com>
> wrote:
>
>> Many users in my company bookmark Zeppelin notes e.g.
>> http://localhost:8080/#/notebook/2A94M5J1Z. If users are authenticated,
>> the bookmarks work great. If users are not authenticated, we send them to
>> an authentication server that has a mechanism to remember the original
>> query string that can be used to redirect users to the original note after
>> authentication. Since Zeppelin note URLs have # in them, the note name is
>> not sent to the server and after authentication, users are sent to the home
>> page. Any ideas on how to fix this?
>>
>> I am not very familiar with angular. What are your thoughts on:
>> https://scotch.io/tutorials/pretty-urls-in-angularjs-removing-the-hashtag
>> http://stackoverflow.com/questions/14771091/removing-the-fra
>> gment-identifier-from-angularjs-urls-symbol
>>
>> Thanks,
>> Prasad
>>
>
>

Re: Making bookmarks for zeppelin notes work after authentication

Posted by Corneau Damien <co...@gmail.com>.
Hi Prasad

Removing the # might not solve the use case you are talking about (cf.
http://stackoverflow.com/a/30669503)
However, redirecting to the right page can probably be done on the
front-end side (cf.
http://nadeemkhedr.com/redirect-to-the-original-requested-page-after-login-using-angularjs/
)

If you create an issue, I will take care of it


On Sat, Sep 3, 2016 at 8:44 AM, Prasad Wagle <pr...@gmail.com> wrote:

> Many users in my company bookmark Zeppelin notes e.g.
> http://localhost:8080/#/notebook/2A94M5J1Z. If users are authenticated,
> the bookmarks work great. If users are not authenticated, we send them to
> an authentication server that has a mechanism to remember the original
> query string that can be used to redirect users to the original note after
> authentication. Since Zeppelin note URLs have # in them, the note name is
> not sent to the server and after authentication, users are sent to the home
> page. Any ideas on how to fix this?
>
> I am not very familiar with angular. What are your thoughts on:
> https://scotch.io/tutorials/pretty-urls-in-angularjs-removing-the-hashtag
> http://stackoverflow.com/questions/14771091/removing-
> the-fragment-identifier-from-angularjs-urls-symbol
>
> Thanks,
> Prasad
>