Skip to content
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

UI/API: Add autocomplete for namespace filter #7405

Open
thegreymatter opened this issue Dec 14, 2021 · 5 comments
Open

UI/API: Add autocomplete for namespace filter #7405

thegreymatter opened this issue Dec 14, 2021 · 5 comments
Labels
area/api Argo Server API area/ui type/feature Feature request type/security Security related

Comments

@thegreymatter
Copy link

Summary

Add the ability to autocomplete the namespace filter in "Workflow Template" and "Workflow" screens using the already available namespaces in the cluster.

Use Cases

In our specific use case, we build and destroy namespaces dynamically per development or production branch. and use these namespaces a the isolation level for our different workflows. selecting these namespaces in the UI for the first time is a bit cumbersome, as we need to type them in manually.


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

@alexec
Copy link
Contributor

alexec commented Feb 15, 2022

For this feature, I think we should make it opt in for the namespace. I.e. the namespace should be labelled with something like workflows.argoproj.io/ui: Allow for them to appear in the list automatiaclly. In multi-tentant systems, you will not want users to determine what the other namespaces are.

@alexec
Copy link
Contributor

alexec commented Feb 15, 2022

This will require a new ListNamespaces endpoint.

@thegreymatter
Copy link
Author

For this feature, I think we should make it opt in for the namespace. I.e. the namespace should be labelled with something like workflows.argoproj.io/ui: Allow for them to appear in the list automatiaclly. In multi-tentant systems, you will not want users to determine what the other namespaces are.

i would like to start working on this capability in a couple of days. I am wondering about the opt-in labels. shouldn't RBAC and namespace permissions solve that for us in a more standardized way?

The label solution creates a split responsibility, as RBAC is responsible for "where I can run", while the labels are responsible to "where I can I can run".

Thoughts?

@agilgur5 agilgur5 added type/security Security related area/api Argo Server API and removed good first issue Good for newcomers hacktoberfest type/security Security related labels Feb 10, 2024
@JoKuebler
Copy link

JoKuebler commented Feb 16, 2024

For this feature, I think we should make it opt in for the namespace. I.e. the namespace should be labelled with something like workflows.argoproj.io/ui: Allow for them to appear in the list automatiaclly. In multi-tentant systems, you will not want users to determine what the other namespaces are.

i would like to start working on this capability in a couple of days. I am wondering about the opt-in labels. shouldn't RBAC and namespace permissions solve that for us in a more standardized way?

The label solution creates a split responsibility, as RBAC is responsible for "where I can run", while the labels are responsible to "where I can I can run".

Thoughts?

@thegreymatter are you still interested in working on this? I do like the idea of having a label as a mechanism to control which namespaces are shown. Prevents users from dealing with RBAC settings which could depending on the cluster be quite complicated sometimes, at least in my little experience.

I'd even extend this improvement to make the namespace filter independent for each screen. Example: My workflows run in a namespace "argo-workflows" but my sensors are deployed to "argo-events". So switching from the "Workflows" to the "Sensors" screen I always have to adjust the namespace filter field.

I'd be happy to support here.

@agilgur5
Copy link

agilgur5 commented Oct 23, 2024

In #9140 (comment), I did mention a tiny alternative that could work for a bit of autocomplete but wouldn't show all namespaces: we could pull a list of namespaces from displayed workflows.

Otherwise, having user RBAC control namespace visibility as above is the proper way of doing this, both within the k8s RBAC model (i.e. no bypasses or vulnerabilities by working around it) and consistency with all existing permissions in the API that are based purely on k8s RBAC.

I mentioned in my linked comment that many users won't have namespace list permissions, and that does indeed mean that they shouldn't be able to list them -- that would be correct. The workaround of retrieving them from displayed workflows means that users had access to those namespaces for the list workflows, so would also be correct

@agilgur5 agilgur5 added the type/security Security related label Oct 23, 2024
@agilgur5 agilgur5 changed the title Add autocomplete for namespace filter UI/API: Add autocomplete for namespace filter Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Argo Server API area/ui type/feature Feature request type/security Security related
Projects
None yet
Development

No branches or pull requests

5 participants