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

[Filebeat] Add URL Encode template function for httpjson input #30962

Merged
merged 2 commits into from
Apr 6, 2022

Conversation

legoguy1000
Copy link
Contributor

@legoguy1000 legoguy1000 commented Mar 22, 2022

What does this PR do?

Add URL Encode tempalte function for httpjson input

Why is it important?

When manually constructing the url.value if there are values that need to be URL encoded.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Mar 22, 2022
@mergify
Copy link
Contributor

mergify bot commented Mar 22, 2022

This pull request does not have a backport label. Could you fix it @legoguy1000? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Mar 22, 2022
@elasticmachine
Copy link
Collaborator

elasticmachine commented Mar 22, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-04-05T22:34:14.794+0000

  • Duration: 69 min 53 sec

Test stats 🧪

Test Results
Failed 0
Passed 2062
Skipped 159
Total 2221

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Mar 23, 2022
CHANGELOG.next.asciidoc Outdated Show resolved Hide resolved
x-pack/filebeat/docs/inputs/input-httpjson.asciidoc Outdated Show resolved Hide resolved
@efd6
Copy link
Contributor

efd6 commented Mar 23, 2022

/test

@legoguy1000
Copy link
Contributor Author

How should I resolve the linting issues? especially the one about unsecure import for sha1 hash?

@andrewkroh
Copy link
Member

andrewkroh commented Mar 28, 2022

The existing linter issues are being addressed in #31008. So once that is merged you can merge that in. It uses a //nolint comment to address the cryto/sha warning.

@legoguy1000
Copy link
Contributor Author

Ok, that's what I was going to add 😁

@mergify
Copy link
Contributor

mergify bot commented Mar 29, 2022

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b httpjson-url-encode upstream/httpjson-url-encode
git merge upstream/main
git push upstream httpjson-url-encode

@legoguy1000 legoguy1000 changed the title [Filebeat] Add URL Encode tempalte function for httpjson input [Filebeat] Add URL Encode template function for httpjson input Mar 31, 2022
@legoguy1000 legoguy1000 force-pushed the httpjson-url-encode branch from a881bf9 to 146af4a Compare March 31, 2022 13:07
@legoguy1000 legoguy1000 requested review from a team as code owners March 31, 2022 13:07
@efd6
Copy link
Contributor

efd6 commented Mar 31, 2022

/test

@mergify
Copy link
Contributor

mergify bot commented Apr 5, 2022

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b httpjson-url-encode upstream/httpjson-url-encode
git merge upstream/main
git push upstream httpjson-url-encode

@legoguy1000 legoguy1000 force-pushed the httpjson-url-encode branch from eb00008 to 6422e31 Compare April 5, 2022 16:02
@andrewkroh
Copy link
Member

/test

@andrewkroh andrewkroh requested a review from efd6 April 6, 2022 00:27
Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

LGTM

@andrewkroh andrewkroh added backport-v8.3.0 Automated backport with mergify enhancement Filebeat Filebeat and removed backport-skip Skip notification from the automated backport with mergify labels Apr 6, 2022
@andrewkroh andrewkroh merged commit 1363c5a into elastic:main Apr 6, 2022
emilioalvap pushed a commit to emilioalvap/beats that referenced this pull request Apr 6, 2022
@legoguy1000 legoguy1000 deleted the httpjson-url-encode branch April 6, 2022 11:43
@legoguy1000
Copy link
Contributor Author

@andrewkroh was this ever backported to 8.3?

@andrewkroh
Copy link
Member

The 8.3 branch has not been created yet. It will be created from main so there is not backport required.

kush-elastic pushed a commit to kush-elastic/beats that referenced this pull request May 2, 2022
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
Add URL Encode template function for httpjson input.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.3.0 Automated backport with mergify enhancement Filebeat Filebeat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants