Skip to content

[confighttp] Add option to include query params in auth context #10445

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

Merged
merged 5 commits into from
Jul 19, 2024

Conversation

jpkrohling
Copy link
Member

This PR adds a new option to the ServerConfig's Auth option, allowing users to specify a list of query parameters to add to the sources of auth data, in addition to HTTP headers. Instead of simply adding all parameters, which might be numeruous, we require users to specify which ones to include.

Auth extensions don't need to be changed, but should document which attributes they expect to find in the context and how to configure confighttp to accomplish that.

Fixes #4806

Signed-off-by: Juraci Paixão Kröhling [email protected]

@jpkrohling jpkrohling requested review from a team and TylerHelmuth June 20, 2024 13:10
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.33%. Comparing base (2449345) to head (819ef02).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10445   +/-   ##
=======================================
  Coverage   92.33%   92.33%           
=======================================
  Files         403      403           
  Lines       18734    18739    +5     
=======================================
+ Hits        17298    17303    +5     
  Misses       1076     1076           
  Partials      360      360           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Jul 6, 2024

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jul 6, 2024
@jpkrohling jpkrohling removed the Stale label Jul 6, 2024
@jpkrohling jpkrohling force-pushed the jpkrohling/issue4806 branch from 6a91f47 to efeba25 Compare July 11, 2024 07:40
@mx-psi mx-psi requested a review from TylerHelmuth July 18, 2024 11:23
@jpkrohling jpkrohling mentioned this pull request Jul 19, 2024
8 tasks
Copy link
Contributor

@axw axw left a comment

Choose a reason for hiding this comment

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

Nice! LGTM with one suggestion. This should be useful for RUM/browser instrumentation, to avoid CORS preflight requests.

This PR adds a new option to the ServerConfig's Auth option, allowing users to specify a list of query parameters to add to the sources of auth data, in addition to HTTP headers. Instead of simply adding all parameters, which might be numeruous, we require users to specify which ones to include.

Auth extensions don't need to be changed, but should document which attributes they expect to find in the context and how to configure confighttp to accomplish that.

Fixes open-telemetry#4806

Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
@jpkrohling jpkrohling force-pushed the jpkrohling/issue4806 branch from efeba25 to 819ef02 Compare July 19, 2024 12:47
@mx-psi mx-psi merged commit 7d5b1ba into open-telemetry:main Jul 19, 2024
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Provision to include request context(query params, headers) in AuthenticatorFunc
4 participants