jhub_cas_authenticator icon indicating copy to clipboard operation
jhub_cas_authenticator copied to clipboard

not working

Open mhechthz opened this issue 2 years ago • 1 comments

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.

mhechthz avatar Jul 12 '23 06:07 mhechthz

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.

cwaldbieser avatar Jul 14 '23 21:07 cwaldbieser