-
Notifications
You must be signed in to change notification settings - Fork 848
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
Conversation
* 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
…DataAggregator benchmark tests
…ions/zpages/TracezDataAggregatorBenchmark.java Co-authored-by: Anuraag Agrawal <[email protected]>
Codecov Report
@@ 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.
|
There was a problem hiding this 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?
...nsions/zpages/src/test/java/io/opentelemetry/sdk/extensions/zpages/ZPageHttpHandlerTest.java
Outdated
Show resolved
Hide resolved
… on POST request only
There was a problem hiding this 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!
...extensions/zpages/src/main/java/io/opentelemetry/sdk/extensions/zpages/ZPageHttpHandler.java
Outdated
Show resolved
Hide resolved
...extensions/zpages/src/main/java/io/opentelemetry/sdk/extensions/zpages/ZPageHttpHandler.java
Outdated
Show resolved
Hide resolved
...extensions/zpages/src/main/java/io/opentelemetry/sdk/extensions/zpages/ZPageHttpHandler.java
Outdated
Show resolved
Hide resolved
...pages/src/test/java/io/opentelemetry/sdk/extensions/zpages/TraceConfigzZPageHandlerTest.java
Outdated
Show resolved
Hide resolved
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. |
...tensions/zpages/src/main/java/io/opentelemetry/sdk/extensions/zpages/TracezZPageHandler.java
Outdated
Show resolved
Hide resolved
...extensions/zpages/src/main/java/io/opentelemetry/sdk/extensions/zpages/ZPageHttpHandler.java
Outdated
Show resolved
Hide resolved
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")) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
...extensions/zpages/src/main/java/io/opentelemetry/sdk/extensions/zpages/ZPageHttpHandler.java
Outdated
Show resolved
Hide resolved
...pages/src/test/java/io/opentelemetry/sdk/extensions/zpages/TraceConfigzZPageHandlerTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR addresses #1517