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 single quotes around configurable string values in O365 #25215

Merged
merged 1 commit into from
Apr 22, 2021

Conversation

andrewkroh
Copy link
Member

What does this PR do?

Values passed in by users that are expected to be strings should be single-quoted.

Also, this fixes the tojson function to not escape &, <, and > to to \u0026, \u003c, and \u003e. This
caused problems if the value is an api keys or password that contained one of those characters.

Fixes #25058

Why is it important?

We don't want to create arbitrary restrictions on the allowed characters in client secrets.

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.

Related issues

Values passed in by users that are expected to be strings should be single-quoted.

Also, this fixes the `tojson` function to not escape &, <, and > to to \u0026, \u003c, and \u003e. This
caused problems if the value is an api keys or password that contained one of those characters.

Fixes elastic#25058
@andrewkroh andrewkroh added bug review Filebeat Filebeat Team:Security-External Integrations backport-v7.13.0 Automated backport with mergify backport-v7.14.0 Automated backport with mergify labels Apr 21, 2021
@elasticmachine
Copy link
Collaborator

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

@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 Apr 21, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Apr 21, 2021

💚 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: marc-gr commented: /test

  • Start Time: 2021-04-22T08:50:56.376+0000

  • Duration: 79 min 1 sec

  • Commit: c453988

Test stats 🧪

Test Results
Failed 0
Passed 2053
Skipped 162
Total 2215

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 2053
Skipped 162
Total 2215

@marc-gr
Copy link
Contributor

marc-gr commented Apr 22, 2021

/test

@andrewkroh andrewkroh merged commit eed1cbb into elastic:master Apr 22, 2021
mergify bot pushed a commit that referenced this pull request Apr 22, 2021
Values passed in by users that are expected to be strings should be single-quoted.

Also, this fixes the `tojson` function to not escape &, <, and > to to \u0026, \u003c, and \u003e. This
caused problems if the value is an api keys or password that contained one of those characters.

Fixes #25058

(cherry picked from commit eed1cbb)
mergify bot pushed a commit that referenced this pull request Apr 22, 2021
Values passed in by users that are expected to be strings should be single-quoted.

Also, this fixes the `tojson` function to not escape &, <, and > to to \u0026, \u003c, and \u003e. This
caused problems if the value is an api keys or password that contained one of those characters.

Fixes #25058

(cherry picked from commit eed1cbb)
andrewkroh added a commit that referenced this pull request Apr 23, 2021
…25231)

Values passed in by users that are expected to be strings should be single-quoted.

Also, this fixes the `tojson` function to not escape &, <, and > to to \u0026, \u003c, and \u003e. This
caused problems if the value is an api keys or password that contained one of those characters.

Fixes #25058

(cherry picked from commit eed1cbb)

Co-authored-by: Andrew Kroh <[email protected]>
andrewkroh added a commit that referenced this pull request Apr 23, 2021
Values passed in by users that are expected to be strings should be single-quoted.

Also, this fixes the `tojson` function to not escape &, <, and > to to \u0026, \u003c, and \u003e. This
caused problems if the value is an api keys or password that contained one of those characters.

Fixes #25058

(cherry picked from commit eed1cbb)
andrewkroh added a commit that referenced this pull request Apr 25, 2021
…5 (backport #25215) (#25232)

* Add single quotes around configurable string values in O365 (#25215)

Values passed in by users that are expected to be strings should be single-quoted.

Also, this fixes the `tojson` function to not escape &, <, and > to to \u0026, \u003c, and \u003e. This
caused problems if the value is an api keys or password that contained one of those characters.

Fixes #25058

(cherry picked from commit eed1cbb)

* Fix changelog

Co-authored-by: Andrew Kroh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.13.0 Automated backport with mergify backport-v7.14.0 Automated backport with mergify bug Filebeat Filebeat review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Filebeat][O365 Module] client_secret produces error if secret starts with @
3 participants