-
Notifications
You must be signed in to change notification settings - Fork 707
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
App Repository UI does not properly handle cases where the user does not have read/write to app repos in ns #3679
Comments
Note that this page is accessed via the Administration->AppRepositories menu. As you mention, the user can login, view apps and view the configured catalog, but Kubeapps doesn't consider that this user has access to administer app repositories in the current context, which they don't. Early on the Kubeapps project adopted the approach of letting the user know the RBAC that is required for functionality if they cannot access it (we should definitely fix the end of the message though - users don't need to know about pinniped proxy). I'm assuming you didn't expect this user to be able to administer repositories, but rather, are thinking of this as just a view of repositories currently available? Let me know what you think. I'd be keen to keep this under "Administration->AppRepositories", but open to ideas. |
We mentioned in another issue (#3655) that we don't support this use-case currently because Helm stores the release info as a secret, so reading secrets is required to view.
That's because the test we use is to check if the user can read secrets.
Haven't yet checked, but guessing when requesting the catalog in the kubeapps namespace we skip the check (could be a bug, need to look more closely). |
One option would be to disable this link if the user does not have the proper permissions. I am not sure how easy it is to handle.
If the namespace user had write on app repositories (within the namespace), as mentioned above, i expect the user to be able to add his own repository - i thought this was the goal of namespace scoped repositories. |
that was true and understandable for applications, but why would that be the case for app repositories? |
Yeah, I was wondering the same, but giving the user feedback as to why they can't administrate repos is also important. Could be a tool-tip on the disabled link, not sure.
If a user can administrate AppRepositories in that namespace, then yes, they should be able to without error, but that's different to what you're reporting here isn't it? I thought this issue is about a user who does not have perms to do so in the namespace?
Same here, but that's different to the issue in the description or I'm lost :) "I created a user that only has access to his/her own namespace, and that does not have the right to view/create private repositories"
Yep, we could change to support that, but currently it's meant to be an administration function so that admins (of the namespace or cluster) can setup the catalog that can be used in that cluster.
Not sure why I'd want to do that as a non-admin user? I can already see what repos are available in the namespace from the catalog. But yes, if we want to update this to be a non-admin page, we can of course consider that. As it is, it's currently meant for administration (and labeled as such).
Much the same reason (secrets). If a user clicks on a repository to see the details, do we show the secret name? Do we allow them to update the secret. It's been designed for admins to create and configure the catalog. We could update this administration function so that we have a view-only version. I'd personally wait to see if people are asking for this functionality and work to understand why they are expecting to be able to view administration pages and what they would do with the information etc. before investing too much into it. |
I was about to write something long, but i guess I can make it shorter. The main issue i guess that confused me is that the "app repository" navigation link is always enabled, and then when you navigate you get different kind of errors depending on how the user is configured (which is confusing). The second issue is that in the case of "view", only parts of the buttons are properly disabled. The global repositories edit/remove/refresh buttons are properly handled, but all other buttons are not - i.e. the global buttons (add, refresh all) and the namespace repository buttons. So:
Last, regarding your last comments on secrets, if i have view on pods, i can do a get pod and see the secrets the pod points too. I will not be able to do a get secret and extract its sensitive data though. |
I just realized that this was true when we only had app repositories but will most likely be different with the pluggable APIs. |
I created a user that only has access to his/her own namespace, and that does not have the right to view/create private repositories, but only use the global repositories (e.g. because of company policy).
The user can login to Kubeapps, view applications and view the catalog fine.
But when looking at the repository page, the UI shows an error message:
I would expect that instead, the page should render the global repositories and then have a message in the namespaced section that indicates the user does not have the priviledges to manage repositories.
something like this:
The screenshot above was taken after granting "read" to repositories in the user's namespace.
We can see that the UI can properly handle disabling the edit/refresh/delete buttons, so it should also be able to handle when the user does not even have read access.
Last, though the repositories edit/refresh/delete are disabled, the "add app repository" and "refresh all" buttons are enabled instead of being disabled.
The text was updated successfully, but these errors were encountered: