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] Use new JsonBlob type in CredentialsJSON #23277

Merged
merged 1 commit into from
Dec 28, 2020

Conversation

marc-gr
Copy link
Contributor

@marc-gr marc-gr commented Dec 24, 2020

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.

@marc-gr marc-gr added bug Filebeat Filebeat needs_backport PR is waiting to be backported to other branches. Team:Security-External Integrations labels Dec 24, 2020
@marc-gr marc-gr requested a review from a team December 24, 2020 10:46
@elasticmachine
Copy link
Collaborator

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

@marc-gr marc-gr force-pushed the credentialsjson branch 2 times, most recently from 8fd148a to 7e67f11 Compare December 24, 2020 10:52
@elasticmachine
Copy link
Collaborator

elasticmachine commented Dec 24, 2020

💚 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 #23277 updated

  • Start Time: 2020-12-24T15:25:48.215+0000

  • Duration: 54 min 10 sec

Test stats 🧪

Test Results
Failed 0
Passed 17516
Skipped 1383
Total 18899

Steps errors 2

Expand to view the steps failures

Terraform Apply on x-pack/metricbeat/module/aws
  • Took 0 min 14 sec . View more details on here
  • Description: terraform apply -auto-approve
Terraform Apply on x-pack/metricbeat/module/aws
  • Took 0 min 16 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 17516
Skipped 1383
Total 18899

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Dec 24, 2020
@botelastic
Copy link

botelastic bot commented Dec 24, 2020

This pull request doesn't have a Team:<team> label.

@adriansr adriansr merged commit 9022e19 into elastic:master Dec 28, 2020
adriansr pushed a commit to adriansr/beats that referenced this pull request Dec 28, 2020
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)
@adriansr adriansr added v7.12.0 and removed needs_backport PR is waiting to be backported to other branches. labels Dec 28, 2020
adriansr added a commit that referenced this pull request Dec 28, 2020
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)

Co-authored-by: Marc Guasch <marc-gr@users.noreply.github.com>
adriansr pushed a commit to adriansr/beats that referenced this pull request Dec 28, 2020
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)
adriansr pushed a commit to adriansr/beats that referenced this pull request Dec 28, 2020
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)
adriansr added a commit that referenced this pull request Dec 28, 2020
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)

Co-authored-by: Marc Guasch <marc-gr@users.noreply.github.com>
adriansr added a commit that referenced this pull request Jan 5, 2021
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)

Co-authored-by: Marc Guasch <marc-gr@users.noreply.github.com>
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