oauthenticator | OAuth + JupyterHub Authenticator = OAuthenticator | OAuth library
kandi X-RAY | oauthenticator Summary
kandi X-RAY | oauthenticator Summary
OAuth is a token based login mechanism that doesn't rely on a username and password mapping. In order to use this login mechanism with JupyerHub the login handlers need to be overridden. OAuthenticator overrides these handlers for the common OAuth2 identity providers allowing them to be plugged in and used with JupyterHub. The following authentication services are supported through their own authenticator: Auth0, Azure AD, Bitbucket, CILogon, FeiShu, GitHub, GitLab, Globus, Google, MediaWiki, Okpy, OpenShift. There is also a GenericAuthenticator that can be configured with any OAuth 2.0 identity provider or can be used to create a new authenticator class when additional customization is needed.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Authenticate the user
- Helper function to create auth state
- Get an OAuth2 token
- Construct the headers for the client
- Handle login request
- Handle logout
- Delete all credentials for a given user
- Revoke access tokens
- Perform authorization redirect
- Get next state
- Serializes the given state into a base64 encoded string
- Redirect to the user
- Authenticate using the provider
- Wrapper for fetch
- Get next page from response headers
- Parse header links
- Handles the request
- Return a JSON representation of a request token
- Authenticate with MediaWiki
- Render autodoc modules
oauthenticator Key Features
oauthenticator Examples and Code Snippets
Community Discussions
Trending Discussions on oauthenticator
QUESTION
I'm attempting to run a Django web application that pairs with a JupyterHub server, where users enter via the web app and are then granted access to a notebook server once they've signed in. To facilitate this, I'm attempting to use OAuth2, where Django provides the authentication and JupyterHub verifies users against that.
I'm using django-oauth-toolkit
to provide the authentication service and linking against it using the Generic OAuthenticator. A docker-compose reference implementation is available here. Currently, the authorize redirect works, but some part of the token retrieval process throws the following error:
ANSWER
Answered 2018-Jan-12 at 23:01Turned out to be a few minor bugs I had to work through to get this to work:
- The URL used to get a token is relative to the JupyterHub server, NOT relative to the client/browser like the authorization url is. In the Docker Compose example provided, the django authentication server is "localhost:8000" relative to the client, but "django:8000" relative to the JupyterHub server.
- The appropriate hostnames (both "localhost" and "django") therefore needed to be in the Django app's ALLOWED_HOSTS list.
I'm not positive it's necessary, but I also added the middleware suggested by the oauth-toolkit documentation:
MIDDLEWARE = [ ..., 'oauth2_provider.middleware.OAuth2TokenMiddleware', ]
JupyterHub also expects a userdata URL to get a username. This must be provided in the OAUTH2_USERDATA_URL environment variable (again, using a URL relative to the JupyterHub server), and that URL must return a JSON blob with, at least, a 'username' key.
Complete diffs from the previous code to the working example are available at this commit (as well as a complete, minimal example in that repository).
QUESTION
JupyterHub not working on public port 8000. It only works on port 8081. Everywhere I read, everyone got their issues magically solved without any solutions.
...ANSWER
Answered 2019-Apr-20 at 13:19Apparently I have to run the following line on another terminal window before JupyterHub.
Run:
QUESTION
I set up a Kubernetes Cluster using kubeadm.
...ANSWER
Answered 2018-May-15 at 10:42It was not a matter of configuration, my configuration was not all that wrong, but it was a port problem. The machines I am using are related to two different accounts on an OpenStack server. The OpenStack server has an ingress/engress controller. I thought I opened up all necessary ports... but it did not work... what struck me, was that it sometimes did work... I figured that when all pods were created on nodes belonging to one account it did work.
So I decided to only use one account (open all necessary ports for the kubernetes cluster listed here) and it worked.
I will update my answer if I find out which ingress and engress rules I have to apply to the other account.
I will update if I find out which ingress and engress rules I have to apply to the
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
Install oauthenticator
General Setup
Azure AD
FeiShu
GitHub
GitLab
OpenShift
Okpy
Globus
Moodle
Yandex
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page