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

Auth0 integration #37

Closed
washort opened this issue Feb 7, 2017 · 21 comments
Closed

Auth0 integration #37

washort opened this issue Feb 7, 2017 · 21 comments
Milestone

Comments

@washort
Copy link

washort commented Feb 7, 2017

Auth0 uses OpenID Connect, similar to Google's signin system, so much of the existing code should be adaptable.

@rafrombrc rafrombrc added this to the 6 milestone Jun 21, 2017
@alison985 alison985 self-assigned this Jul 6, 2017
@alison985
Copy link

After speaking with Blake last week I created my own Auth0 account for testing purposes.

@alison985 alison985 reopened this Jul 12, 2017
@alison985 alison985 modified the milestones: 7, 6 Jul 12, 2017
@alison985
Copy link

First PR: #123

@alison985
Copy link

Here is the branch where I am working on this: https://github.com/alison985/mozilla-redash/tree/37_auth0

Current status is that going to http://localhost:5000/ takes you to http://localhost:5000/oauth/auth0?next=http%3A%2F%2Flocalhost%3A5000%2F and gives an Internal Server Error (FYI: 500). This is the error message generated in the console:

server_1 | [2017-07-21 17:46:50,354][PID:135][ERROR][redash] Exception on /oauth/auth0 [GET]
server_1 | Traceback (most recent call last):
server_1 | File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
server_1 | response = self.full_dispatch_request()
server_1 | File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request
server_1 | rv = self.handle_user_exception(e)
server_1 | File "/usr/local/lib/python2.7/dist-packages/flask_restful/init.py", line 271, in error_router
server_1 | return original_handler(e)
server_1 | File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception
server_1 | reraise(exc_type, exc_value, tb)
server_1 | File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
server_1 | rv = self.dispatch_request()
server_1 | File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
server_1 | return self.view_functionsrule.endpoint
server_1 | File "/app/redash/authentication/auth0_oauth.py", line 81, in login
server_1 | return auth0_remote_app().authorize(callback=callback, state=next_path)
server_1 | File "/app/redash/authentication/auth0_oauth.py", line 38, in auth0_remote_app
server_1 | consumer_secret=settings.AUTH0_CLIENT_SECRET
server_1 | File "/usr/local/lib/python2.7/dist-packages/flask_oauthlib/client.py", line 71, in remote_app
server_1 | remote = OAuthRemoteApp(self, name, **kwargs)
server_1 | File "/usr/local/lib/python2.7/dist-packages/flask_oauthlib/client.py", line 276, in init
server_1 | "OAuthRemoteApp requires consumer key and secret"
server_1 | TypeError: OAuthRemoteApp requires consumer key and secret

However, the consumer_key and consumer_secret are clearly being passed here: https://github.com/alison985/mozilla-redash/blob/37_auth0/redash/authentication/auth0_oauth.py#L37-L38

This is the section of the library that is complaining:
Screenshot 2017-07-21 12.54.20.png Note it clearly refers to the variable names consumer_key and consumer_secret.

I'm at a loss. @washort any thoughts?

@alison985 alison985 modified the milestones: 8, 7 Jul 27, 2017
@washort
Copy link
Author

washort commented Aug 10, 2017

Looks like Auth0 provides their own Python module for this: https://auth0.com/docs/quickstart/webapp/python

I'll have a look at using it instead of flask-oauthlib here.

@alison985 alison985 modified the milestones: 9, 8 Aug 11, 2017
@rafrombrc
Copy link
Member

Decided to punt on auth0 in the app and instead do the auth in nginx and pass headers back. Relevant upstream issue: getredash#1648

@rafrombrc rafrombrc modified the milestones: 10, 9 Aug 23, 2017
washort pushed a commit that referenced this issue Jun 28, 2019
- Use new master / rc release release strategy (#440)
- Migrate Circle CI 2.0 (#488, #502, #923)
- Install redash-stmo.

In the long run we'll be able to install additional dependencies by
having an own Dockerfile to build images based on the Redash image
but that installs additional Python dependencies. But until we have
a fork with lots of changes ourselves we need to do it this way.

Redash-stmo contains the ability to hook up our own Dockerflow
library.

Refs #13
Refs #37
emtwo pushed a commit that referenced this issue Jul 15, 2019
- Use new master / rc release release strategy (#440)
- Migrate Circle CI 2.0 (#488, #502, #923)
- Install redash-stmo.

In the long run we'll be able to install additional dependencies by
having an own Dockerfile to build images based on the Redash image
but that installs additional Python dependencies. But until we have
a fork with lots of changes ourselves we need to do it this way.

Redash-stmo contains the ability to hook up our own Dockerflow
library.

Refs #13
Refs #37
emtwo pushed a commit that referenced this issue Jul 17, 2019
- Use new master / rc release release strategy (#440)
- Migrate Circle CI 2.0 (#488, #502, #923)
- Install redash-stmo.

In the long run we'll be able to install additional dependencies by
having an own Dockerfile to build images based on the Redash image
but that installs additional Python dependencies. But until we have
a fork with lots of changes ourselves we need to do it this way.

Redash-stmo contains the ability to hook up our own Dockerflow
library.

Refs #13
Refs #37
jezdez pushed a commit that referenced this issue Aug 12, 2019
- Use new master / rc release release strategy (#440)
- Migrate Circle CI 2.0 (#488, #502, #923)
- Install redash-stmo.

In the long run we'll be able to install additional dependencies by
having an own Dockerfile to build images based on the Redash image
but that installs additional Python dependencies. But until we have
a fork with lots of changes ourselves we need to do it this way.

Redash-stmo contains the ability to hook up our own Dockerflow
library.

Refs #13
Refs #37
jezdez pushed a commit that referenced this issue Aug 14, 2019
- Use new master / rc release release strategy (#440)
- Migrate Circle CI 2.0 (#488, #502, #923)
- Install redash-stmo.

In the long run we'll be able to install additional dependencies by
having an own Dockerfile to build images based on the Redash image
but that installs additional Python dependencies. But until we have
a fork with lots of changes ourselves we need to do it this way.

Redash-stmo contains the ability to hook up our own Dockerflow
library.

Refs #13
Refs #37
jezdez pushed a commit that referenced this issue Aug 19, 2019
- Use new master / rc release release strategy (#440)
- Migrate Circle CI 2.0 (#488, #502, #923)
- Install redash-stmo.

In the long run we'll be able to install additional dependencies by
having an own Dockerfile to build images based on the Redash image
but that installs additional Python dependencies. But until we have
a fork with lots of changes ourselves we need to do it this way.

Redash-stmo contains the ability to hook up our own Dockerflow
library.

Refs #13
Refs #37
washort pushed a commit that referenced this issue Sep 16, 2019
- Use new master / rc release release strategy (#440)
- Migrate Circle CI 2.0 (#488, #502, #923)
- Install redash-stmo.

In the long run we'll be able to install additional dependencies by
having an own Dockerfile to build images based on the Redash image
but that installs additional Python dependencies. But until we have
a fork with lots of changes ourselves we need to do it this way.

Redash-stmo contains the ability to hook up our own Dockerflow
library.

Refs #13
Refs #37
emtwo pushed a commit that referenced this issue Nov 5, 2019
- Use new master / rc release release strategy (#440)
- Migrate Circle CI 2.0 (#488, #502, #923)
- Install redash-stmo.

In the long run we'll be able to install additional dependencies by
having an own Dockerfile to build images based on the Redash image
but that installs additional Python dependencies. But until we have
a fork with lots of changes ourselves we need to do it this way.

Redash-stmo contains the ability to hook up our own Dockerflow
library.

Refs #13
Refs #37
jezdez pushed a commit that referenced this issue Jan 16, 2020
- Use new master / rc release release strategy (#440)
- Migrate Circle CI 2.0 (#488, #502, #923)
- Install redash-stmo.

In the long run we'll be able to install additional dependencies by
having an own Dockerfile to build images based on the Redash image
but that installs additional Python dependencies. But until we have
a fork with lots of changes ourselves we need to do it this way.

Redash-stmo contains the ability to hook up our own Dockerflow
library.

Disable test that tests the login page and the existence of the
remote auth link there. We override this functionality for user
experience reasons via redash-stmo and redirect from the login page
to the remote auth URL.

Refs #13
Refs #37
jezdez pushed a commit that referenced this issue May 4, 2020
- Use new master / rc release release strategy (#440)
- Migrate Circle CI 2.0 (#488, #502, #923)
- Install redash-stmo.

In the long run we'll be able to install additional dependencies by
having an own Dockerfile to build images based on the Redash image
but that installs additional Python dependencies. But until we have
a fork with lots of changes ourselves we need to do it this way.

Redash-stmo contains the ability to hook up our own Dockerflow
library.

Disable test that tests the login page and the existence of the
remote auth link there. We override this functionality for user
experience reasons via redash-stmo and redirect from the login page
to the remote auth URL.

Refs #13
Refs #37
jezdez pushed a commit that referenced this issue May 14, 2020
- Use new master / rc release release strategy (#440)
- Migrate Circle CI 2.0 (#488, #502, #923)
- Install redash-stmo.

In the long run we'll be able to install additional dependencies by
having an own Dockerfile to build images based on the Redash image
but that installs additional Python dependencies. But until we have
a fork with lots of changes ourselves we need to do it this way.

Redash-stmo contains the ability to hook up our own Dockerflow
library.

Disable test that tests the login page and the existence of the
remote auth link there. We override this functionality for user
experience reasons via redash-stmo and redirect from the login page
to the remote auth URL.

Refs #13
Refs #37
robhudson pushed a commit that referenced this issue Jun 4, 2020
- Use new master / rc release release strategy (#440)
- Migrate Circle CI 2.0 (#488, #502, #923)
- Install redash-stmo.

In the long run we'll be able to install additional dependencies by
having an own Dockerfile to build images based on the Redash image
but that installs additional Python dependencies. But until we have
a fork with lots of changes ourselves we need to do it this way.

Redash-stmo contains the ability to hook up our own Dockerflow
library.

Disable handlers test that tests the login page and the existence of the
remote auth link there. We override this functionality for user
experience reasons via redash-stmo and redirect from the login page to
the remote auth URL.

Update metrics test since our auth changes add a database call which
also gets timed, and therefore assert this was called only once fails.

Refs #13
Refs #37
emtwo pushed a commit that referenced this issue Jul 14, 2020
- Use new master / rc release release strategy (#440)
- Migrate Circle CI 2.0 (#488, #502, #923)
- Install redash-stmo.

In the long run we'll be able to install additional dependencies by
having an own Dockerfile to build images based on the Redash image
but that installs additional Python dependencies. But until we have
a fork with lots of changes ourselves we need to do it this way.

Redash-stmo contains the ability to hook up our own Dockerflow
library.

Disable handlers test that tests the login page and the existence of the
remote auth link there. We override this functionality for user
experience reasons via redash-stmo and redirect from the login page to
the remote auth URL.

Update metrics test since our auth changes add a database call which
also gets timed, and therefore assert this was called only once fails.

Refs #13
Refs #37
jezdez pushed a commit that referenced this issue Oct 15, 2020
- Use new master / rc release release strategy (#440)
- Migrate Circle CI 2.0 (#488, #502, #923)
- Install redash-stmo.

In the long run we'll be able to install additional dependencies by
having an own Dockerfile to build images based on the Redash image
but that installs additional Python dependencies. But until we have
a fork with lots of changes ourselves we need to do it this way.

Redash-stmo contains the ability to hook up our own Dockerflow
library.

Disable handlers test that tests the login page and the existence of the
remote auth link there. We override this functionality for user
experience reasons via redash-stmo and redirect from the login page to
the remote auth URL.

Update metrics test since our auth changes add a database call which
also gets timed, and therefore assert this was called only once fails.

Refs #13
Refs #37
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

8 participants