kubeguard / guard

🔑 Kubernetes Authentication & Authorization WebHook Server
https://kubeguard.dev
Apache License 2.0
590 stars 81 forks source link

[Google] hard-coded Google OAuth client was deleted #346

Open xwan-robinhood opened 1 year ago

xwan-robinhood commented 1 year ago

hi,

we've been using Google Authenticator (https://appscode.com/products/guard/v0.7.1/guides/authenticator/google/) and everything was working until 2022/10/17 around 4am PST, the hard-coded Google OAuth client was deleted.

we are getting error when running guard get token -o google

Unable to connect to the server: failed to refresh token: oauth2: cannot fetch token: 401 Unauthorized
Response: {
  "error": "deleted_client",
  "error_description": "The OAuth client was deleted."
}

After communicating with Google, response:

"When entering the Client ID we get the error “App not found” which indicates that the Client ID doesn't exist or is not available outside the organization that contains that Client ID."

Can the guard team help us understand:

  1. is the hard-coded Google OAuth client owned by Guard team?
  2. can someone check how / why the client was deleted? thanks

hard-coded Google OAuth client: https://github.com/kubeguard/guard/blob/master/auth/providers/google/google.go#L32-L38

Our fix is to create a new Google OAuth client that fully manage by you and recompile the Guard binary and update guard image running on your clusters.

txmoose commented 1 year ago

This is still an issue. Is there a reason these values are hard coded and not passed in as flags/configuration?