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

Rename /debug endpoints to /query and add auth #502

Merged
merged 11 commits into from
Sep 6, 2022
Merged

Conversation

kentquirk
Copy link
Contributor

Which problem is this PR solving?

Short description of the changes

  • Before Add endpoints to help debug refinery rules #500, there was a single /debug/trace endpoint, but there is also an optional /debug endpoint intended for use with a debugger and profiler. So I renamed /debug to /query for the trace and config.
  • I added to these new /query endpoints a local configuration value QueryAuthToken that can be specified in the config file or in the environment. If specified, the X-Honeycomb-Refinery-Query header must be specified on a query request.
  • If the QueryAuthToken is not specified in the configuration, the /query endpoints are not accessible.

Note that because the /debug/trace request has been renamed and is now protected by a token, this is technically a breaking change (although /debug/trace isn't intended for regular operation and wasn't documented outside of the source code).

This PR is currently based against #500, and could be merged to that one or wait until that one merges.

@kentquirk kentquirk requested review from a team and MikeGoldsmith and removed request for a team September 5, 2022 18:15
Copy link
Contributor

@MikeGoldsmith MikeGoldsmith left a comment

Choose a reason for hiding this comment

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

Looks like a good change. I've left a query regarding removing the old endpoints.

@MikeGoldsmith MikeGoldsmith added type: enhancement New feature or request version: bump minor A PR that adds behavior, but is backwards-compatible. labels Sep 6, 2022
Base automatically changed from kent.debug_config to main September 6, 2022 19:31
@kentquirk kentquirk merged commit 47ff62a into main Sep 6, 2022
@kentquirk kentquirk deleted the kent.debug_auth branch September 6, 2022 19:41
ghost pushed a commit to opsramp/tracing-proxy that referenced this pull request Jul 5, 2024
## Which problem is this PR solving?

- Adds a local query token to allow the changes in honeycombio#500 to be protected by a locally-defined token in a header.

## Short description of the changes

- Before honeycombio#500, there was a single /debug/trace endpoint, but there is also an optional /debug endpoint intended for use with a debugger and profiler. So I renamed /debug to /query for the trace and config.
- I added to these new /query endpoints a local configuration value `QueryAuthToken` that can be specified in the config file or in the environment. If specified, the `X-Honeycomb-Refinery-Query` header must be specified on a query request.
- If the QueryAuthToken is not specified in the configuration, the /query endpoints are not accessible. 

Note that because the `/debug/trace` request has been renamed and is now protected by a token, this is technically a breaking change (although `/debug/trace` isn't intended for regular operation and wasn't documented outside of the source code).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request version: bump minor A PR that adds behavior, but is backwards-compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants