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

Using a service instead of user for authentication to avoid login limitations #32

Open
costrouc opened this issue Nov 16, 2020 · 2 comments

Comments

@costrouc
Copy link

@yuvipanda was curious if you've explored using a service to create user notebooks and test the notebooks. Is there a limitation with the jupyterhub api that would prevent a service account being used for testing? As I understand hubtraf logs in as each user so social authentication would not be possible to automate. I've at least tried it out locally and it looks like I am able to access notebooks via the service account.

@costrouc
Copy link
Author

We're looking to use hubtraf for qhub testing but don't want to have to downgrade the authentication for testing. Ideally we'd have a 'testing' service key via

c.JupyterHub.services = [
 {
        'name': 'my-service',
        'api_token': 'super-secret',
        'oauth_no_confirm': True,
        'admin': True
    }
]

And using this service to create n fake users, launch python kernels etc to run our tests and check that autoscalling is working properly.

@yuvipanda
Copy link
Owner

This would be great!

https://github.com/yuvipanda/hubtraf/blob/master/hubtraf/check.py lets you do this with the API, so you don't need to downgrade auth. Should be possible to easily extend this to simulate.py as well. Great PR to get started with? :D

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

2 participants