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

[Security AI Assistant] Update anonymization privileges #180732

Conversation

YulNaumenko
Copy link
Contributor

@YulNaumenko YulNaumenko commented Apr 12, 2024

Added new sub-feature to AI-Assistant which allows to grant user role privilege to edit Anonymization fields:
Screenshot 2024-04-11 at 7 29 50 PM

How to test:

  1. Create user role, which has access to Security and Actions/Connectors and AI Assistant.
  2. Customize sub-feature privileges: Remove checkbox for Update anonymization fields.
  3. Save role.
  4. Create/update existing user with the new role.
  5. Go to Security AI Assistant settings and open Anonymization tab.
  6. For the user role with removed privilege to edit anonymization, all actionable buttons should be disabled. Button Save will remain enabled, because it correspond to all Assistant settings.
  7. Public API "/api/elastic_assistant/anonymization_fields/_bulk_action" should return "Forbidden" 403 access error.

How it looks when no privilege for the user role:
Screenshot 2024-04-12 at 10 12 34 AM

@patrykkopycinski please adopt it after merging this PR to the new UX

@YulNaumenko YulNaumenko added release_note:skip Skip the PR/issue when compiling release notes v8.14.0 labels Apr 12, 2024
@YulNaumenko YulNaumenko marked this pull request as ready for review April 12, 2024 17:07
@YulNaumenko YulNaumenko requested review from a team as code owners April 12, 2024 17:07
@jamesspi
Copy link

@YulNaumenko @spong, I think this looks great. Perhaps the wording could be improved a bit to show that it's field selection and anonymization. Also, since this will also effect insights, we should probably update the main title (Elastic AI Assistant) to reflect that?

For the feature privilege itself -

Maybe the name/title would be:

"Field Selection and Anonymization"

Description:

"Change the default fields that are allowed to be used by the AI Assistant and AI Insights. Anonymize any of the content for the selected fields".

For the text next to the tick box, maybe: "Allow changes", unless we want to also go for the All/None selector instead

Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

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

Looks like the bulk actions still work. You get an error when you try to save, but we should disable any updates in the UI anyways.

Also, what do you think about adding a tool tip explaining why the toggles/bulk actions are disabled?

ba

@YulNaumenko
Copy link
Contributor Author

YulNaumenko commented Apr 12, 2024

Looks like the bulk actions still work. You get an error when you try to save, but we should disable any updates in the UI anyways.

fixed in 7d3fd66

Also, what do you think about adding a tool tip explaining why the toggles/bulk actions are disabled?

For now, till the new design will be ready, I just removed toolbar, because no sense to have bulk actions and select

Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix!

@YulNaumenko YulNaumenko requested review from a team as code owners April 12, 2024 21:25
Copy link
Contributor

@dplumlee dplumlee left a comment

Choose a reason for hiding this comment

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

Rule management changes LGTM

@spong spong removed the request for review from jpdjere April 12, 2024 21:34
@spong spong added Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Feature:Security Assistant Security Assistant Team:Security Generative AI Security Generative AI labels Apr 12, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@spong spong enabled auto-merge (squash) April 12, 2024 23:13
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/elastic-assistant 131 132 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 17.2MB 17.2MB +799.0B
Unknown metric groups

API count

id before after diff
@kbn/elastic-assistant 153 154 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @semd @YulNaumenko

@spong spong merged commit 5a53ca9 into elastic:main Apr 13, 2024
41 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Security Assistant Security Assistant release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.