-
Notifications
You must be signed in to change notification settings - Fork 227
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
backend: Prevent OIDC errors when not in use #2041
Conversation
cf64c46
to
dd564c0
Compare
This change prevents the spam of OIDC config errors in the logs when running the latest version of Headlamp without OIDC. Instead of logging an error when we check for the OIDC config, we simply return since we know we are not using OIDC auth. Fixes: #1933 Signed-off-by: Evangelos Skopelitis <[email protected]>
dd564c0
to
ab2eb23
Compare
I think rather than disabling logging of the error... instead What do you think? |
@illume the same check is performed on line 499, I think removing logging after 818 makes sense since it is assumed that OIDC auth is not being used by the comment on line 817. I'm not very familiar, but is there a reason to call |
I don't think there's a reason to use OIDCTokenRefreshMiddleware when oidc is not configured. /cc @yolossn |
Since the middleware is for the cluster proxy endpoint we cannot conditionally add it, this is because there can be certain clusters with OIDC and other without and all of them connect to the cluster via the cluster proxy endpoint. |
Thanks @yolossn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉🎈
thanks
This change prevents the spam of OIDC config errors in the logs when running the latest version of Headlamp without OIDC. Instead of logging an error when we check for the OIDC config, we simply return since we know we are not using OIDC auth.
Fixes: #1933
Testing
kubernetes-headlamp.yaml
to itkubectl apply -f kubernetes-headlamp.yaml
) and configure non-OIDC credentialskubectl logs -n kube-system <pod-name> -f