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

[Fleet]: "Click to use plain text storage instead" link is enabled on editing output stored as plain text when logged in with user role: Fleet: Read. #187642

Closed
amolnater-qasource opened this issue Jul 5, 2024 · 5 comments · Fixed by #188252
Assignees
Labels
bug Fixes for quality problems that affect the customer experience impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. QA:Validated Issue has been validated by QA Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@amolnater-qasource
Copy link

Kibana Build details:

VERSION: 8.15.0 SNAPSHOT
BUILD: 76008
COMMIT: c616ed3da09e04c766be0d791373dc78c1231e12

Role:

Integrations: Read
Fleet: Read
Agents: Read
Agent policies: Read
Settings: Read

image

Preconditions:

  1. 8.15.0-SNAPSHOT Kibana cloud environment should be available.
  2. New User should be created with above defined role.
  3. New Remote Elasticsearch output should be created with Token stored as plain text.

Steps to reproduce:

  1. Login with the above User.
  2. Navigate to Fleet>Settings tab.
  3. Edit the above created output and observe user is able to click link "Click to use plain text storage instead".

Expected Result:
"Click to use plain text storage instead" link should be disable on editing output stored as plain text when logged in with user role: Fleet: Read.

Screen Recording:

Settings.-.Fleet.-.Elastic.-.Google.Chrome.2024-07-05.12-04-10.mp4

Feature:
https://github.com/elastic/ingest-dev/issues/2903

@amolnater-qasource amolnater-qasource added bug Fixes for quality problems that affect the customer experience impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Fleet Team label for Observability Data Collection Fleet team labels Jul 5, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@amolnater-qasource
Copy link
Author

@karanbirsingh-qasource Please review.

@ghost
Copy link

ghost commented Jul 5, 2024

secondary review is done

@kpollich
Copy link
Member

I suppose it probably makes sense to disable this button, but the form itself should be disabled with read-only permissions IIUC, so this seems lower priority.

@jen-huang jen-huang self-assigned this Jul 11, 2024
jen-huang added a commit that referenced this issue Jul 12, 2024
…188252)

## Summary

Resolves #187642 

This PR removes action links and buttons to replace and convert secrets
fields if the field itself is disabled, for cases like the user not
having write permissions:

<img width="730" alt="image"
src="https://github.com/user-attachments/assets/957ad858-74bf-4f28-a212-148253e4ca0f">

<img width="716" alt="image"
src="https://github.com/user-attachments/assets/d70f7946-8b62-4e13-9d16-98ddac26b826">

Also applies sentence casing to `Service token` label.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Jul 12, 2024
…lastic#188252)

## Summary

Resolves elastic#187642

This PR removes action links and buttons to replace and convert secrets
fields if the field itself is disabled, for cases like the user not
having write permissions:

<img width="730" alt="image"
src="https://github.com/user-attachments/assets/957ad858-74bf-4f28-a212-148253e4ca0f">

<img width="716" alt="image"
src="https://github.com/user-attachments/assets/d70f7946-8b62-4e13-9d16-98ddac26b826">

Also applies sentence casing to `Service token` label.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 4c0db61)
kibanamachine added a commit that referenced this issue Jul 12, 2024
…sabled (#188252) (#188258)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[UII] Remove action links and buttons when secrets field is disabled
(#188252)](#188252)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jen
Huang","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-12T18:31:16Z","message":"[UII]
Remove action links and buttons when secrets field is disabled
(#188252)\n\n## Summary\r\n\r\nResolves #187642 \r\n\r\nThis PR removes
action links and buttons to replace and convert secrets\r\nfields if the
field itself is disabled, for cases like the user not\r\nhaving write
permissions:\r\n\r\n<img width=\"730\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/957ad858-74bf-4f28-a212-148253e4ca0f\">\r\n\r\n<img
width=\"716\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/d70f7946-8b62-4e13-9d16-98ddac26b826\">\r\n\r\nAlso
applies sentence casing to `Service token` label.\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"4c0db61e6d92ada57833471a33daa5eb40c38e44","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:prev-minor","v8.16.0"],"title":"[UII]
Remove action links and buttons when secrets field is
disabled","number":188252,"url":"https://github.com/elastic/kibana/pull/188252","mergeCommit":{"message":"[UII]
Remove action links and buttons when secrets field is disabled
(#188252)\n\n## Summary\r\n\r\nResolves #187642 \r\n\r\nThis PR removes
action links and buttons to replace and convert secrets\r\nfields if the
field itself is disabled, for cases like the user not\r\nhaving write
permissions:\r\n\r\n<img width=\"730\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/957ad858-74bf-4f28-a212-148253e4ca0f\">\r\n\r\n<img
width=\"716\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/d70f7946-8b62-4e13-9d16-98ddac26b826\">\r\n\r\nAlso
applies sentence casing to `Service token` label.\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"4c0db61e6d92ada57833471a33daa5eb40c38e44"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/188252","number":188252,"mergeCommit":{"message":"[UII]
Remove action links and buttons when secrets field is disabled
(#188252)\n\n## Summary\r\n\r\nResolves #187642 \r\n\r\nThis PR removes
action links and buttons to replace and convert secrets\r\nfields if the
field itself is disabled, for cases like the user not\r\nhaving write
permissions:\r\n\r\n<img width=\"730\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/957ad858-74bf-4f28-a212-148253e4ca0f\">\r\n\r\n<img
width=\"716\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/d70f7946-8b62-4e13-9d16-98ddac26b826\">\r\n\r\nAlso
applies sentence casing to `Service token` label.\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"4c0db61e6d92ada57833471a33daa5eb40c38e44"}}]}]
BACKPORT-->

Co-authored-by: Jen Huang <[email protected]>
@amolnater-qasource amolnater-qasource added the QA:Ready for Testing Code is merged and ready for QA to validate label Jul 15, 2024
@amolnater-qasource
Copy link
Author

Hi Team,

We have revalidated this issue on latest 8.15.0 SNAPSHOT kibana cloud environment and found it fixed now.

Observations:

  • Click to use plain text storage instead link is not available on editing output stored as plain text when logged in with user role: Fleet: Read.

Screenshot:
image

Build details:
VERSION: 8.15.0 SNAPSHOT
BUILD: 76205
COMMIT: 19bcc82

Hence, we are marking this issue as QA:Validated.

Thanks!

@amolnater-qasource amolnater-qasource added QA:Validated Issue has been validated by QA and removed QA:Ready for Testing Code is merged and ready for QA to validate labels Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. QA:Validated Issue has been validated by QA Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants