-
Notifications
You must be signed in to change notification settings - Fork 598
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
allow_all_headers config parameter #2155
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A new 'allow_all_headers' configuration parameter has been added to bring parity with the Node.js agent and others. This configuration parameter defaults to a value of `false`. When set to `true` and as long as the agent is not operating in high security mode, all HTTP headers gleaned from a request will be captured and relayed to New Relic instead of the default core set of headers. All existing behavior for `.*attributes.include` and `.*attributes.exclude` configuration parameters will be respected for any desired filtration of the headers when `allow_all_headers` is enabled. This work was done in response to a feature request submitted by community member [@jamesarosen](https://github.com/jamesarosen). Thank you very much, @jamesarosen! resolves #1029
fallwith
requested review from
hannahramadan,
kaylareopelle and
tannalynn
as code owners
August 9, 2023 22:57
remove 'binding.irb' debug breakpoint
focus on transaction tracer for the maximum number of permitted headers
fallwith
commented
Aug 9, 2023
update entry for allow_all_headers Co-authored-by: Hannah Ramadan <76922290+hannahramadan@users.noreply.github.com>
require no Rails or Rails v5.2+ for certain RequestAttribute tests
fallwith
commented
Aug 10, 2023
Grammar rework for allow_all_headers entry Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
previously allow_all_headers was only focused on headers that don't already have accessors on the RequestAttributes model, but after some dev discussion we decided that the _all_ bit should indeed refer to ALL headers and that means removing existing conditional checks for the base headers when allow_all_headers is set.
label the tin better
Technically allow_all_headers doesn't require Rails v5.2+ but rather Rack v2+
- Note about Rack version requirements - Note about attribute names
Insist on `Rack.release` and non 1.x
CI allow_all_headers requires Rack v2+
CHANGELOG.md
Outdated
Comment on lines
13
to
17
A new `allow_all_headers` configuration parameter brings parity with the Node.js agent (see the [v2.7.0 changelog](https://docs.newrelic.com/docs/release-notes/agent-release-notes/nodejs-release-notes/node-agent-270/)). This configuration parameter defaults to a value of `false`. When set to `true`, and as long as the agent is not operating in high-security mode, all HTTP headers gleaned from a request will be captured and relayed to New Relic instead of the default core set of headers. All existing behavior for `.*attributes.include` and `.*attributes.exclude` configuration parameters will be respected for any desired filtration of the headers when `allow_all_headers` is enabled. This work was done in response to a feature request submitted by community member [@jamesarosen](https://github.com/jamesarosen). Thank you very much, @jamesarosen! [Issue#1029](https://github.com/newrelic/newrelic-ruby-agent/issues/1029) | ||
|
||
NOTE: The extra headers collected by having `allow_all_headers` enabled requires Rack version 2 or higher. | ||
NOTE: The extra headers will appear as attributes prefixed with `request.headers.` | ||
|
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.
The long block of text makes this changelog entry a bit difficult for me to follow. Would you be open to breaking things into bullets instead?
Suggested change
A new `allow_all_headers` configuration parameter brings parity with the Node.js agent (see the [v2.7.0 changelog](https://docs.newrelic.com/docs/release-notes/agent-release-notes/nodejs-release-notes/node-agent-270/)). This configuration parameter defaults to a value of `false`. When set to `true`, and as long as the agent is not operating in high-security mode, all HTTP headers gleaned from a request will be captured and relayed to New Relic instead of the default core set of headers. All existing behavior for `.*attributes.include` and `.*attributes.exclude` configuration parameters will be respected for any desired filtration of the headers when `allow_all_headers` is enabled. This work was done in response to a feature request submitted by community member [@jamesarosen](https://github.com/jamesarosen). Thank you very much, @jamesarosen! [Issue#1029](https://github.com/newrelic/newrelic-ruby-agent/issues/1029) | |
NOTE: The extra headers collected by having `allow_all_headers` enabled requires Rack version 2 or higher. | |
NOTE: The extra headers will appear as attributes prefixed with `request.headers.` | |
A new `allow_all_headers` configuration option brings parity with the Node.js agent (see the [v2.7.0 changelog](https://docs.newrelic.com/docs/release-notes/agent-release-notes/nodejs-release-notes/node-agent-270/)). | |
This configuration option: | |
* Defaults to `false`. | |
* Is not compatible with high-security mode | |
* When set to `true` all HTTP headers gleaned from a request will be captured and relayed to New Relic. By default, only a small group of HTTP headers are sent to New Relic. | |
* Respects all existing behavior for `attributes.include` and `attributes.exclude` configuration options for any desired filtration of the headers when `allow_all_headers` is enabled. | |
* Requires Rack version 2 or higher. | |
* Displays the additional headers as transaction attributes prefixed with `request.headers.` | |
This work was done in response to a feature request submitted by community member [@jamesarosen](https://github.com/jamesarosen). Thank you very much, @jamesarosen! [Issue#1029](https://github.com/newrelic/newrelic-ruby-agent/issues/1029) |
allow_all_headers entry updates Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
allow_all_headers entry parameter -> option Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
instane -> instance typo fix Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
(as paired on with @kaylareopelle) update the CHANGELOG entry for `allow_all_headers`
SimpleCov Report
|
kaylareopelle
previously approved these changes
Aug 14, 2023
Co-authored-by: Kayla Reopelle (she/her) <87386821+kaylareopelle@users.noreply.github.com>
kaylareopelle
approved these changes
Aug 14, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A new 'allow_all_headers' configuration parameter has been added to bring parity with the Node.js agent and others. This configuration parameter defaults to a value of
false
. When set totrue
and as long as the agent is not operating in high security mode, all HTTP headers gleaned from a request will be captured and relayed to New Relic instead of the default core set of headers. All existing behavior for.*attributes.include
and.*attributes.exclude
configuration parameters will be respected for any desired filtration of the headers whenallow_all_headers
is enabled. This work was done in response to a feature request submitted by community member@jamesarosen. Thank you very much, @jamesarosen!
resolves #1029