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

[OpenShift] Enable cert verification for self-signed certs and auto-load auth api URL #363

Merged
merged 1 commit into from
Sep 7, 2020

Conversation

vpavlin
Copy link
Contributor

@vpavlin vpavlin commented Aug 5, 2020

The latest version of OpenShift OAuthenticator relies on user configuring OPENSHIFT_URL environment variable and then uses it for multiple kind of unrelated things, so it is not clear it OPENSHIFT_URL should be an API url, or OAuth API url.

Also, the default value localhost:8443 would not work in OpenShift environment since in a container, localhost will not really do much.

This change sets more sensible default for openshift_url which actually represents internal URL for OpenShift API.

Next it automatically gathers the OpenShift OAuth URL, so that the user does not have to provide it externally via env vars.

Lastly it sets the OpenShift provided CA certs in a container by default, so that we don't have to turn off the verification on clusters using self-signed certs.

I had to use requests library to fetch the URLs for the OAuth issuer since the Async client did not work for me (event loop in an event loop error) - let me know if there is a better solution.

@vpavlin vpavlin changed the title OpenShift: Enable cert verification for self-signed certs and auto-load auth api URL [OpenShifAuthenticator] Enable cert verification for self-signed certs and auto-load auth api URL Aug 5, 2020
@vpavlin
Copy link
Contributor Author

vpavlin commented Aug 12, 2020

Can anyone take a look, please?

@minrk
Copy link
Member

minrk commented Sep 7, 2020

Thanks for the PR!

@minrk minrk merged commit 944d1b7 into jupyterhub:master Sep 7, 2020
@consideRatio consideRatio changed the title [OpenShifAuthenticator] Enable cert verification for self-signed certs and auto-load auth api URL [OpenShift] Enable cert verification for self-signed certs and auto-load auth api URL Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants