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

Changed TraceConfigz zPage form to use POST request #1521

Merged
merged 36 commits into from
Aug 12, 2020

Conversation

wangty27
Copy link

@wangty27 wangty27 commented Aug 7, 2020

This PR addresses #1517

williamhu99 and others added 30 commits July 18, 2020 00:27
* Scaffolded logic for basic benchmark tests

* Wrote benchmark tests for TracezSpanBuckets

* Updated README with benchmark tests

* Changed the wording slightly
* Scaffolded logic for basic benchmark tests

* Wrote benchmark tests for TracezSpanBuckets

* Updated README with benchmark tests

* Changed the wording slightly

* Added a set of benchmark tests for TracezDataAggregator

* Modified README formatting

* Changed benchmark test to negate dead code elimination
…ions/zpages/TracezDataAggregatorBenchmark.java

Co-authored-by: Anuraag Agrawal <[email protected]>
@codecov
Copy link

codecov bot commented Aug 7, 2020

Codecov Report

Merging #1521 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1521   +/-   ##
=========================================
  Coverage     87.07%   87.07%           
  Complexity     1367     1367           
=========================================
  Files           162      162           
  Lines          5191     5191           
  Branches        490      490           
=========================================
  Hits           4520     4520           
  Misses          492      492           
  Partials        179      179           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b4e0a8...95ff5b7. Read the comment docs.

Copy link

@v-y-l v-y-l left a comment

Choose a reason for hiding this comment

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

Why was this change necessary?

Copy link
Contributor

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

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

Thanks for the quick turnaround!

@jkwatson
Copy link
Contributor

Why was this change necessary?

The originating issue is #1517, but I'm not convinced this is really an issue. It would seems to be a bad idea to expose your zPages to the public internet, whether via GET or POST, so I'm not really sure this is a big deal. From a pure HTTP semantics perspective, though, GET shouldn't be being used for mutating operations of any kind, so I think from that perspective, it's a good change.

@anuraaga
Copy link
Contributor

The originating issue is #1517, but I'm not convinced this is really an issue. It would seems to be a bad idea to expose your zPages to the public internet, whether via GET or POST, so I'm not really sure this is a big deal.

The page is exposed to someone, probably on an internal network from a browser. Opening a malicious email (not even clicking a link) that happened to know the URL would be enough for them to change the config. Knowing the URL and who to target aren't easy, but we should generally consider these as big deals.

try {
applyTraceConfig(queryMap);
} catch (Throwable t) {
try (PrintStream out = new PrintStream(outputStream, /* autoFlush= */ false, "UTF-8")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This section seems like an error applying the config, not an error generating HTML right?

Copy link
Author

Choose a reason for hiding this comment

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

Yea it's error applying config, I will adjust the error message

Copy link
Contributor

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

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

Thanks!

@jkwatson jkwatson merged commit ce8cfd4 into open-telemetry:master Aug 12, 2020
@wangty27 wangty27 deleted the fix-get-request branch August 13, 2020 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants