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

[Ingest Manager] possible encoding issue in processing data-sources, results in ui error #73075

Closed
EricDavisX opened this issue Jul 23, 2020 · 6 comments · Fixed by elastic/integrations#203
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@EricDavisX
Copy link
Contributor

EricDavisX commented Jul 23, 2020

[Ingest Manager] possible encoding issue in processing data-sources, results in ui error

Kibana version:
7.9.0 BC3 deployed to cloud with BC3 Agent installed to win 7 x64 host

Browser version:
chrome latest on macos

Describe the bug:
use this path for a custom logs entry and get an error:
"C:\Users\zeus\Desktop\test.log"

First seen with the longer path here used in further examples:
"C:\Users\zeus\Desktop\elastic-agent-7.9.0-bc3\elastic-agent-7.8.0-windows-x86_64\data\logs\elastic-agent-json.log"

Steps to reproduce:
here is the full request POST payload:

{"name":"log-1test","description":"","namespace":"default","config_id":"988a4100-ccf6-11ea-a848-5f6d14e28650","enabled":true,"output_id":"","inputs":[{"type":"logs","enabled":true,"streams":[{"id":"logs-log.log","enabled":true,"dataset":{"name":"log.log","type":"logs"},"vars":{"paths":{"type":"text","value":["C:\\Users\\zeus\\Desktop\\elastic-agent-7.9.0-bc3\\elastic-agent-7.8.0-windows-x86_64\\data\\logs\\elastic-agent-json.log"]},"dataset":{"value":"generic","type":"text"},"custom":{"value":"","type":"yaml"}}}]}],"package":{"name":"log","title":"Customs logs","version":"0.1.0"}}

from this post:
Request URL: https://33193cd6940e4f29a4e4b88335969f5b.europe-west1.gcp.cloud.es.io:9243/api/ingest_manager/package_configs

  • returns a 500 error

Expected behavior:
this location seems valid to me (as a test) - it should be accepted and custom logs integration should function correctly

Screenshots (if relevant):
Screen Shot 2020-07-23 at 11 22 02 AM
Screen Shot 2020-07-23 at 11 21 55 AM

Errors in browser console (if relevant):
500 error response

@EricDavisX EricDavisX added Team:Fleet Team label for Observability Data Collection Fleet team Ingest Management:beta1 labels Jul 23, 2020
@ph ph assigned skh Jul 23, 2020
@ph ph added the bug Fixes for quality problems that affect the customer experience label Jul 23, 2020
@jen-huang
Copy link
Contributor

jen-huang commented Jul 23, 2020

@ph This is a package definition issue:
https://epr.elastic.co/package/log/0.1.0/dataset/log/agent/stream/stream.yml.hbs

This part:

{{#each paths}}
  - "{{this}}"
{{/each}}

should not have double quotes. It should use single quotes or omit the quotes entirely:

{{#each paths}}
  - {{this}}
{{/each}}

From looking in other package stream templates with a similar case, most choose to omit the quotes, e.g.: https://epr.elastic.co/package/system/0.3.0/dataset/auth/agent/stream/log.yml.hbs

From a grep in integrations repo, I think https://epr.elastic.co/package/log/0.1.0/dataset/log/agent/stream/stream.yml.hbs is the only stream template that needs to be corrected.

Assigning back to you to assign work.

@jen-huang jen-huang assigned ph and unassigned skh Jul 23, 2020
@ghost
Copy link

ghost commented Jul 27, 2020

Hi @EricDavisX

We are in-progress of bad data input validation for integrations and have reported 01 UI bug #73263 for RabbitMQ integration. We will validate the bad data inputs for other pending integrations and share the observations for the same.

Please let us know if anything else is required from our end.

@ghost
Copy link

ghost commented Jul 28, 2020

Hi @EricDavisX

We have validated the below integrations with bad data input on Kibana BC4 oblt server https://release-oblt.elastic.dev and validation is working for these integrations.

  1. ZooKeeper
  2. Windows
  3. System
  4. AWS
  5. Redis

We are in-progress of doing exploratory on bad data input validation for other pending integrations on Kibana BC4 oblt server https://release-oblt.elastic.dev. We will validate them and share the observations for the same.

Please let us know if anything else is missing from our end.

@ph ph assigned ph and unassigned ph Jul 28, 2020
ph added a commit to ph/integrations that referenced this issue Jul 28, 2020
should not have double quotes. It should use single quotes or omit the quotes entirely

Fixes: elastic/kibana#73075
@ph
Copy link
Contributor

ph commented Jul 28, 2020

created a PR for integration #73075

@ghost
Copy link

ghost commented Jul 29, 2020

Hi @EricDavisX

We have validated the below integrations with bad data input on Kibana BC4 oblt server https://release-oblt.elastic.dev :-

  1. Apache
  2. Cisco
  3. IIS
  4. Kafka
  5. Kubernetes
  6. Custom Logs
  7. MongoDB
  8. MySQL
  9. NetFlow
  10. Nginx
  11. PostgreSQL
  12. Prometheus
  13. Staging
  14. Elastic Endpoint Security

Observations:

  1. Validation error is displayed if no value is provided in mandatory field.

Screenshot for Custom Logs-> Log File path field:
image

  1. No validation is displayed for incorrect or long data inserted in fields. Hence we have reported bug #73636 for the same.

Moreover, error is still displayed on saving the Custom Log integration after providing Log file path as 'C:\Users\zeus\Desktop\test.log'

Screenshot:
image

Logs:
Response under Browser Network logs:
{"statusCode":500,"error":"Internal Server Error","message":"expected hexadecimal character at line 3, column 10:\n - "C:\Users\zeus\Desktop\test.log"\n ^"}
image

Please let us know if anything else is missing from our end.

mtojek pushed a commit to elastic/integrations that referenced this issue Jul 29, 2020
* Fix encoding issues

should not have double quotes. It should use single quotes or omit the quotes entirely

Fixes: elastic/kibana#73075

* Bump to 0.3.0
@ghost
Copy link

ghost commented Sep 2, 2020

Bug Conversion:

Test-Case is not required for this ticket.

eyalkraft pushed a commit to build-security/integrations that referenced this issue Mar 30, 2022
* Fix encoding issues

should not have double quotes. It should use single quotes or omit the quotes entirely

Fixes: elastic/kibana#73075

* Bump to 0.3.0
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.

4 participants