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

Cherry-pick #23277 to 7.x: [Filebeat] Use new JsonBlob type in CredentialsJSON #23291

Merged
merged 2 commits into from
Dec 28, 2020

Conversation

adriansr
Copy link
Contributor

@adriansr adriansr commented Dec 28, 2020

Cherry-pick of PR #23277 to 7.x branch. Original message:

What does this PR do?

Both inputs gcp-pubsub and httpjson used []byte fields as part of their configurations to receive json blobs. This caused issues because the config values never get parsed properly since literal JSON strings arrived as string and objects as maps, causing errors similar to can not convert 'string' into 'uint8' accessing 'auth.oauth2.google.credentials_json' or can not convert 'object' into 'uint8' accessing 'auth.oauth2.google.credentials_json'.

This creates a JSONBlob type that can be unpacked from literal json strings or from config objects into a raw json message.

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.

Both inputs gcp-pubsub and httpjson used []byte fields as part of their configurations to receive json blobs. This caused issues because the config values never get parsed properly since literal JSON strings arrived as string and objects as maps, causing errors similar to can not convert 'string' into 'uint8' accessing 'auth.oauth2.google.credentials_json' or can not convert 'object' into 'uint8' accessing 'auth.oauth2.google.credentials_json'.

This creates a JSONBlob type that can be unpacked from literal json strings or from config objects into a raw json message.

(cherry picked from commit 9022e19)
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 28, 2020
@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 Dec 28, 2020
@elasticmachine
Copy link
Collaborator

💚 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

Expand to view the summary

Build stats

  • Build Cause: Pull request #23291 opened

  • Start Time: 2020-12-28T10:20:22.061+0000

  • Duration: 49 min 17 sec

Test stats 🧪

Test Results
Failed 0
Passed 17472
Skipped 1408
Total 18880

Steps errors 2

Expand to view the steps failures

Terraform Apply on x-pack/metricbeat/module/aws
  • Took 0 min 15 sec . View more details on here
  • Description: terraform apply -auto-approve
Terraform Apply on x-pack/metricbeat/module/aws
  • Took 0 min 15 sec . View more details on here
  • Description: terraform apply -auto-approve

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 17472
Skipped 1408
Total 18880

@adriansr adriansr merged commit 957bb58 into elastic:7.x Dec 28, 2020
@adriansr adriansr deleted the backport_23277_7.x branch December 28, 2020 17:04
@zube zube bot removed the [zube]: Done label Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants