Malformed can-i URL on non-kubeapps cluster #2719
Labels
component/kubeops
Issue related to kubeops (to be deprecated)
good first issue
kind/bug
An issue that reports a defect in an existing feature
Projects
Milestone
Description:
405 errors are thrown when hitting the can-i URL in the cluster in which Kubeapps in installed on, but without declaring it under the
clusters:
object in the values.yaml.It results in a
currentCluster == ""
, so when building the URL, the empty is passed through.There is -no- UX impact, but it generates unexpected calls in Kubeops depending upon the browser.
api/v1/clusters//can-i
api/v1/clusters/can-i
api/v1/clusters/can-i
, returning a 405 method not allowedSteps to reproduce the issue:
Describe the results you received:
405 status code response.
Describe the results you expected:
Either:
I) a 200 OK with
authorized: no
(since it using the serviceaccount, not the user account) (I'd go for this one)ii) another meaningful and handled HTTP status code.
However, note that not generating a proper response for this case (
requestedCluster==""
) it will generate a 401 response, so users will get logged out each time they click on app-repositories.Version of Helm, Kubeapps and Kubernetes:
devel Kubeapps
Originally posted by @antgamdia in #2712 (comment)
The text was updated successfully, but these errors were encountered: