chore: stringify http responses#2772
Conversation
cachedout
left a comment
There was a problem hiding this comment.
Are we certain that these responses will never contain sensitive information?
Aha, that's a good point. And TBH, this question should be answered by the Fleet team, which I expect them to consider those concerns. As a consumer, the test execution should know what is the error kibana is throwing alongside a 500 HTTP code. |
|
@mdelapenya Thanks. Maybe we can get some insight from @joshdover here. Is there any reason to believe that just printing HTTP from Fleet Server to a log which is available to the public will ever result in the disclosure of sensitive information? I would assume not, but it never hurts to ask. :) |
|
Even if the form wasn't the same, we were printing any information before. |
💔 Tests Failed
Expand to view the summary
Build stats
Test stats 🧪
Test errors
Expand to view the tests failures> Show only the first 10 test failures
|
|
/test |
(cherry picked from commit 859e9e5)
(cherry picked from commit 859e9e5)
(cherry picked from commit 859e9e5) # Conflicts: # internal/kibana/server.go
* upstream/main: (35 commits) bump stack version 8.6.0-6545f2df (elastic#3135) bump stack version 8.6.0-cae815eb (elastic#3130) bump stack version 8.6.0-54a302f0 (elastic#3125) bump stack version 8.6.0-233dc5d4 (elastic#3122) bump stack version 8.6.0-40086bc7 (elastic#3115) bump stack version 8.6.0-5a8d757d (elastic#3111) bump stack version 8.6.0-c49fac70 (elastic#3106) bump stack version 8.6.0-7c9f25a9 (elastic#3105) bump stack version 8.6.0-d939cfde (elastic#3096) bump stack version 8.6.0-0fca2953 (elastic#3081) Turn off all tests but Fleet mode and upgrade for Beats and Agent pipelines (elastic#3077) backport: Add 8.5 branch (elastic#3029) Only run Fleet mode and upgrade tests on 2 platforms (elastic#3054) fix: added setuptools-rust to requiremets.txt (elastic#3048) Added support for bulk api update change (elastic#3043) Making Changes for Docs for E2E setup (elastic#2929) Update ingest notifications channel (elastic#3023) chore: stringify http responses (elastic#2772) Adding support for v1.25.0 k8s (elastic#2975) Fix testcases for fleet api (elastic#2999) ...
* chore: stringify http responses (#2772) (cherry picked from commit 859e9e5) # Conflicts: # internal/kibana/server.go * Update server.go * Update internal/kibana/server.go Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com> Co-authored-by: Ivan Fernandez Calvo <kuisathaverat@users.noreply.github.com>
What does this PR do?
It uses the string representation of the array of bytes that are responded by HTTP servers (particularly Kibana APIs).
Why is it important?
When used in logs, it prints out the array of bytes instead of the String representation, making it useless to troubleshoot any log error
Instead of:
we would have:
Checklist
make unit-test), and they are passing locallymake noticein the proper directory)Related issues