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] Output secret field is missing UI required validation #172481

Closed
juliaElastic opened this issue Dec 4, 2023 · 1 comment · Fixed by #172795
Closed

[Fleet] Output secret field is missing UI required validation #172481

juliaElastic opened this issue Dec 4, 2023 · 1 comment · Fixed by #172795
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@juliaElastic
Copy link
Contributor

juliaElastic commented Dec 4, 2023

Related to #157458

When enabling output secrets, noticed an issue on the UI that the kafka password field is not validated as a required field:

image

When fixed, update the cypress tests to verify the validation: #172464

Originally posted by @juliaElastic in #172464 (comment)

@juliaElastic juliaElastic added bug Fixes for quality problems that affect the customer experience Team:Fleet Team label for Observability Data Collection Fleet team labels Dec 4, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@juliaElastic juliaElastic self-assigned this Dec 7, 2023
juliaElastic added a commit that referenced this issue Dec 7, 2023
## Summary

Closes #172481

Fixed validation of secret output fields. Updated cypress tests that
validates output secrets.

Create a new remote elasticsearch output and verify that service token
field is required when clicking Save without filling it in.
<img width="673" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/29774463-23de-495a-a1c7-49fd3281877c">

Same for Logstash ssl key:
<img width="678" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/7b41d95f-8066-47d1-a662-2e696399f90c">

Kafka password and ssl key:
<img width="669" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/2ea4dade-beb2-41e8-b068-6d6c42dca498">

In edit mode, when the secret field is empty, the validation is shown
again and goes away when clicking on Cancel changes.
<img width="680" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/93500091-05a5-458c-a42e-97d5f8937d15">
<img width="667" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/b7434126-bf20-40ce-9605-f63d694ea9ca">


### 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 Dec 7, 2023
## Summary

Closes elastic#172481

Fixed validation of secret output fields. Updated cypress tests that
validates output secrets.

Create a new remote elasticsearch output and verify that service token
field is required when clicking Save without filling it in.
<img width="673" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/29774463-23de-495a-a1c7-49fd3281877c">

Same for Logstash ssl key:
<img width="678" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/7b41d95f-8066-47d1-a662-2e696399f90c">

Kafka password and ssl key:
<img width="669" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/2ea4dade-beb2-41e8-b068-6d6c42dca498">

In edit mode, when the secret field is empty, the validation is shown
again and goes away when clicking on Cancel changes.
<img width="680" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/93500091-05a5-458c-a42e-97d5f8937d15">
<img width="667" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/b7434126-bf20-40ce-9605-f63d694ea9ca">

### 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 a8f8f08)
kibanamachine referenced this issue Dec 7, 2023
)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[Fleet] fix validation of output secret fields
(#172795)](#172795)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Julia
Bardi","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-12-07T13:14:56Z","message":"[Fleet]
fix validation of output secret fields (#172795)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/172481\r\n\r\nFixed validation
of secret output fields. Updated cypress tests that\r\nvalidates output
secrets.\r\n\r\nCreate a new remote elasticsearch output and verify that
service token\r\nfield is required when clicking Save without filling it
in.\r\n<img width=\"673\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/29774463-23de-495a-a1c7-49fd3281877c\">\r\n\r\nSame
for Logstash ssl key:\r\n<img width=\"678\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/7b41d95f-8066-47d1-a662-2e696399f90c\">\r\n\r\nKafka
password and ssl key:\r\n<img width=\"669\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/2ea4dade-beb2-41e8-b068-6d6c42dca498\">\r\n\r\nIn
edit mode, when the secret field is empty, the validation is
shown\r\nagain and goes away when clicking on Cancel changes.\r\n<img
width=\"680\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/93500091-05a5-458c-a42e-97d5f8937d15\">\r\n<img
width=\"667\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/b7434126-bf20-40ce-9605-f63d694ea9ca\">\r\n\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":"a8f8f087d3ba622970ff9075beab2a1693e3a7d3","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v8.12.0","v8.13.0"],"number":172795,"url":"https://github.com/elastic/kibana/pull/172795","mergeCommit":{"message":"[Fleet]
fix validation of output secret fields (#172795)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/172481\r\n\r\nFixed validation
of secret output fields. Updated cypress tests that\r\nvalidates output
secrets.\r\n\r\nCreate a new remote elasticsearch output and verify that
service token\r\nfield is required when clicking Save without filling it
in.\r\n<img width=\"673\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/29774463-23de-495a-a1c7-49fd3281877c\">\r\n\r\nSame
for Logstash ssl key:\r\n<img width=\"678\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/7b41d95f-8066-47d1-a662-2e696399f90c\">\r\n\r\nKafka
password and ssl key:\r\n<img width=\"669\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/2ea4dade-beb2-41e8-b068-6d6c42dca498\">\r\n\r\nIn
edit mode, when the secret field is empty, the validation is
shown\r\nagain and goes away when clicking on Cancel changes.\r\n<img
width=\"680\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/93500091-05a5-458c-a42e-97d5f8937d15\">\r\n<img
width=\"667\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/b7434126-bf20-40ce-9605-f63d694ea9ca\">\r\n\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":"a8f8f087d3ba622970ff9075beab2a1693e3a7d3"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172795","number":172795,"mergeCommit":{"message":"[Fleet]
fix validation of output secret fields (#172795)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/172481\r\n\r\nFixed validation
of secret output fields. Updated cypress tests that\r\nvalidates output
secrets.\r\n\r\nCreate a new remote elasticsearch output and verify that
service token\r\nfield is required when clicking Save without filling it
in.\r\n<img width=\"673\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/29774463-23de-495a-a1c7-49fd3281877c\">\r\n\r\nSame
for Logstash ssl key:\r\n<img width=\"678\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/7b41d95f-8066-47d1-a662-2e696399f90c\">\r\n\r\nKafka
password and ssl key:\r\n<img width=\"669\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/2ea4dade-beb2-41e8-b068-6d6c42dca498\">\r\n\r\nIn
edit mode, when the secret field is empty, the validation is
shown\r\nagain and goes away when clicking on Cancel changes.\r\n<img
width=\"680\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/93500091-05a5-458c-a42e-97d5f8937d15\">\r\n<img
width=\"667\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/b7434126-bf20-40ce-9605-f63d694ea9ca\">\r\n\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":"a8f8f087d3ba622970ff9075beab2a1693e3a7d3"}}]}]
BACKPORT-->

Co-authored-by: Julia Bardi <[email protected]>
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 Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants