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][httpjson] Add google.jwt_json option to httpjson input #31750

Merged
merged 9 commits into from
Jun 1, 2022

Conversation

marc-gr
Copy link
Contributor

@marc-gr marc-gr commented May 25, 2022

What does this PR do?

Adds auth.oauth2.google.jwt_json option to the httpjson input.

Why is it important?

For some setups (ie: integrations) is more convenient to define the ServiceAccount JWT directly in the config instead of placing a file in the host. This option was already available for regular credentials (auth.oauth2.google.credentials_json) but was not present for ServiceAccount setups.

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.

Relates elastic/integrations#2834

@marc-gr marc-gr requested a review from a team as a code owner May 25, 2022 14:48
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 25, 2022
@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 May 25, 2022
@elasticmachine
Copy link
Collaborator

elasticmachine commented May 25, 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-06-01T08:17:48.702+0000

  • Duration: 74 min 18 sec

Test stats 🧪

Test Results
Failed 0
Passed 2124
Skipped 166
Total 2290

💚 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!)

Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

Minor comments.

x-pack/filebeat/input/httpjson/config_auth.go Outdated Show resolved Hide resolved
x-pack/filebeat/input/httpjson/config_auth.go Outdated Show resolved Hide resolved
x-pack/filebeat/input/httpjson/config_auth.go Outdated Show resolved Hide resolved
x-pack/filebeat/input/httpjson/config_auth.go Outdated Show resolved Hide resolved
- Use os pkg instead of ioutil
- Check ErrNotExist with errors.Is
- Check for length with != 0
- Factor out json file function
@marc-gr
Copy link
Contributor Author

marc-gr commented May 26, 2022

/test

1 similar comment
@marc-gr
Copy link
Contributor Author

marc-gr commented May 27, 2022

/test

@marc-gr marc-gr merged commit be55848 into elastic:main Jun 1, 2022
@marc-gr marc-gr deleted the httpjson_jwt_json branch June 1, 2022 09:33
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
…1750)

* Add google.jwt_json option to httpjson input

* Set PR number in changelog

* Amend comments:
- Use os pkg instead of ioutil
- Check ErrNotExist with errors.Is
- Check for length with != 0
- Factor out json file function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants