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

not working #23

Open
mhechthz opened this issue Jul 12, 2023 · 1 comment
Open

not working #23

mhechthz opened this issue Jul 12, 2023 · 1 comment

Comments

@mhechthz
Copy link

mhechthz commented Jul 12, 2023

I did set in the jupyterhub_config.py following values:

c.JupyterHub.authenticator_class   = 'jhub_cas_authenticator.cas_auth.CASAuthenticator'
c.CASAuthenticator.cas_login_url   = 'https://myCASServer:port/cas/login'
c.CASAuthenticator.cas_logout_url  = 'https://myCASServer:port/cas/logout'
c.CASAuthenticator.cas_service_url = 'https://mypc:jupyterHubPort/login'
c.CASAuthenticator.cas_service_validate_url = 'https://myCASServer:port/cas/serviceValidate'

c.CASAuthenticator.cas_client_ca_certs       = '../bin/mycertificate.cer'
c.CASLocalAuthenticator.cas_required_attribs = {('memberOf', 'jupyterhub_users')}
c.CASLocalAuthenticator.whitelist            = {'myuserid'}
c.CASLocalAuthenticator.create_system_users  = True

On going to mypc:jupyterHubPort (with Ubuntu 22.04) the request runs for a long time and finally breaks with a timeout.

For another python program with Flask on the same computer I have following settings for the CAS that work properly:

    cas_client = CASClient(
        version=3,
        service_url=f'http://mypc:myotherport/login?next=%2Fapp',
        server_url='https://myCASServer:port/cas/',
        verify_ssl_certificate='../bin/mycertificate.cer'
    )

What is wrong with my settings.

@cwaldbieser
Copy link
Owner

Well, I'd set my Jupyterhub log level to DEBUG and watch what happens in the log output.
To set the log level, see this config.. The setting is c.Application.log_level = 'DEBUG'.

It sounds like the Jupyterhub CAS authenticator redirects your browser to your CAS server, but your browser isn't able to connect. You should see the redirect in your debug logs. It will look like "Redirecting to CAS to get service ticket: " followed by the redirect URL. You can copy that into your browser's URL bar, and you should experience the same behavior. Make sure that the host and port are actually the correct ones for your CAS server (no typos!).

If you are still having trouble let me know if you have additional information from the logs.

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