openshift / origin-web-console

Web Console for the OpenShift Application Platform
https://www.openshift.org/
Apache License 2.0
123 stars 230 forks source link

An Authentication error occurred - github auth okd 3.11 #3175

Closed sekayasin closed 4 years ago

sekayasin commented 4 years ago

I enabled github Auth for okd 3.11, on logging in with github, after a user permits github, on redirection to the okd url I get an Authentication error occurred any pointers or hints on this Thanks in Advance Screenshot 2020-07-14 at 09 34 45

spadgett commented 4 years ago

cc @stlaz

stlaz commented 4 years ago

You may want to:

  1. check the API server logs for any authentication-related failures, post them if they don't make sense to you
  2. check your master-config.yaml and the client_id/client_secret credentials, make sure they match
sekayasin commented 4 years ago

@stlaz here are the API server logs for any authentication-related failures

E0715 04:40:07.303513 1 memcache.go:147] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0715 04:40:16.248496 1 errorpage.go:26] AuthenticationError: dial tcp: lookup api.github.com on 10.156.105.115:53: read udp 10.156.105.115:44133->10.156.105.115:53: i/o timeout E0715 04:40:17.326301 1 memcache.go:147] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request E0715 04:40:27.351358 1 memcache.go:147] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request

FYI: I'm testing this locally, I have an entry in my Local PC hosts file 10.156.105.115 my-okd-url.com OKD 3.11 installation was successful, i can add users via htpasswd, and i can reach my web console via https://my-okd-url.com , no certs configured at the moment, connection not secure, added browser security exception for the site -- planning to use certbot's lets encrypt certs later.

Cross checked my master-config file, clientID/clientSecret creds match

sekayasin commented 4 years ago

This finally worked! as the logs depicts an i/o timeout, on trying again to login via github, it finally logged my github user in. Doing oc get users, i would see my github user.

stlaz commented 4 years ago

\o/ looking at the logs reveals that your DNS server was broken (for whatever reason):

AuthenticationError: dial tcp: lookup api.github.com on 10.156.105.115:53: read udp 10.156.105.115:44133->10.156.105.115:53