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

Allow securing with Basic auth #5

Open
tuukkamustonen opened this issue Dec 15, 2017 · 7 comments
Open

Allow securing with Basic auth #5

tuukkamustonen opened this issue Dec 15, 2017 · 7 comments

Comments

@tuukkamustonen
Copy link

While you're probably not supported to run this in production or in public servers, sometimes that would be just convenient.

Securing with Basic auth wouldn't probably be too big a task, but should do the job and doesn't require a session.

Would this be viable?

@mgedmin
Copy link
Owner

mgedmin commented Dec 15, 2017

My gut feeling is that the frontend server should be responsible for authentication. You're deploying WSGI apps behind Apache or Nginx, aren't you?

@tuukkamustonen
Copy link
Author

Not this time, I'm running gunicorn (with gevent) straight behind AWS Application Load Balancer.

@tuukkamustonen
Copy link
Author

Sorry, misclick.

@mgedmin
Copy link
Owner

mgedmin commented Dec 15, 2017

What do you propose?

I'm willing to accept a pull request, if it has tests and documentation.

@tuukkamustonen
Copy link
Author

What do you propose?

Not sure what you mean - I don't have a PR to send now. I'm not familiar with WSGI middleware or mako et al. either.

I'm willing to accept a pull request, if it has tests and documentation.

That's good to know. I suggest we wait a bit and see if anyone else is interested in this...

@mgedmin
Copy link
Owner

mgedmin commented Dec 15, 2017

What do you propose?

Not sure what you mean

Mostly, what API do you think would work well for your use case?

@tuukkamustonen
Copy link
Author

Ah, just something like:

app = build_my_flask_app(...)
app.wsgi_app = Dozer(app.wsgi_app, basic_auth=('username', 'password'))

And then Dozer would secure all its endpoints (_dozer/, _profiler, other if there are any) with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants