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

Authentication not working #85

Closed
zunjae opened this issue Jul 20, 2018 · 2 comments
Closed

Authentication not working #85

zunjae opened this issue Jul 20, 2018 · 2 comments

Comments

@zunjae
Copy link

zunjae commented Jul 20, 2018

I keep getting the error WARNING:root:flask-profiler authentication failed when I have flask-profiler and auth enabled. Here's my code

app.config["flask_profiler"] = {
    "enabled": True,
    "storage": {
        "FILE": "/var/www/TestApp/flask-profiler.sql",
        "engine": "sqlite"
    },
    "basicAuth": {
        "enabled": True,
        "username": "admin",
        "password": "admin"
    },
    "ignore": [
        "^/account/.*"
    ]
}

The only way to get into flask-profiler is if I disable basicAuth - enabled but I obviously don't want the rest of the world to see my stats. I can verify that the file /var/www/TestApp/flask-profiler.sql is writable as it is about 9MB now.

How do I troubleshoot what is wrong here? The logs don't say much.

@zunjae
Copy link
Author

zunjae commented Jul 20, 2018

I tried to login through curl (curl -v -u admin:admin SITE) and analyzed the headers and response. the Authorization header is send correctly, however the client still denies it and sends back a 401 status code.

@zunjae
Copy link
Author

zunjae commented Jul 20, 2018

so I only have this issue on a production server, not locally...

so using common sense I googled "WSGI basic authorization not working" and learned that I need to put WSGIPassAuthorization On in my apache config file.

This issue is not related to your library, however I'm sure other people will have this issue as well.

@zunjae zunjae closed this as completed Jul 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant