Skip to content

FE: Add Search Functionality to ACLs page #636

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

polegkashti
Copy link
Contributor

@polegkashti polegkashti commented Oct 26, 2024

  • Breaking change? (if so, please describe the impact and migration path for existing application instances)
    No breaking changes.

What changes did you make? (Give an overview)
This PR introduces a search functionality in ACLs page that allows users to search by principal name. This feature was developed to improve the debugging process for users managing clusters with numerous ACLs, especially when clients encounter "authorization failed" errors. And in general this feature enables users to quickly locate specific ACL entries, saving time and making the debugging experience more efficient and user friendly.
Fixes #621

Is there anything you'd like reviewers to focus on?
No. There are not many changes :)

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • No need to
  • Manually (please, describe, if necessary)
  • Unit checks
  • Integration checks
  • Covered by existing automation

This feature has been tested and deployed on production clustres with many acls and it works great :)

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Check out Contributing and Code of Conduct
A visualization of the new feature:
https://github.com/user-attachments/assets/4b591910-3f4c-401d-9809-fcf9b0b129a0

A picture of a cute animal (not mandatory but encouraged)
5d1837de1884424e8623b11cfab26de4

@polegkashti polegkashti requested review from a team as code owners October 26, 2024 16:48
@kapybro kapybro bot added status/triage Issues pending maintainers triage status/triage/manual Manual triage in progress status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Oct 26, 2024
@polegkashti polegkashti changed the title Closes #621 FE: Add Search Functionality to ACLs page Oct 26, 2024
@polegkashti
Copy link
Contributor Author

Hi @Haarolean, just following up on my pull request to see if there are any updates or feedback. :)

@fallen-up
Copy link

can confirm that the principal search is working:
image

but it's still not enough)

@polegkashti
Copy link
Contributor Author

Thanks dude! Why not enough? I believe limiting the search to 'principal name' makes sense for the intended use cases, such as quickly verifying whether a specific user is authorized or diagnosing authorization issues tied to a particular principal. Once filtered by principal name, users can further refine results by sorting by operation, for example. We’ve successfully deployed this functionality across hundreds of our clusters, and the feedback from clients has been extremely positive.

@fallen-up
Copy link

@polegkashti kafka/strimzi admin can already easily check acl by manifests for example.
i think this functionality is needed more for developers and users of given kafkausers. they don't always know the exact names of their principals.
that's why pattern search is also very important. they can find a topic and see who has access to it.

@Haarolean
Copy link
Member

I don't mind expanding the search further, but we can do this in a separate issue, after a thorough analysis. @fallen-up would you mind raising a new issue describing the functionality you're interested in?

@Haarolean Haarolean added scope/frontend Related to frontend changes scope/backend Related to backend changes area/acl type/enhancement En enhancement/improvement to an already existing feature and removed status/triage/manual Manual triage in progress labels Dec 9, 2024
@Haarolean Haarolean requested a review from a team December 9, 2024 16:52
@Haarolean
Copy link
Member

@polegkashti thanks for attaching the gif :)

@fallen-up
Copy link

@Haarolean +

@polegkashti
Copy link
Contributor Author

@Haarolean Thanks for your approval. I appricate your work!

@Haarolean Haarolean added this to the 1.1 milestone Dec 10, 2024
@@ -36,6 +41,11 @@ const ACList: React.FC = () => {
} = useBoolean();
const [rowId, setRowId] = React.useState('');

// Set the search params to the url based on the localStorage value
useEffect(() => {
setSearch(searchParams.get('q') || '');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please elaborate on what's happening here? I don't quite grasp the relation to local storage here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i agree @Haarolean

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems there may have been a misunderstanding, this piece of code is no longer part of the PR. I've updated the implementation, and removed this comment.
Could you please review the latest changes when you have a moment?

@Haarolean Haarolean removed this from the 1.1 milestone Dec 26, 2024
@Haarolean Haarolean marked this pull request as draft January 16, 2025 14:10
@fallen-up fallen-up mentioned this pull request Mar 11, 2025
11 tasks
@miaw7
Copy link

miaw7 commented Mar 13, 2025

Missing this feature too much

Any news?

@polegkashti
Copy link
Contributor Author

Hey there, I’ve been extremely busy and haven’t had a chance to look at it yet, but I’ll try to get to it as soon as possible. Apologies for the delay! It’s mostly just a matter of making sure the code is well-commented and makes sense.

@fallen-up fallen-up mentioned this pull request Oct 18, 2024
2 tasks
@polegkashti polegkashti force-pushed the feature/search_acl branch from 2e4cc4c to 7ca2470 Compare May 9, 2025 01:04
@polegkashti
Copy link
Contributor Author

polegkashti commented May 9, 2025

Hi there! 👋

I’ve opened this PR to improve our search UX and hopefully to get it merged since it simple and useful feature.

Taking a second look at the way the search was implemented, I noticed that each keystroke was updating the URL in a way that interfered with Back/Forward navigation. I’ve changed a bit the logic so that we:

  • Update q parameter (and reset page to 1 on a new search)

  • Use { replace: true } during rapid typing to avoid cluttering the browser history

Importantly, the <Search> component itself is untouched, so it debounces input. These changes allow proper Back/Forward behavior, keep users on the right page when filtering, and maintain a smooth UX overall.

Please let me know if you’d like any tweaks or have questions! 😊
@Haarolean

@polegkashti polegkashti marked this pull request as ready for review May 9, 2025 01:15
@polegkashti polegkashti requested a review from Haarolean May 13, 2025 20:07
@Haarolean Haarolean requested a review from a team May 13, 2025 20:30
@polegkashti polegkashti requested a review from Mgrdich May 16, 2025 05:42
Copy link
Contributor

@Mgrdich Mgrdich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Frontend looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/acl scope/backend Related to backend changes scope/frontend Related to frontend changes status/triage/completed Automatic triage completed type/enhancement En enhancement/improvement to an already existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ACL: Impl search/filters
6 participants