Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Auth example to docs #671

Closed
philippjfr opened this issue Oct 2, 2019 · 7 comments
Closed

Add Auth example to docs #671

philippjfr opened this issue Oct 2, 2019 · 7 comments
Labels
type: docs Related to the Panel documentation and examples
Milestone

Comments

@philippjfr
Copy link
Member

In bokeh 1.4 authentication was added to the bokeh server. We should explore how this works and provide an example in the panel docs.

@philippjfr philippjfr added TRIAGE Default label for untriaged issues type: docs Related to the Panel documentation and examples and removed TRIAGE Default label for untriaged issues labels Oct 2, 2019
@philippjfr philippjfr added this to the v0.7.1 milestone Nov 13, 2019
@philippjfr philippjfr modified the milestones: v0.7.1, v0.8.0 Dec 17, 2019
@philippjfr philippjfr modified the milestones: v0.8.0, v0.9.0 Jan 16, 2020
@philippjfr philippjfr modified the milestones: v0.9.0, v1.0.0 Mar 11, 2020
@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented May 13, 2020

I would really, really like to know more about it. Would it be possible for you @philippjfr to just write down a brainstorm of your thoughts below? Spend maybe 5 minutes and throw in a link to where I should get started?

My use case is authentication via Azure AD. I now have a basic understanding and a working Flask example. Would like to translate to a Tornado/ Panel example.

I will be doing it for work. But when I get the time I would share the knowledge somehow to the Panel community.

@MarcSkovMadsen
Copy link
Collaborator

Ok. I found some Bokeh sample code on authentication - not for Azure AD though. I have a poc for Azure AD and Bokeh working now.

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented May 14, 2020

I'm starting with Panel example now. I can see that the bokeh authentication mechanism runs when I use panel serve with panel.servable

But when I use python with panel.serve or my_app.show() the auth module and get_user function is not run.

I.e. authentication in Panel seems to work only with the panel.servable way of launching the application. Which is not good for my use cases.

@MarcSkovMadsen
Copy link
Collaborator

@philippjfr . Where could I find information on how to hook up authentication when I use panel.serve or my_app.show()? It is not working (for me at least). See above comment.

@MarcSkovMadsen
Copy link
Collaborator

A stackoverflow question from a user regarding Panel+Flask auth. Maybe that should be added to the documentation as well

https://stackoverflow.com/questions/60169875/handling-user-authentication-in-flask-bokeh-panel-setup

@philippjfr
Copy link
Member Author

So currently I was just considering adding OAuth plugins as I started to do in this PR: #820

That said if there are other auth solutions we should consider shipping with Panel we should probably do so.

Where could I find information on how to hook up authentication when I use panel.serve or my_app.show()?

Basically you just provide an auth_provider as a keyword argument to the show command and or you could work up a PR to add auth handling equivalent to this code in bokeh directly to the get_server utility in Panel.

@philippjfr philippjfr modified the milestones: v1.0.0, v0.10.0 Aug 23, 2020
@philippjfr
Copy link
Member Author

There is now a section on Auth providers: https://pyviz-dev.github.io/panel/user_guide/Authentication.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs Related to the Panel documentation and examples
Projects
None yet
Development

No branches or pull requests

2 participants